[syzbot] [jfs?] WARNING in dbAdjTree

14 views
Skip to first unread message

syzbot

unread,
Jan 18, 2024, 2:38:23 AMJan 18
to jfs-dis...@lists.sourceforge.net, linux-...@vger.kernel.org, linux-...@vger.kernel.org, sha...@kernel.org, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 052d534373b7 Merge tag 'exfat-for-6.8-rc1' of git://git.ke..
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=140a08b3e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=36f64072074e3eab
dashboard link: https://syzkaller.appspot.com/bug?extid=ab18fa9c959320611727
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15b39935e80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10d619f5e80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/395e14e0d581/disk-052d5343.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/d3c73d08be99/vmlinux-052d5343.xz
kernel image: https://storage.googleapis.com/syzbot-assets/80968415c40b/bzImage-052d5343.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/d58cff47d922/mount_0.gz

Bisection is inconclusive: the issue happens on the oldest tested release.

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=142eec2be80000
final oops: https://syzkaller.appspot.com/x/report.txt?x=162eec2be80000
console output: https://syzkaller.appspot.com/x/log.txt?x=122eec2be80000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+ab18fa...@syzkaller.appspotmail.com

------------[ cut here ]------------
WARNING: CPU: 0 PID: 109 at fs/jfs/jfs_dmap.c:2879 dbAdjTree+0x2d9/0x3d0 fs/jfs/jfs_dmap.c:2879
Modules linked in:
CPU: 0 PID: 109 Comm: jfsCommit Not tainted 6.7.0-syzkaller-09928-g052d534373b7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
RIP: 0010:dbAdjTree+0x2d9/0x3d0 fs/jfs/jfs_dmap.c:2879
Code: e8 4c 13 8d fe 0f b6 14 24 38 da 0f 85 a1 fe ff ff 48 83 c4 18 5b 5d 41 5c 41 5d 41 5e 41 5f e9 7d 18 8d fe e8 78 18 8d fe 90 <0f> 0b 90 eb e2 e8 0d 8f e4 fe e9 52 fe ff ff e8 03 8f e4 fe e9 79
RSP: 0018:ffffc900020bfa88 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000155 RCX: ffffffff82faf5c9
RDX: ffff8880197f3b80 RSI: ffffffff82faf828 RDI: 0000000000000004
RBP: ffff8880231c4010 R08: 0000000000000004 R09: 0000000000000155
R10: 0000000000030056 R11: ffffffff8acf1fa0 R12: 0000000000000004
R13: 0000000000030056 R14: ffff8880231c4010 R15: 0000000000000001
FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f67c3d5d130 CR3: 000000000cf79000 CR4: 0000000000350ef0
Call Trace:
<TASK>
dbJoin+0x267/0x2c0 fs/jfs/jfs_dmap.c:2847
dbFreeBits+0x15c/0x8f0 fs/jfs/jfs_dmap.c:2338
dbFreeDmap+0x62/0x1a0 fs/jfs/jfs_dmap.c:2087
dbFree+0x266/0x550 fs/jfs/jfs_dmap.c:409
txFreeMap+0x9a9/0xe60 fs/jfs/jfs_txnmgr.c:2534
txUpdateMap+0x3f1/0xd10 fs/jfs/jfs_txnmgr.c:2330
txLazyCommit fs/jfs/jfs_txnmgr.c:2664 [inline]
jfs_lazycommit+0x5e4/0xb20 fs/jfs/jfs_txnmgr.c:2733
kthread+0x2c6/0x3a0 kernel/kthread.c:388
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242
</TASK>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#bisection

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

Edward Adam Davis

unread,
Jan 23, 2024, 8:38:44 PMJan 23
to syzbot+ab18fa...@syzkaller.appspotmail.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
please test WARNING in dbAdjTree

#syz test upstream

diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c
index 8eec84c651bf..bed14d5169f8 100644
--- a/fs/jfs/jfs_dmap.c
+++ b/fs/jfs/jfs_dmap.c
@@ -2294,6 +2294,7 @@ static int dbFreeBits(struct bmap * bmp, struct dmap * dp, s64 blkno,
*/
dbitno = blkno & (BPERDMAP - 1);
word = dbitno >> L2DBWORD;
+ printk("dbitno: %d, blkno: %ld, word: %d, %s\n", dbitno, blkno, word, __func__);

/* block range better be within the dmap.
*/
@@ -2875,8 +2876,9 @@ static void dbAdjTree(dmtree_t *tp, int leafno, int newval, bool is_ctl)
/* pick up the index of the leaf for this leafno.
*/
lp = leafno + le32_to_cpu(tp->dmt_leafidx);
+ printk("lp: %d, leafno: %d, tp: %p, %s\n", lp, leafno, tp, __func__);

- if (WARN_ON_ONCE(lp >= size || lp < 0))
+ if (lp >= size || lp < 0)
return;

/* is the current value the same as the old value ? if so,

syzbot

unread,
Jan 23, 2024, 8:38:57 PMJan 23
to ead...@qq.com, ead...@qq.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
> please test WARNING in dbAdjTree
>
> #syz test upstream

want either no args or 2 args (repo, branch), got 1

Edward Adam Davis

unread,
Jan 23, 2024, 8:43:23 PMJan 23
to syzbot+ab18fa...@syzkaller.appspotmail.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
please test WARNING in dbAdjTree

#syz test upstream master

syzbot

unread,
Jan 23, 2024, 8:43:27 PMJan 23
to ead...@qq.com, ead...@qq.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
> please test WARNING in dbAdjTree
>
> #syz test upstream master

"upstream" does not look like a valid git repo address.

Edward Adam Davis

unread,
Jan 23, 2024, 8:45:15 PMJan 23
to syzbot+ab18fa...@syzkaller.appspotmail.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
please test WARNING in dbAdjTree

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

syzbot

unread,
Jan 23, 2024, 10:13:10 PMJan 23
to ead...@qq.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+ab18fa...@syzkaller.appspotmail.com

Tested on:

commit: 615d3006 Merge tag 'trace-v6.8-rc1' of git://git.kerne..
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
console output: https://syzkaller.appspot.com/x/log.txt?x=1455ed8be80000
kernel config: https://syzkaller.appspot.com/x/.config?x=d4460091fe9fceda
dashboard link: https://syzkaller.appspot.com/bug?extid=ab18fa9c959320611727
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=171ad715e80000

Note: testing is done by a robot and is best-effort only.
Reply all
Reply to author
Forward
0 new messages