]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
aacraid: Check size values after double-fetch from user
authorDave Carroll <david.carroll@microsemi.com>
Fri, 5 Aug 2016 19:44:10 +0000 (13:44 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Sep 2016 06:30:00 +0000 (08:30 +0200)
commit67d4aa44188d0da7f661972a88f9ac448e4fd2fe
tree8c59ae386f7a8e91a7159a334d2096f7a5b84ceb
parent950af829a5fc32c34ae71e2e83f19d4dd58709b8
aacraid: Check size values after double-fetch from user

commit fa00c437eef8dc2e7b25f8cd868cfa405fcc2bb3 upstream.

In aacraid's ioctl_send_fib() we do two fetches from userspace, one the
get the fib header's size and one for the fib itself. Later we use the
size field from the second fetch to further process the fib. If for some
reason the size from the second fetch is different than from the first
fix, we may encounter an out-of- bounds access in aac_fib_send(). We
also check the sender size to insure it is not out of bounds. This was
reported in https://bugzilla.kernel.org/show_bug.cgi?id=116751 and was
assigned CVE-2016-6480.

Reported-by: Pengfei Wang <wpengfeinudt@gmail.com>
Fixes: 7c00ffa31 '[SCSI] 2.6 aacraid: Variable FIB size (updated patch)'
Signed-off-by: Dave Carroll <david.carroll@microsemi.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/aacraid/commctrl.c