From: CJ <firefly0158@163.com>
To: shaggy@kernel.org
Cc: jfs-discussion@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: [BUG] jfs: assertion failure in dbFindBits on a crafted image
Date: Mon, 21 Sep 2026 17:51:22 +0800 (CST) [thread overview]
Message-ID: <437bdf1f.9505.1a0c3609896.Coremail.firefly0158@163.com> (raw)
Hi,
I am reporting an issue triggered by a syzkaller reproducer on Linux
7.3.0-rc2. The issue is reproducible with HEAD commit
df2908090cda368b01ff43709f51890076c56157.
The reproducer mounts a crafted JFS image with errors=continue, usrquota and
integrity options, then creates a directory entry on it. Creating the entry
makes JFS extend the directory, which allocates blocks and walks the block
allocation map.
During allocation, dbFindBits() scans a 32-bit word of the allocation map
looking for a run of free bits at the requested alignment. No run is found
and the loop runs off the end of the word, so the ASSERT(bitno < 32) inside
dbFindBits() terminates the kernel. The call path is dbAlloc() ->
dbAllocAG() -> dbAllocCtl() -> dbAllocDmapLev() -> dbFindBits(), reached
from jfs_create() in the mkdir/open syscall context.
This looks like an inconsistency between the on-disk allocation map and the
extent the filesystem believes it can satisfy: the allocation request asks
for more contiguous free bits than the map page contains. Since the input is
an untrusted image, turning the allocation failure into an error return
rather than an assertion would avoid taking the kernel down. I have not
traced which map field is inconsistent with the request.
This failure was reported earlier against the linux-6.1 longterm series at
https://syzkaller.appspot.com/bug?extid=306b27816dcf842bc83d, and the
reproducer below is the one from that report. It still reproduces on the
tested mainline kernel.
Reproducer:
syz reproducer: https://pastebin.com/raw/rXbMZeh6
console output: https://pastebin.com/raw/3MdsjDPn
kernel config: https://syzkaller.appspot.com/text?tag=KernelConfig&x=68aa5a3af1cb953a
Kernel:
HEAD commit: df2908090cda368b01ff43709f51890076c56157
git tree: mainline
kernel version: 7.3.0-rc2
tested tag: v7.3-rc2 (annotated tag object 5e036ce12de91c6fd674dad33b169c6150be2a7a)
Let me know if you need more details or testing.
Best regards,
Changjian Liu
reply other threads:[~2026-09-21 9:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=437bdf1f.9505.1a0c3609896.Coremail.firefly0158@163.com \
--to=firefly0158@163.com \
--cc=jfs-discussion@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=shaggy@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®