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: <8481ec6f-9f8a-4f76-8ab7-b45e38cc8d40@vivo.com>
Date: Tue, 20 Aug 2024 09:25:30 +0000
From: Chunhai Guo <guochunhai@...o.com>
To: Gao Xiang <hsiangkao@...ux.alibaba.com>, "linux-erofs@...ts.ozlabs.org"
	<linux-erofs@...ts.ozlabs.org>
CC: LKML <linux-kernel@...r.kernel.org>, "stable@...r.kernel.org"
	<stable@...r.kernel.org>, Chunhai Guo <guochunhai@...o.com>
Subject: Re: [PATCH] erofs: fix out-of-bound access when
 z_erofs_gbuf_growsize() partially fails

在 2024/8/20 16:42, Gao Xiang 写道:
> If z_erofs_gbuf_growsize() partially fails on a global buffer due to
> memory allocation failure or fault injection (as reported by syzbot [1]),
> new pages need to be freed by comparing to the existing pages to avoid
> memory leaks.
>
> However, the old gbuf->pages[] array may not be large enough, which can
> lead to null-ptr-deref or out-of-bound access.
>
> Fix this by checking against gbuf->nrpages in advance.
>
> Fixes: d6db47e571dc ("erofs: do not use pagepool in z_erofs_gbuf_growsize()")
> Cc: <stable@...r.kernel.org> # 6.10+
> Cc: Chunhai Guo <guochunhai@...o.com>
> Signed-off-by: Gao Xiang <hsiangkao@...ux.alibaba.com>
>
Reviewed-by: Chunhai Guo <guochunhai@...o.com>

Thanks,

Chunhai Guo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ