aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/lockdep_internals.h
diff options
context:
space:
mode:
authorJonathan Salwan <jonathan.salwan@gmail.com>2013-07-03 15:01:13 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-13 10:34:43 -0700
commita6ca6dff63f92efa17810ac0a4d33e3b63670482 (patch)
tree44cefa9c6cb43e5982b3d030c54fc2ad69a967e6 /kernel/lockdep_internals.h
parent314d3e7c43ea9125ef257dad74f494c0c82b7fe3 (diff)
downloadkernel_samsung_aries-a6ca6dff63f92efa17810ac0a4d33e3b63670482.zip
kernel_samsung_aries-a6ca6dff63f92efa17810ac0a4d33e3b63670482.tar.gz
kernel_samsung_aries-a6ca6dff63f92efa17810ac0a4d33e3b63670482.tar.bz2
drivers/cdrom/cdrom.c: use kzalloc() for failing hardware
commit 542db01579fbb7ea7d1f7bb9ddcef1559df660b2 upstream. In drivers/cdrom/cdrom.c mmc_ioctl_cdrom_read_data() allocates a memory area with kmalloc in line 2885. 2885 cgc->buffer = kmalloc(blocksize, GFP_KERNEL); 2886 if (cgc->buffer == NULL) 2887 return -ENOMEM; In line 2908 we can find the copy_to_user function: 2908 if (!ret && copy_to_user(arg, cgc->buffer, blocksize)) The cgc->buffer is never cleaned and initialized before this function. If ret = 0 with the previous basic block, it's possible to display some memory bytes in kernel space from userspace. When we read a block from the disk it normally fills the ->buffer but if the drive is malfunctioning there is a chance that it would only be partially filled. The result is an leak information to userspace. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Jonathan Salwan <jonathan.salwan@gmail.com> Cc: Luis Henriques <luis.henriques@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/lockdep_internals.h')
0 files changed, 0 insertions, 0 deletions