All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block: cciss: fix information leak to userland
@ 2010-10-27 15:40 ` Vasiliy Kulikov
  0 siblings, 0 replies; 4+ messages in thread
From: Vasiliy Kulikov @ 2010-10-27 15:40 UTC (permalink / raw)
  To: kernel-janitors
  Cc: Mike Miller, Jens Axboe, Stephen M. Cameron, Andrew Morton,
	iss_storagedev, linux-kernel

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 <segooon@gmail.com>
---
 Compile tested.

 drivers/block/cciss.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index f09e6df..13d87a0 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,
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] block: cciss: fix information leak to userland
@ 2010-10-27 15:40 ` Vasiliy Kulikov
  0 siblings, 0 replies; 4+ messages in thread
From: Vasiliy Kulikov @ 2010-10-27 15:40 UTC (permalink / raw)
  To: kernel-janitors
  Cc: Mike Miller, Jens Axboe, Stephen M. Cameron, Andrew Morton,
	iss_storagedev, linux-kernel

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 <segooon@gmail.com>
---
 Compile tested.

 drivers/block/cciss.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index f09e6df..13d87a0 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,
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] block: cciss: fix information leak to userland
  2010-10-27 15:40 ` Vasiliy Kulikov
@ 2010-10-28 12:32   ` Jens Axboe
  -1 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2010-10-28 12:32 UTC (permalink / raw)
  To: Vasiliy Kulikov
  Cc: kernel-janitors, Mike Miller, Stephen M. Cameron, Andrew Morton,
	iss_storagedev, linux-kernel

On 2010-10-27 09:40, Vasiliy Kulikov wrote:
> 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.

Thanks, applied.


-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] block: cciss: fix information leak to userland
@ 2010-10-28 12:32   ` Jens Axboe
  0 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2010-10-28 12:32 UTC (permalink / raw)
  To: Vasiliy Kulikov
  Cc: kernel-janitors, Mike Miller, Stephen M. Cameron, Andrew Morton,
	iss_storagedev, linux-kernel

On 2010-10-27 09:40, Vasiliy Kulikov wrote:
> 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.

Thanks, applied.


-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-10-28 12:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-27 15:40 [PATCH] block: cciss: fix information leak to userland Vasiliy Kulikov
2010-10-27 15:40 ` Vasiliy Kulikov
2010-10-28 12:32 ` Jens Axboe
2010-10-28 12:32   ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.