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]
Date:   Thu, 2 Feb 2023 13:08:51 +0100
From:   Greg KH <greg@...ah.com>
To:     Zheng Wang <zyytlz.wz@....com>
Cc:     colyli@...e.de, hackerzheng666@...il.com,
        kent.overstreet@...il.com, linux-bcache@...r.kernel.org,
        linux-kernel@...r.kernel.org, security@...nel.org,
        alex000young@...il.com
Subject: Re: [PATCH] bcache: Fix a NULL or wild pointer dereference in
 btree_split

On Thu, Feb 02, 2023 at 07:05:43PM +0800, Zheng Wang wrote:
> In btree_split, btree_node_alloc_replacement() is assigned to
> n1 and return error code or NULL on failure. n1->c->cache is
> passed to block_bytes. So there is a dereference of it
>  without checks, which may lead to wild pointer dereference or
>   NULL pointer dereference depending on n1. The initial code only
>   judge the error code but igore the NULL pointer.
> So does n2 and n3.
> 
> Fix this bug by adding IS_ERR_OR_NULL check of n1, n2 and n3.
> 
> Note that, as a bug found by static analysis, it can be a false
> positive or hard to trigger.
> 
> Fixes: cafe56359144 ("bcache: A block layer cache")
> Signed-off-by: Zheng Wang <zyytlz.wz@....com>
> ---
>  drivers/md/bcache/btree.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Note, there is no need to cc: security@k.o on any of these patches that
you send to public mailing lists, as the development and discussion of
them should happen there instead.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ