lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MWHPR03MB3136FC54E76FBFD54A178159CEE10@MWHPR03MB3136.namprd03.prod.outlook.com>
Date:   Mon, 15 May 2017 22:48:13 +0000
From:   Long Li <longli@...rosoft.com>
To:     Long Li <longli@...rosoft.com>,
        "James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     KY Srinivasan <kys@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>
Subject: RE: [PATCH] scsi: zero per-cmd driver data for each MQ I/O

> -----Original Message-----
> From: Long Li [mailto:longli@...hange.microsoft.com]
> Sent: Wednesday, May 10, 2017 2:07 PM
> To: James E.J. Bottomley <jejb@...ux.vnet.ibm.com>; Martin K. Petersen
> <martin.petersen@...cle.com>; linux-scsi@...r.kernel.org; linux-
> kernel@...r.kernel.org
> Cc: Long Li <longli@...rosoft.com>
> Subject: [PATCH] scsi: zero per-cmd driver data for each MQ I/O
> 
> From: Long Li <longli@...rosoft.com>
> 
> Lower layer driver may not initialize private data before use. Zero them out
> to prevent use of stale data.
> 
> Signed-off-by: Long Li <longli@...rosoft.com>

Can someone help review this patch?

> ---
>  drivers/scsi/scsi_lib.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index
> 19125d7..a821593 100644
> --- a/drivers/scsi/scsi_lib.c
> +++ b/drivers/scsi/scsi_lib.c
> @@ -1850,7 +1850,7 @@ static int scsi_mq_prep_fn(struct request *req)
> 
>         /* zero out the cmd, except for the embedded scsi_request */
>         memset((char *)cmd + sizeof(cmd->req), 0,
> -               sizeof(*cmd) - sizeof(cmd->req));
> +               sizeof(*cmd) - sizeof(cmd->req) +
> + shost->hostt->cmd_size);
> 
>         req->special = cmd;
> 
> --
> 2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ