From: Vasiliy Kulikov Date: Thu, 28 Oct 2010 12:31:55 +0000 (-0600) Subject: block: cciss: fix information leak to userland X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7ab5118d7c2be650bc936894f159dc1c597badae;p=linux-beck.git block: cciss: fix information leak to userland Structure IOCTL_Command_struct is copied to userland with some padding fields at the end of the struct unitialized. It leads to leaking of contents of kernel stack memory. Signed-off-by: Vasiliy Kulikov Signed-off-by: Jens Axboe --- diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index f09e6df15aa7..13d87a031c88 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -1184,6 +1184,7 @@ static int cciss_ioctl32_big_passthru(struct block_device *bdev, fmode_t mode, int err; u32 cp; + memset(&arg64, 0, sizeof(arg64)); err = 0; err |= copy_from_user(&arg64.LUN_info, &arg32->LUN_info,