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: <bb060ac3-b413-6db7-9738-0774764a9457@oracle.com>
Date:   Fri, 18 Nov 2022 16:02:59 -0600
From:   Mike Christie <michael.christie@...cle.com>
To:     Denis Arefev <arefev@...mel.ru>, Varun Prakash <varun@...lsio.com>
Cc:     "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        lvc-project@...uxtesting.org, trufanov@...mel.ru, vfh@...mel.ru
Subject: Re: [PATCH v2] cxgbi: cxgb4i: Added pointer check

Replace Karen with Varun.

On 11/18/22 6:17 AM, Denis Arefev wrote:
> Return value of a function 'alloc_wr' is dereferenced at cxgb4i.c:624
> without checking for null, but it is usually checked for this function
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Signed-off-by: Denis Arefev <arefev@...mel.ru>
> ---
>  drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
> index 2c3491528d42..b93bd36dcb2d 100644
> --- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
> +++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
> @@ -620,6 +620,8 @@ static inline int send_tx_flowc_wr(struct cxgbi_sock *csk)
>  #endif
>  	flowclen16 = tx_flowc_wr_credits(&nparams, &flowclen);
>  	skb = alloc_wr(flowclen, 0, GFP_ATOMIC);
> +	if (!skb)
> +		return -ENOMEM;

If this returns a negative value push_tx_frames is going to mishandle it.
I'm not sure how to best handle the failure there, but I cc'd the correct
maintainer, Varun.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ