[hfs?] WARNING in hfs_bmap_alloc

5 views
Skip to first unread message

syzbot

unread,
Dec 22, 2022, 2:56:39 PM12/22/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=17f243b4480000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=55c191dd9f8441d6123a
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/98c0bdb4abb3/disk-3f8a27f9.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ea228ff02669/vmlinux-3f8a27f9.xz

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

------------[ cut here ]------------
WARNING: CPU: 0 PID: 6608 at fs/hfs/bnode.c:431 hfs_bnode_create.cold+0x27/0x4e fs/hfs/bnode.c:431
Kernel panic - not syncing: panic_on_warn set ...

hfs_bmap_alloc+0xfe/0x5e0 fs/hfs/btree.c:263
hfs_btree_inc_height.isra.0+0xe6/0x950 fs/hfs/brec.c:471
hfs_brec_insert+0x97f/0xbb0 fs/hfs/brec.c:77
__hfs_ext_write_extent+0x3ec/0x510 fs/hfs/extent.c:124
__hfs_ext_cache_extent fs/hfs/extent.c:174 [inline]
hfs_ext_read_extent+0x810/0xa20 fs/hfs/extent.c:202
hfs_extend_file+0x4a0/0xac0 fs/hfs/extent.c:401
hfs_get_block+0x17b/0x7e0 fs/hfs/extent.c:353
__block_write_begin_int+0x46c/0x17b0 fs/buffer.c:1978
__block_write_begin fs/buffer.c:2028 [inline]
block_write_begin+0x58/0x2e0 fs/buffer.c:2087
cont_write_begin+0x55a/0x820 fs/buffer.c:2440
hfs_write_begin+0x87/0x150 fs/hfs/inode.c:58
generic_perform_write+0x1f8/0x4d0 mm/filemap.c:3170
__generic_file_write_iter+0x24b/0x610 mm/filemap.c:3295
generic_file_write_iter+0x3f8/0x730 mm/filemap.c:3323
call_write_iter include/linux/fs.h:1821 [inline]
new_sync_write fs/read_write.c:474 [inline]
__vfs_write+0x51b/0x770 fs/read_write.c:487
vfs_write+0x1f3/0x540 fs/read_write.c:549
ksys_write+0x12b/0x2a0 fs/read_write.c:599
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f3e19e6a0a9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f3e183dc168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f3e19f89f80 RCX: 00007f3e19e6a0a9
RDX: 00000000000ffe00 RSI: 0000000020004200 RDI: 0000000000000004
RBP: 00007f3e183dc1d0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffda1e34e4f R14: 00007f3e183dc300 R15: 0000000000022000
CPU: 0 PID: 6608 Comm: syz-executor.0 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
panic+0x26a/0x50e kernel/panic.c:186
__warn.cold+0x20/0x5a kernel/panic.c:541
report_bug+0x262/0x2b0 lib/bug.c:183
fixup_bug arch/x86/kernel/traps.c:178 [inline]
fixup_bug arch/x86/kernel/traps.c:173 [inline]
do_error_trap+0x1d7/0x310 arch/x86/kernel/traps.c:296
invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:1038
RIP: 0010:hfs_bnode_create.cold+0x27/0x4e fs/hfs/bnode.c:431
Code: 14 07 fa e8 e8 39 6c f9 4c 89 ef e8 70 04 23 00 89 ee 48 c7 c7 e0 9c 7d 88 e8 3d 6b fd ff 48 c7 c7 40 9d 7d 88 e8 31 6b fd ff <0f> 0b e9 b1 1c 07 fa e8 ba 39 6c f9 89 ee 48 c7 c7 40 9a 7d 88 e8
RSP: 0018:ffff888044777290 EFLAGS: 00010282
RAX: 0000000000000024 RBX: dffffc0000000000 RCX: 0000000000000000
hfs: new node 0 already hashed?
RDX: 0000000000040000 RSI: ffffffff814dff01 RDI: ffffed10088eee44
RBP: 0000000000000000 R08: 0000000000000024 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: ffff8880aba63900
R13: ffff8880aa0ba210 R14: ffff8880aa0ba140 R15: 0000000000000000
------------[ cut here ]------------
hfs_bmap_alloc+0x4d6/0x5e0 fs/hfs/btree.c:288
WARNING: CPU: 1 PID: 6610 at fs/hfs/bnode.c:431 hfs_bnode_create.cold+0x27/0x4e fs/hfs/bnode.c:431
hfs_btree_inc_height.isra.0+0xe6/0x950 fs/hfs/brec.c:471
Modules linked in:
CPU: 1 PID: 6610 Comm: syz-executor.3 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:hfs_bnode_create.cold+0x27/0x4e fs/hfs/bnode.c:431
Code: 14 07 fa e8 e8 39 6c f9 4c 89 ef e8 70 04 23 00 89 ee 48 c7 c7 e0 9c 7d 88 e8 3d 6b fd ff 48 c7 c7 40 9d 7d 88 e8 31 6b fd ff <0f> 0b e9 b1 1c 07 fa e8 ba 39 6c f9 89 ee 48 c7 c7 40 9a 7d 88 e8
hfs_brec_insert+0x84d/0xbb0 fs/hfs/brec.c:148
RSP: 0018:ffff88804e897290 EFLAGS: 00010282
RAX: 0000000000000024 RBX: dffffc0000000000 RCX: 0000000000000000
RDX: 0000000000040000 RSI: ffffffff814dff01 RDI: ffffed1009d12e44
__hfs_ext_write_extent+0x3ec/0x510 fs/hfs/extent.c:124
RBP: 0000000000000000 R08: 0000000000000024 R09: 0000000000000000
__hfs_ext_cache_extent fs/hfs/extent.c:174 [inline]
hfs_ext_read_extent+0x810/0xa20 fs/hfs/extent.c:202
R10: 0000000000000005 R11: 0000000000000000 R12: ffff8880ac2a4a00
R13: ffff88805210a6d0 R14: ffff88805210a600 R15: 0000000000000000
FS: 00007f3e183dc700(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f9527b67018 CR3: 00000000a944d000 CR4: 00000000003426e0
hfs_extend_file+0x4a0/0xac0 fs/hfs/extent.c:401
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
hfs_bmap_alloc+0x4d6/0x5e0 fs/hfs/btree.c:288
hfs_get_block+0x17b/0x7e0 fs/hfs/extent.c:353
__block_write_begin_int+0x46c/0x17b0 fs/buffer.c:1978
hfs_btree_inc_height.isra.0+0xe6/0x950 fs/hfs/brec.c:471
__block_write_begin fs/buffer.c:2028 [inline]
block_write_begin+0x58/0x2e0 fs/buffer.c:2087
cont_write_begin+0x55a/0x820 fs/buffer.c:2440
hfs_brec_insert+0x84d/0xbb0 fs/hfs/brec.c:148
__hfs_ext_write_extent+0x3ec/0x510 fs/hfs/extent.c:124
__hfs_ext_cache_extent fs/hfs/extent.c:174 [inline]
hfs_ext_read_extent+0x810/0xa20 fs/hfs/extent.c:202
hfs_write_begin+0x87/0x150 fs/hfs/inode.c:58
hfs_extend_file+0x4a0/0xac0 fs/hfs/extent.c:401
generic_perform_write+0x1f8/0x4d0 mm/filemap.c:3170
hfs_get_block+0x17b/0x7e0 fs/hfs/extent.c:353
__block_write_begin_int+0x46c/0x17b0 fs/buffer.c:1978
__generic_file_write_iter+0x24b/0x610 mm/filemap.c:3295
generic_file_write_iter+0x3f8/0x730 mm/filemap.c:3323
call_write_iter include/linux/fs.h:1821 [inline]
new_sync_write fs/read_write.c:474 [inline]
__vfs_write+0x51b/0x770 fs/read_write.c:487
__block_write_begin fs/buffer.c:2028 [inline]
block_write_begin+0x58/0x2e0 fs/buffer.c:2087
cont_write_begin+0x55a/0x820 fs/buffer.c:2440
vfs_write+0x1f3/0x540 fs/read_write.c:549
ksys_write+0x12b/0x2a0 fs/read_write.c:599
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f1ebeae30a9
hfs_write_begin+0x87/0x150 fs/hfs/inode.c:58
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f1ebd055168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
generic_perform_write+0x1f8/0x4d0 mm/filemap.c:3170
RAX: ffffffffffffffda RBX: 00007f1ebec02f80 RCX: 00007f1ebeae30a9
RDX: 00000000000ffe00 RSI: 0000000020004200 RDI: 0000000000000004
RBP: 00007f1ebd0551d0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffd87d3772f R14: 00007f1ebd055300 R15: 0000000000022000
__generic_file_write_iter+0x24b/0x610 mm/filemap.c:3295
generic_file_write_iter+0x3f8/0x730 mm/filemap.c:3323
call_write_iter include/linux/fs.h:1821 [inline]
new_sync_write fs/read_write.c:474 [inline]
__vfs_write+0x51b/0x770 fs/read_write.c:487
vfs_write+0x1f3/0x540 fs/read_write.c:549
ksys_write+0x12b/0x2a0 fs/read_write.c:599
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f3e19e6a0a9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f3e183dc168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f3e19f89f80 RCX: 00007f3e19e6a0a9
RDX: 00000000000ffe00 RSI: 0000000020004200 RDI: 0000000000000004
RBP: 00007f3e183dc1d0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffda1e34e4f R14: 00007f3e183dc300 R15: 0000000000022000
irq event stamp: 6554
hardirqs last enabled at (6553): [<ffffffff88195174>] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline]
hardirqs last enabled at (6553): [<ffffffff88195174>] _raw_spin_unlock_irq+0x24/0x80 kernel/locking/spinlock.c:192
hardirqs last disabled at (6554): [<ffffffff81003d00>] trace_hardirqs_off_thunk+0x1a/0x1c
softirqs last enabled at (6506): [<ffffffff88400678>] __do_softirq+0x678/0x980 kernel/softirq.c:318
softirqs last disabled at (6367): [<ffffffff813927d5>] invoke_softirq kernel/softirq.c:372 [inline]
softirqs last disabled at (6367): [<ffffffff813927d5>] irq_exit+0x215/0x260 kernel/softirq.c:412
---[ end trace c0ab782fd6b28be8 ]---
Kernel Offset: disabled
Rebooting in 86400 seconds..
----------------
Code disassembly (best guess):
0: 28 00 sub %al,(%rax)
2: 00 00 add %al,(%rax)
4: 75 05 jne 0xb
6: 48 83 c4 28 add $0x28,%rsp
a: c3 retq
b: e8 f1 19 00 00 callq 0x1a01
10: 90 nop
11: 48 89 f8 mov %rdi,%rax
14: 48 89 f7 mov %rsi,%rdi
17: 48 89 d6 mov %rdx,%rsi
1a: 48 89 ca mov %rcx,%rdx
1d: 4d 89 c2 mov %r8,%r10
20: 4d 89 c8 mov %r9,%r8
23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9
28: 0f 05 syscall
* 2a: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
30: 73 01 jae 0x33
32: c3 retq
33: 48 c7 c1 b8 ff ff ff mov $0xffffffffffffffb8,%rcx
3a: f7 d8 neg %eax
3c: 64 89 01 mov %eax,%fs:(%rcx)
3f: 48 rex.W


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