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] [day] [month] [year] [list]
Message-ID: <20210624122957.GA2879416@nvidia.com>
Date:   Thu, 24 Jun 2021 09:29:57 -0300
From:   Jason Gunthorpe <jgg@...dia.com>
To:     Colin King <colin.king@...onical.com>
Cc:     Selvin Xavier <selvin.xavier@...adcom.com>,
        Devesh Sharma <devesh.sharma@...adcom.com>,
        Naresh Kumar PBS <nareshkumar.pbs@...adcom.com>,
        Doug Ledford <dledford@...hat.com>,
        Leon Romanovsky <leon@...nel.org>, linux-rdma@...r.kernel.org,
        kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next][V2] RDMA/bnxt_re: Fix uninitialized struct bit
 field rsvd1

On Wed, Jun 23, 2021 at 07:24:37PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> The bit field rsvd1 in resp is not being initialized and garbage data
> is being copied from the stack back to userspace via the ib_copy_to_udata
> call. Fix this by setting the entire struct resp to zero; this will ensure
> that further new bit fields in the future will be zero'd too.
> 
> Addresses-Coverity: ("Uninitialized scalar variable")
> Fixes: 879740517dab ("RDMA/bnxt_re: Update ABI to pass wqe-mode to user space")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
> 
> V2: set entire struct resp to zero rather than the new field. Thanks to
>     Jason Gunthorpe for suggesting this improved fix.
> 
> ---
>  drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next, thanks

I amended it to remove the now redundant  = 0's.

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ