[v6.1] kernel BUG in dbFindBits

0 views
Skip to first unread message

syzbot

unread,
Nov 22, 2023, 5:15:30 AM11/22/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 69e434a1cb21 Linux 6.1.63
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=17218c58e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=cb9f1be873e58e15
dashboard link: https://syzkaller.appspot.com/bug?extid=306b27816dcf842bc83d
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/042eff9b94a8/disk-69e434a1.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/dce36c399f65/vmlinux-69e434a1.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c40f6d7a93b8/bzImage-69e434a1.xz

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

BUG at fs/jfs/jfs_dmap.c:3010 assert(bitno < 32)
------------[ cut here ]------------
kernel BUG at fs/jfs/jfs_dmap.c:3010!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 32621 Comm: syz-executor.3 Not tainted 6.1.63-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
RIP: 0010:dbFindBits+0x1c8/0x1d0 fs/jfs/jfs_dmap.c:3010
Code: 97 bd 81 07 0f 0b e8 37 f9 84 fe 48 c7 c7 60 51 24 8b 48 c7 c6 a0 4e 24 8b ba c2 0b 00 00 48 c7 c1 40 59 24 8b e8 71 bd 81 07 <0f> 0b 66 0f 1f 44 00 00 55 41 57 41 56 41 55 41 54 53 48 83 ec 50
RSP: 0018:ffffc900034ff980 EFLAGS: 00010246
RAX: 0000000000000030 RBX: 0000000000000000 RCX: cbab8d4b8d89f300
RDX: ffffc900129fc000 RSI: 0000000000005655 RDI: 0000000000005656
RBP: 0000000000000020 R08: ffffffff816e155c R09: fffff5200069fed1
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000008
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000003
FS: 00007f357e46a6c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055b5972a3000 CR3: 0000000027b3e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000f80
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
dbAllocDmapLev+0x1e3/0x490 fs/jfs/jfs_dmap.c:1976
dbAllocCtl+0x113/0x920 fs/jfs/jfs_dmap.c:1816
dbAllocAG+0x28b/0x10b0 fs/jfs/jfs_dmap.c:1357
dbDiscardAG+0x34e/0xa10 fs/jfs/jfs_dmap.c:1606
jfs_ioc_trim+0x42f/0x660 fs/jfs/jfs_discard.c:100
jfs_ioctl+0x2cc/0x3e0 fs/jfs/ioctl.c:131
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f357d67cae9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f357e46a0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f357d79bf80 RCX: 00007f357d67cae9
RDX: 0000000020000680 RSI: 00000000c0185879 RDI: 0000000000000006
RBP: 00007f357d6c847a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f357d79bf80 R15: 00007ffc6d996148
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:dbFindBits+0x1c8/0x1d0 fs/jfs/jfs_dmap.c:3010
Code: 97 bd 81 07 0f 0b e8 37 f9 84 fe 48 c7 c7 60 51 24 8b 48 c7 c6 a0 4e 24 8b ba c2 0b 00 00 48 c7 c1 40 59 24 8b e8 71 bd 81 07 <0f> 0b 66 0f 1f 44 00 00 55 41 57 41 56 41 55 41 54 53 48 83 ec 50
RSP: 0018:ffffc900034ff980 EFLAGS: 00010246
RAX: 0000000000000030 RBX: 0000000000000000 RCX: cbab8d4b8d89f300
RDX: ffffc900129fc000 RSI: 0000000000005655 RDI: 0000000000005656
RBP: 0000000000000020 R08: ffffffff816e155c R09: fffff5200069fed1
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000008
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000003
FS: 00007f357e46a6c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055d718cfcc08 CR3: 0000000027b3e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000f80
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400


---
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.

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

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

syzbot

unread,
Feb 19, 2024, 9:32:27 PMFeb 19
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 8b4118fabd6e Linux 6.1.78
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=16c31ce8180000
kernel config: https://syzkaller.appspot.com/x/.config?x=88ef89f70d190671
dashboard link: https://syzkaller.appspot.com/bug?extid=306b27816dcf842bc83d
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16aba064180000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=132a2752180000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/081869225fc6/disk-8b4118fa.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/d2352caf51d2/vmlinux-8b4118fa.xz
kernel image: https://storage.googleapis.com/syzbot-assets/43ad130ed88b/Image-8b4118fa.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/83ad4547b33c/mount_0.gz

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

loop0: detected capacity change from 0 to 32768
BUG at fs/jfs/jfs_dmap.c:3028 assert(bitno < 32)
------------[ cut here ]------------
kernel BUG at fs/jfs/jfs_dmap.c:3028!
Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 4221 Comm: syz-executor714 Not tainted 6.1.78-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : dbFindBits+0x1e0/0x1e4 fs/jfs/jfs_dmap.c:3028
lr : dbFindBits+0x1e0/0x1e4 fs/jfs/jfs_dmap.c:3028
sp : ffff80001db66b90
x29: ffff80001db66b90 x28: 00000000ffffffff x27: 1ffff00003b6cd7c
x26: dfff800000000000 x25: 0000000000000000 x24: 0000000000000000
x23: ffff800015ddb450 x22: 0000000000000020 x21: 0000000000000000
x20: 0000000000000001 x19: 0000000000000000 x18: ffff80001db660e0
x17: 0000000000000000 x16: ffff800012156ecc x15: 0000000000000000
x14: 00000000ffffffff x13: 0000000000000001 x12: 0000000000000001
x11: 0000000000ff0100 x10: 0000000000000000 x9 : 291149de4d5d2700
x8 : 291149de4d5d2700 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff80001db66498 x4 : ffff800015922b60 x3 : ffff80000aa8ba4c
x2 : ffff0001b437dcd0 x1 : 0000000100000000 x0 : 0000000000000030
Call trace:
dbFindBits+0x1e0/0x1e4 fs/jfs/jfs_dmap.c:3028
dbAllocDmapLev+0x194/0x414 fs/jfs/jfs_dmap.c:1983
dbAllocCtl+0x104/0x844 fs/jfs/jfs_dmap.c:1823
dbAllocAG+0x208/0xe4c fs/jfs/jfs_dmap.c:1364
dbAlloc+0x520/0xb68 fs/jfs/jfs_dmap.c:888
dtSplitUp fs/jfs/jfs_dtree.c:979 [inline]
dtInsert+0xab0/0x54f4 fs/jfs/jfs_dtree.c:868
jfs_create+0x698/0xa1c fs/jfs/namei.c:137
lookup_open fs/namei.c:3484 [inline]
open_last_lookups fs/namei.c:3552 [inline]
path_openat+0xeac/0x2548 fs/namei.c:3782
do_filp_open+0x1bc/0x3cc fs/namei.c:3812
do_sys_openat2+0x128/0x3d8 fs/open.c:1318
do_sys_open fs/open.c:1334 [inline]
__do_sys_openat fs/open.c:1350 [inline]
__se_sys_openat fs/open.c:1345 [inline]
__arm64_sys_openat+0x1f0/0x240 fs/open.c:1345
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
Code: 900463a3 91110063 52817a82 959630d7 (d4210000)
---[ end trace 0000000000000000 ]---


---
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.
Reply all
Reply to author
Forward
0 new messages