aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs4
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2012-10-06 14:12:56 +0200
committerBen Hutchings <ben@decadent.org.uk>2012-10-17 03:49:48 +0100
commite69e19924bdbfb7a44ac64c206d5cbcae57910ed (patch)
tree8a55df3ad729a440a66d70c098546e0ea19a2099 /fs/autofs4
parentc1bc78797baaf98cb565d0c4afcb8ef26bb28655 (diff)
downloadkernel_samsung_smdk4412-e69e19924bdbfb7a44ac64c206d5cbcae57910ed.zip
kernel_samsung_smdk4412-e69e19924bdbfb7a44ac64c206d5cbcae57910ed.tar.gz
kernel_samsung_smdk4412-e69e19924bdbfb7a44ac64c206d5cbcae57910ed.tar.bz2
firewire: cdev: fix user memory corruption (i386 userland on amd64 kernel)
commit 790198f74c9d1b46b6a89504361b1a844670d050 upstream. Fix two bugs of the /dev/fw* character device concerning the FW_CDEV_IOC_GET_INFO ioctl with nonzero fw_cdev_get_info.bus_reset. (Practically all /dev/fw* clients issue this ioctl right after opening the device.) Both bugs are caused by sizeof(struct fw_cdev_event_bus_reset) being 36 without natural alignment and 40 with natural alignment. 1) Memory corruption, affecting i386 userland on amd64 kernel: Userland reserves a 36 bytes large buffer, kernel writes 40 bytes. This has been first found and reported against libraw1394 if compiled with gcc 4.7 which happens to order libraw1394's stack such that the bug became visible as data corruption. 2) Information leak, affecting all kernel architectures except i386: 4 bytes of random kernel stack data were leaked to userspace. Hence limit the respective copy_to_user() to the 32-bit aligned size of struct fw_cdev_event_bus_reset. Reported-by: Simon Kirby <sim@hostway.ca> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'fs/autofs4')
0 files changed, 0 insertions, 0 deletions