Article View: muc.lists.freebsd.bugs
Article #118[Bug 299430] ext2fs: fix out-of-bounds write in ext4_ext_find_extent() for maximum-depth (5) extent trees
From: bugzilla-noreply
Date: Fri, 16 Oct 2026 05:28
Date: Fri, 16 Oct 2026 05:28
55 lines
3596 bytes
3596 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=299430
Bug ID: 299430
Summary: ext2fs: fix out-of-bounds write in
ext4_ext_find_extent() for maximum-depth (5) extent
trees
Product: Base System
Version: Unspecified
Hardware: Any
OS: Any
Status: New
Severity: Affects Many People
Priority: ---
Component: kern
Assignee: bugs@FreeBSD.org
Reporter: david@crap.solutions
Created attachment 275747
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=275747&action=edit
fix out-of-bounds write in ext4_ext_find_extent()
ext4_ext_find_extent() allocates EXT4_EXT_DEPTH_MAX (5) struct ext4_extent_path
entries, but
the tree walk stores path[0] through path[depth], inclusive. A filesystem whose
inode extent
header has eh_depth == EXT4_EXT_DEPTH_MAX therefore writes path[5], one entry
past the
allocation.
eh_depth 5 is a valid on-disk value (the maximum extent depth, reached by large
files grown
over time); Linux's EXT4_MAX_EXTENT_DEPTH is likewise 5 and ext4_find_extent()
rejects only
depths greater than that.
Reproduce: Mount an ext4 filesystem crafted with an inode whose extent header
has eh_depth
5. Reproduced on 16-CURRENT in a bhyve guest: MemGuard guard-page fault in
ext4_ext_find_extent().
--
You are receiving this mail because:
You are the assignee for the bug.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID:
<bug-299430-227@https.bugs.freebsd.org/bugzilla/>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail From: bugzilla-noreply@freebsd.org Newsgroups: muc.lists.freebsd.bugs Subject: [Bug 299430] ext2fs: fix out-of-bounds write in ext4_ext_find_extent() for maximum-depth (5) extent trees Date: Fri, 16 Oct 2026 05:28:34 +0000 Organization: Newsgate at muc.de e.V. Sender: owner-freebsd-bugs@FreeBSD.org Approved: news-admin@muc.de Distribution: world Message-ID: <bug-299430-227@https.bugs.freebsd.org/bugzilla/> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2"; logging-data="63180"; mail-complaints-to="news-admin@muc.de" X-Original-To: bugs@mlmmj.nyi.freebsd.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1792128515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c+2browLMKHG2tNG8ojeREUkRF2kNe9cK+kRXuJIkQ4=; b=ufuuDe2JWxLRTaulW+EwVx/2lMsW5eCtXi20gE7x2YpHBTnkVMMVjeJfbdnqpPHfYfHmzP TOkJo4mz3Z+OJTB4oZPmTv4JB56PfszWlwjkiyw0PvbjrInCixrW8Khwvm+YwrGlx+7Uo9 Pkt+9CMafJpg5P7PshAL1VDDAKGJw2GAtKyBaFD2CpVGU7Dpc5c+u4PVF/8ceWE2UFRXI5 rCW3j7Mr//+jr+Vz7fX4v3Caf/i1MjA6kPspt//K6wGQXwk8Rhs3YYqQpbiU7aungBYCA5 14DqwQNhjFiyG+EujVgayKJ3jNBR0+215UDDmhxCB6hrBk5lNriI2ZqzajsPxw== X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f Auto-Submitted: auto-generated Precedence: list X-Newsgate-Id: f02c70b8849f+ X-No-Archive: Yes