]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI: Fix bound checks for copy_from_user in the acpi /proc code
authorArjan van de Ven <arjan@linux.intel.com>
Sat, 26 Sep 2009 18:50:25 +0000 (20:50 +0200)
committerLen Brown <len.brown@intel.com>
Sat, 3 Oct 2009 04:59:12 +0000 (00:59 -0400)
commit9a97b064e0704a959e7d167cc1d9d9ea4c75f17c
tree40b3d3f68ee8bc38f6c455c8722c95241690f058
parenta0181094da959a2012d862251fb80c971b150a7b
ACPI: Fix bound checks for copy_from_user in the acpi /proc code

The ACPI /proc write() code takes an unsigned length argument like any write()
function, but then assigned it to a *signed* integer called "len".
Only after this is a sanity check for len done to make it not larger than 4.

Due to the type change a len < 0 is in principle also possible; this patch
adds a check for this.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/proc.c