[syzbot] [hfsplus?] kernel BUG in hfsplus_bnode_put

From: syzbot
Date: Wed Jan 18 2023 - 02:54:25 EST


Hello,

syzbot found the following issue on:

HEAD commit: d9fc1511728c Merge tag 'net-6.2-rc4' of git://git.kernel.o..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=10d0e102480000
kernel config: https://syzkaller.appspot.com/x/.config?x=ebc110f9741920ed
dashboard link: https://syzkaller.appspot.com/bug?extid=005d2a9ecd9fbf525f6a
compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/b6279846a2e7/disk-d9fc1511.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/8fb1b3c8ac10/vmlinux-d9fc1511.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c6f486ee1f67/bzImage-d9fc1511.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+005d2a9ecd9fbf525f6a@xxxxxxxxxxxxxxxxxxxxxxxxx

------------[ cut here ]------------
kernel BUG at fs/hfsplus/bnode.c:618!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 15519 Comm: syz-executor.3 Not tainted 6.2.0-rc3-syzkaller-00165-gd9fc1511728c #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:hfsplus_bnode_put+0x637/0x640 fs/hfsplus/bnode.c:618
Code: 00 81 ff e9 af fd ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c de fd ff ff 48 89 df e8 63 ff 80 ff e9 d1 fd ff ff e8 d9 55 2b ff <0f> 0b e8 d2 55 2b ff 0f 0b 55 41 57 41 56 41 54 53 41 89 f7 49 89
RSP: 0018:ffffc9000644f0b0 EFLAGS: 00010283
RAX: ffffffff82608627 RBX: ffff888075b89880 RCX: 0000000000040000
RDX: ffffc90015209000 RSI: 0000000000002ec3 RDI: 0000000000002ec4
RBP: 0000000000000000 R08: ffffffff82608066 R09: ffffed100eb71311
R10: ffffed100eb71311 R11: 1ffff1100eb71310 R12: ffff888075b89800
R13: ffff88807c450000 R14: dffffc0000000000 R15: 1ffff1100eb71300
FS: 00007f0a28019700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fddfd293000 CR3: 0000000021031000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
hfsplus_bmap_alloc+0x580/0x610 fs/hfsplus/btree.c:414
hfs_bnode_split+0xc3/0x10c0 fs/hfsplus/brec.c:245
hfsplus_brec_insert+0x36c/0xd70 fs/hfsplus/brec.c:100
hfsplus_create_cat+0x583/0xa20 fs/hfsplus/catalog.c:308
hfsplus_mknod+0x165/0x290 fs/hfsplus/dir.c:494
lookup_open fs/namei.c:3413 [inline]
open_last_lookups fs/namei.c:3481 [inline]
path_openat+0x12ac/0x2dd0 fs/namei.c:3711
do_filp_open+0x264/0x4f0 fs/namei.c:3741
do_sys_openat2+0x124/0x4e0 fs/open.c:1310
do_sys_open fs/open.c:1326 [inline]
__do_sys_openat fs/open.c:1342 [inline]
__se_sys_openat fs/open.c:1337 [inline]
__x64_sys_openat+0x243/0x290 fs/open.c:1337
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:0x7f0a2728c0c9
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:00007f0a28019168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f0a273abf80 RCX: 00007f0a2728c0c9
RDX: 000000000000275a RSI: 0000000020000040 RDI: ffffffffffffff9c
RBP: 00007f0a272e7ae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe38bdd94f R14: 00007f0a28019300 R15: 0000000000022000
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:hfsplus_bnode_put+0x637/0x640 fs/hfsplus/bnode.c:618
Code: 00 81 ff e9 af fd ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c de fd ff ff 48 89 df e8 63 ff 80 ff e9 d1 fd ff ff e8 d9 55 2b ff <0f> 0b e8 d2 55 2b ff 0f 0b 55 41 57 41 56 41 54 53 41 89 f7 49 89
RSP: 0018:ffffc9000644f0b0 EFLAGS: 00010283
RAX: ffffffff82608627 RBX: ffff888075b89880 RCX: 0000000000040000
RDX: ffffc90015209000 RSI: 0000000000002ec3 RDI: 0000000000002ec4
RBP: 0000000000000000 R08: ffffffff82608066 R09: ffffed100eb71311
R10: ffffed100eb71311 R11: 1ffff1100eb71310 R12: ffff888075b89800
R13: ffff88807c450000 R14: dffffc0000000000 R15: 1ffff1100eb71300
FS: 00007f0a28019700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f15b1770000 CR3: 0000000021031000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 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 syzkaller@xxxxxxxxxxxxxxxx.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.