🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #622

Bug#1148364: riscv64: strnlen() returns a truncated length for very large count, breaking ACPI name resolution (AE_AML_NAME_NOT_...

#622
From: Aurelien Jarno
Date: Mon, 12 Oct 2026 18:50
39 lines
3663 bytes
Hi,

On 2026-09-19 11:50, Aurelien Jarno wrote:
> control: forwarded -1 https://lore.kernel.org/all/20260915152656708z04s4oSYY2BGj34F36RZa@zte.com.cn/
> control: forcemerge -1 1148365
> 
> Hi,
> 
> On 2026-09-19 16:49, Lufei Zheng wrote:
> > Package: linux-image-7.1.13+deb14-riscv64
> > Version: 7.1.13-1
> > Severity: important
> > Tags: upstream
> > X-Debbugs-Cc: debian-riscv@lists.debian.org
> > 
> > Dear maintainers,
> > 
> > arch/riscv/lib/strnlen.S has an integer-overflow bug: for a very large `count` (in practice `(size_t)-1`) the address computation `s + count` wraps around 2^64, the loop bound becomes smaller than the start address, and strnlen() returns a length derived only from the first machine word(typically 8).  The same wrap exists in the byte-loop fallback.
> 
> The issue has been reported upstream with a patch [1], but it is still 
> under review. If you can test it and send a Tested-by: that would help 
> the patch to get accepted faster.
> 
> It will get added to the debian kernel once it get fixed upstream.

The patch got merged upstream in 7.3-rc7 and is is queued for the 
7.2.11 stable release.

Regards
Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                     http://aurel32.net
Technical Details
Message-ID: <NNtfX-57Ev-1@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomod
References: <NEZ5n-vQv-1@gated-at.bofh.it> <NEZ5n-vQv-1@gated-at.bofh.it> <NF01s-wmw-9@gated-at.bofh.it> <NEZ5n-vQv-1@gated-at.bofh.it> <NF01s-wmw-9@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomod
From: Aurelien Jarno <aurel32@debian.org>
Newsgroups: linux.debian.bugs.dist,linux.debian.kernel
Subject: Bug#1148364: riscv64: strnlen() returns a truncated length for very large count, breaking ACPI name resolution (AE_AML_NAME_NOT_FOUND flood at boot)
Date: Mon, 12 Oct 2026 20:50:01 +0200
Message-ID: <NNtfX-57Ev-1@gated-at.bofh.it>
References: <NEZ5n-vQv-1@gated-at.bofh.it> <NEZ5n-vQv-1@gated-at.bofh.it> <NF01s-wmw-9@gated-at.bofh.it> <NEZ5n-vQv-1@gated-at.bofh.it> <NF01s-wmw-9@gated-at.bofh.it>
X-Original-To: 1148364@bugs.debian.org
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Mon Oct 12 18:41:16 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.699
Reply-To: Aurelien Jarno <aurel32@debian.org>, 1148364@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: debian-kernel@lists.debian.org
X-Debian-Pr-Message: followup 1148364
X-Debian-Pr-Package: src:linux
X-Debian-Pr-Keywords: upstream
X-Debian-Pr-Source: linux
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
User-Agent: Mutt/2.4.1 (2026-07-04)
X-Debian-User: aurel32
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/1996449
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 39
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Cc: Lufei Zheng <lufei.zheng@spacemit.com>
X-Original-Date: Mon, 12 Oct 2026 20:38:25 +0200
X-Original-Message-ID: <as0pIX0RiDiyrGwR@aurel32.net>
X-Original-References: <446002886bbbf01e9217ad222d686ef2ad1051a8.dcaa59ac.cf3c.4165.b441.5426e7bd314a@feishu.cn> <446002886bbbf01e9217ad222d686ef2ad1051a8.dcaa59ac.cf3c.4165.b441.5426e7bd314a@feishu.cn> <aq5azMOUIP8TSl24@aurel32.net> <446002886bbbf01e9217ad222d686ef2ad1051a8.dcaa59ac.cf3c.4165.b441.5426e7bd314a@feishu.cn> <aq5azMOUIP8TSl24@aurel32.net>