lkml.org 
[lkml]   [2017]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] scsi: aacraid: fix information leak on hbainfo.driver_name
Date
From: Colin Ian King <colin.king@canonical.com>

The driver_name field is not initialized and hence information
on the stack is being leaked to userspace on the copy_to_user.
Fix this.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/scsi/aacraid/commctrl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c
index 614842a..eb48d0a 100644
--- a/drivers/scsi/aacraid/commctrl.c
+++ b/drivers/scsi/aacraid/commctrl.c
@@ -1015,7 +1015,7 @@ static int aac_get_pci_info(struct aac_dev* dev, void __user *arg)

static int aac_get_hba_info(struct aac_dev *dev, void __user *arg)
{
- struct aac_hba_info hbainfo;
+ struct aac_hba_info hbainfo = { 0 };

hbainfo.adapter_number = (u8) dev->id;
hbainfo.system_io_bus_number = dev->pdev->bus->number;
--
2.10.2
\
 
 \ /
  Last update: 2017-02-07 14:57    [W:0.618 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site