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: <a9c64598-41e9-4ec8-8ec1-add5a5f903b4@intel.com>
Date: Mon, 11 Aug 2025 16:21:32 +0200
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Nathan Chancellor <nathan@...nel.org>
CC: Kees Cook <kees@...nel.org>, "Gustavo A. R. Silva"
	<gustavoars@...nel.org>, Bill Wendling <morbo@...gle.com>, Justin Stitt
	<justinstitt@...gle.com>, <linux-hardening@...r.kernel.org>,
	<llvm@...ts.linux.dev>, <patches@...ts.linux.dev>
Subject: Re: [PATCH] hardening: Require clang 20.1.0 for __counted_by

From: Nathan Chancellor <nathan@...nel.org>
Date: Thu, 07 Aug 2025 14:36:28 -0700

> After an innocuous change in -next that modified a structure that
> contains __counted_by, clang-19 start crashing when building certain
> files in drivers/gpu/drm/xe. When assertions are enabled, the more
> descriptive failure is:
> 
>   clang: clang/lib/AST/RecordLayoutBuilder.cpp:3335: const ASTRecordLayout &clang::ASTContext::getASTRecordLayout(const RecordDecl *) const: Assertion `D && "Cannot get layout of forward declarations!"' failed.
> 
> According to a reverse bisect, a tangential change to the LLVM IR
> generation phase of clang during the LLVM 20 development cycle [1]
> resolves this problem. Bump the version of clang that enables
> CONFIG_CC_HAS_COUNTED_BY to 20.1.0 to ensure that this issue cannot be
> hit.

Any chance for this to go to the next 19.x (if it's planned at all)?
I always use the latest HEAD from llvm-project, but 19 is still widely
used across distros etc =\

> 
> Link: https://github.com/llvm/llvm-project/commit/160fb1121cdf703c3ef5e61fb26c5659eb581489 [1]
> Signed-off-by: Nathan Chancellor <nathan@...nel.org>
> ---
> Should this be marked for stable? If this makes 6.17 final, I think we
> are fine for mainline and newer but I wonder if a patch that adds
> __counted_by to a structure would ever be backported and expose this
> problem there.

Thanks,
Olek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ