From: CJ <firefly0158@163.com>
To: luisbg@kernel.org, salah.triki@gmail.com
Cc: linux-kernel@vger.kernel.org
Subject: [BUG] befs: UBSAN shift-out-of-bounds in befs_check_sb
Date: Tue, 15 Sep 2026 14:55:42 +0800 (CST) [thread overview]
Message-ID: <65089c18.5b94.1a0a3d99c5d.Coremail.firefly0158@163.com> (raw)
Hi,
I am reporting a UBSAN shift-out-of-bounds during befs mount, triggered by a
syzkaller reproducer that mounts a crafted befs image. The issue is reproducible
with HEAD commit cee9395acd8043be0644b25c34bfa86623f2b935 (v7.3-rc1, Linux
7.3.0-rc1).
The reproducer mounts a crafted befs filesystem image on a loop device; the
console shows loop0 detected with a capacity of 128 blocks and then the
sanitizer report from the mount path.
UBSAN reports a shift-out-of-bounds at fs/befs/super.c:96:9 with a shift exponent
of 2066842816, which is far outside the width of the 32-bit int being shifted.
The call path is befs_check_sb, reached from befs_fill_super. One detail worth
noting for anyone reproducing this: in the console captured on v7.3-rc1 the
report's file path is printed as a kernel build directory path rather than
fs/befs/super.c, because the test kernel was built with its source tree in a
different location; the source line and column (super.c:96:9) are the same as in
the original report.
One possible cause is that a superblock field read from the crafted image is used
as a shift amount without being range-checked, so the shift is undefined. This
looks like a missing validation of an on-disk field. I am reporting the
sanitizer finding and the path as observed.
This appears to be a recurrence of the syzbot issue whose external id is
affd78fff833c2695d02. It remains reproducible on v7.3-rc1.
Reproducer:
syz reproducer: https://pastebin.com/raw/ST4qEfkS
console output: https://pastebin.com/raw/y4dK6p7e
kernel config: https://pastebin.com/raw/vwQnQM1r
Kernel:
HEAD commit: cee9395acd8043be0644b25c34bfa86623f2b935
git tree: upstream (linux.git), tested through the v7.3-rc1 annotated tag object
e5e04726cdd043e309677071ab1b65a4b18f422b
kernel version: 7.3.0-rc1 #1 PREEMPT(full)
tested tag: v7.3-rc1 (Linux 7.3-rc1, 2026-08-30)
Let me know if you need more details or testing.
Best regards,
Changjian
reply other threads:[~2026-09-15 6:55 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=65089c18.5b94.1a0a3d99c5d.Coremail.firefly0158@163.com \
--to=firefly0158@163.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luisbg@kernel.org \
--cc=salah.triki@gmail.com \
/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®