CVE-2016-6480: Race Condition
Race condition in the ioctlsendfib function in drivers/scsi/aacraid/commctrl.c in the Linux kernel through 4.7 allows local users to cause a denial of service (out-of-bounds access or system crash) by changing a certain size value, aka a "double fetch" vulnerability.
Other sources
The following flaw was found in the Linux kernel's aacraid driver:
I found this Double-Fetch bug in Linux-4.5/drivers/scsi/aacraid/commctrl.c when I was examining the source code.
In function ioctlsendfib(), the driver fetches user space data by pointer arg via copyfromuser(), and this happens twice at line 81 and line 116 respectively. The first fetched value (stored in kfib) is used to get the header and calculate the size at line 90 so as to copy the whole message later at line 116, which means the copy size of the whole message is based on the old value that came from the first fetch. Besides, the whole message copied in the second fetch also contains the header.
However, when the function processes the message after the second fetch at line 130, it uses kfib->header.Size that came from the second fetch, which might be different from the one came from the first fetch as well as calculated the size to copy the message from user space to driver.
If the kfib->header.Size is modified by a user thread under race condition between the fetch operations, for example changing to a very large value, this will lead to over-boundary access or other serious consequences in function aacfibsend().
Upstream bug:
https://bugzilla.kernel.org/showbug.cgi?id=116751
Accepted upstream fix:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=fa00c437eef8dc2e7b25f8cd868cfa405fcc2bb3
References:
http://seclists.org/bugtraq/2016/Aug/15
https://lkml.org/lkml/2016/4/26/1078 - discussion on lkml
https://www.spinics.net/lists/linux-scsi/msg98681.html - discussion 1
https://www.spinics.net/lists/linux-scsi/msg98745.html - discussion 2 + patch
https://www.spinics.net/lists/linux-scsi/msg98744.html - discussion 3 + patch v2
— Red Hat
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2016-6480?
CVE-2016-6480 is considered a high-severity vulnerability that can lead to a denial of service through a system crash.
How do I fix CVE-2016-6480?
To mitigate CVE-2016-6480, update your Linux kernel to version 4.8 or later, as previous versions are affected.
What types of systems are affected by CVE-2016-6480?
CVE-2016-6480 affects local users of the Linux kernel versions up to 4.7, particularly those using systems with the aacraid SCSI driver.
What is the impact of exploiting CVE-2016-6480?
Exploiting CVE-2016-6480 can lead to out-of-bounds access, causing a denial of service or crashes in the affected systems.
Is CVE-2016-6480 related to specific hardware?
CVE-2016-6480 is specifically related to the aacraid SCSI driver, impacting systems that utilize this driver in the Linux kernel.