cpqarray: fix info leak in ida_locked_ioctl()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 24 Sep 2013 22:27:44 +0000 (15:27 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 26 Oct 2013 20:06:13 +0000 (21:06 +0100)
commit 627aad1c01da6f881e7f98d71fd928ca0c316b1a upstream.

The pciinfo struct has a two byte hole after ->dev_fn so stack
information could be leaked to the user.

This was assigned CVE-2013-2147.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/block/cpqarray.c

index 9125bbe..504bc16 100644 (file)
@@ -1195,6 +1195,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;