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: <aSh+Ip1XJQ2mMH6q@e129823.arm.com>
Date: Thu, 27 Nov 2025 16:36:50 +0000
From: Yeoreum Yun <yeoreum.yun@....com>
To: Kevin Brodsky <kevin.brodsky@....com>
Cc: linux-hardening@...r.kernel.org, linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andy Lutomirski <luto@...nel.org>,
	Catalin Marinas <catalin.marinas@....com>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	David Howells <dhowells@...hat.com>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Jann Horn <jannh@...gle.com>, Jeff Xu <jeffxu@...omium.org>,
	Joey Gouly <joey.gouly@....com>, Kees Cook <kees@...nel.org>,
	Linus Walleij <linus.walleij@...aro.org>,
	Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
	Marc Zyngier <maz@...nel.org>, Mark Brown <broonie@...nel.org>,
	Matthew Wilcox <willy@...radead.org>,
	Maxwell Bland <mbland@...orola.com>,
	"Mike Rapoport (IBM)" <rppt@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Pierre Langlois <pierre.langlois@....com>,
	Quentin Perret <qperret@...gle.com>,
	Ryan Roberts <ryan.roberts@....com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Vlastimil Babka <vbabka@...e.cz>, Will Deacon <will@...nel.org>,
	linux-arm-kernel@...ts.infradead.org, linux-mm@...ck.org,
	x86@...nel.org
Subject: Re: [RFC PATCH v2 3/8] slab: Introduce SLAB_SET_PKEY

Hi Kevin,

[...]
>  static __fastpath_inline
> @@ -4920,6 +4963,7 @@ __do_krealloc(const void *p, size_t new_size, gfp_t flags)
>  	/* Zero out spare memory. */
>  	if (want_init_on_alloc(flags)) {
>  		kasan_disable_current();
> +		guard(kpkeys_slab_write)(s);
>  		if (orig_size && orig_size < new_size)
>  			memset(kasan_reset_tag(p) + orig_size, 0, new_size - orig_size);
>  		else

guard(kpkeys_slab_write)(s) will trigger NULL-pointer access
if *p* is allocated via kmalloc_large_noprof()
(no kmem_cache, allocated via page_alloc()).

IOW, "s" could be *NULL* in here.

[...]

Thanks.

--
Sincerely,
Yeoreum Yun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ