forked from rubenslte/android_kernel_samsung_msm8226
Bluetooth: hidp: fix buffer overflow
commit a1616a5ac99ede5d605047a9012481ce7ff18b16 upstream. Struct ca is copied from userspace. It is not checked whether the "name" field is NULL terminated, which allows local users to obtain potentially sensitive information from kernel stack memory, via a HIDPCONNADD command. This vulnerability is similar to CVE-2011-1079. Signed-off-by: Young Xiao <YangX92@hotmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> CVE-2019-11884 Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org> Change-Id: If26bd0108596f42bb48349146f0c84eb0a675276
This commit is contained in:
committed by
Francescodario Cuzzocrea
parent
06215f21e6
commit
6e214c858f
@@ -84,6 +84,7 @@ static int hidp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long
|
||||
sockfd_put(csock);
|
||||
return err;
|
||||
}
|
||||
ca.name[sizeof(ca.name)-1] = 0;
|
||||
|
||||
if (csock->sk->sk_state != BT_CONNECTED ||
|
||||
isock->sk->sk_state != BT_CONNECTED) {
|
||||
|
||||
Reference in New Issue
Block a user