mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2/2] block: cpqarray: fix information leak to userland
@ 2010-10-23  8:25 Vasiliy Kulikov
  0 siblings, 0 replies; only message in thread
From: Vasiliy Kulikov @ 2010-10-23  8:25 UTC (permalink / raw)
  To: kernel-janitors
  Cc: Chirag Kantharia, Jens Axboe, Arnd Bergmann, Christoph Hellwig,
	Kulikov Vasiliy, Andrew Morton, iss_storagedev, linux-kernel

Structure ida_pci_info_struct is copied to userland with some padding
fields unitialized.  It leads to leaking of stack memory.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
---
 drivers/block/cpqarray.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
index 946dad4..8e0e6b4 100644
--- a/drivers/block/cpqarray.c
+++ b/drivers/block/cpqarray.c
@@ -1198,6 +1198,7 @@ out_passthru:
 		ida_pci_info_struct pciinfo;
 
 		if (!arg) return -EINVAL;
+		memset(&pciinfo, 0, sizeof(pciinfo));
 		pciinfo.bus = host->pci_dev->bus->number;
 		pciinfo.dev_fn = host->pci_dev->devfn;
 		pciinfo.board_id = host->board_id;
-- 
1.7.0.4


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-10-23  8:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-23  8:25 [PATCH 2/2] block: cpqarray: fix information leak to userland Vasiliy Kulikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®