Skip to contentSkip to conversation

block: cpqarray: fix information leak to userland

PATCH In review Vasiliy Kulikov 1 participant 1 message Oct 23, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 block: cpqarray: fix information leak to userland

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

---
 drivers/block/cpqarray.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/block/cpqarray.c +1 -0
index 946dad4..8e0e6b4 100644
@@ -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;
Signature · 1 line
1.7.0.4