BUG: unable to handle kernel NULL pointer dereference in udf_getblk

5 views
Skip to first unread message

syzbot

unread,
Oct 14, 2022, 2:29:44 PM10/14/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=10168044880000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=06180202a3562f7bf8cb
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+061802...@syzkaller.appspotmail.com

BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
PGD 92aee067 P4D 92aee067 PUD a4b81067 PMD 0
Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 12471 Comm: syz-executor.3 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022
RIP: 0010:test_and_set_bit arch/x86/include/asm/bitops.h:209 [inline]
RIP: 0010:test_and_set_bit_lock arch/x86/include/asm/bitops.h:223 [inline]
RIP: 0010:trylock_buffer include/linux/buffer_head.h:367 [inline]
RIP: 0010:lock_buffer include/linux/buffer_head.h:373 [inline]
RIP: 0010:udf_getblk+0x1c1/0x390 fs/udf/inode.c:464
Code: e5 01 89 ee e8 90 f5 f2 fe 40 84 ed 0f 84 00 01 00 00 e8 52 f4 f2 fe 31 d2 be 74 01 00 00 48 c7 c7 a0 80 9a 88 e8 ff e3 d1 fe <f0> 49 0f ba 2c 24 02 40 0f 92 c5 31 ff 89 ee e8 5b f5 f2 fe 40 84
RSP: 0018:ffff888048826f58 EFLAGS: 00010246
RAX: 0000000000000007 RBX: 1ffff11009104ded RCX: 0000000000000001
RDX: 0000000000000000 RSI: 00000000ffffffff RDI: ffff8880928564e4
RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000
R13: ffff88803f322670 R14: ffff88803f322698 R15: dffffc0000000000
FS: 00007fc79cbaa700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 00000000aac5c000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
udf_bread+0x85/0x240 fs/udf/inode.c:1206
udf_add_entry+0xfda/0x2a20 fs/udf/namei.c:509
udf_add_nondir+0xf9/0x400 fs/udf/namei.c:602
udf_create+0x130/0x180 fs/udf/namei.c:639
lookup_open+0x893/0x1a20 fs/namei.c:3235
do_last fs/namei.c:3327 [inline]
path_openat+0x1094/0x2df0 fs/namei.c:3537
do_filp_open+0x18c/0x3f0 fs/namei.c:3567
file_open_name+0x269/0x380 fs/open.c:1032
filp_open+0x47/0x70 fs/open.c:1052
do_coredump+0x1fb2/0x2d60 fs/coredump.c:717
get_signal+0xed9/0x1f70 kernel/signal.c:2583
do_signal+0x8f/0x1670 arch/x86/kernel/signal.c:799
exit_to_usermode_loop+0x204/0x2a0 arch/x86/entry/common.c:163
prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fc79e1e9707
Code: 08 89 3c 24 48 89 4c 24 18 e8 e5 f8 ff ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 48 8b 74 24 08 8b 3c 24 b8 12 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 04 24 e8 15 f9 ff ff 48 8b
RSP: 002b:00007fc79cba9f00 EFLAGS: 00000293 ORIG_RAX: 0000000000000012
RAX: ffffffffffffffe5 RBX: 0000000000000027 RCX: 00007fc79e1e9707
RDX: 00000000000000c0 RSI: 00000000200102c0 RDI: 000000000000000a
RBP: 000000000000000a R08: 0000000000000000 R09: 0000000000000000
R10: 0000007375622f2e R11: 0000000000000293 R12: 000000000000000a
R13: 00000000200002f0 R14: 000000000000000a R15: 00007fc79e281a20
Modules linked in:
CR2: 0000000000000000
---[ end trace 3bf9f6cc76e0a611 ]---
RIP: 0010:test_and_set_bit arch/x86/include/asm/bitops.h:209 [inline]
RIP: 0010:test_and_set_bit_lock arch/x86/include/asm/bitops.h:223 [inline]
RIP: 0010:trylock_buffer include/linux/buffer_head.h:367 [inline]
RIP: 0010:lock_buffer include/linux/buffer_head.h:373 [inline]
RIP: 0010:udf_getblk+0x1c1/0x390 fs/udf/inode.c:464
Code: e5 01 89 ee e8 90 f5 f2 fe 40 84 ed 0f 84 00 01 00 00 e8 52 f4 f2 fe 31 d2 be 74 01 00 00 48 c7 c7 a0 80 9a 88 e8 ff e3 d1 fe <f0> 49 0f ba 2c 24 02 40 0f 92 c5 31 ff 89 ee e8 5b f5 f2 fe 40 84
RSP: 0018:ffff888048826f58 EFLAGS: 00010246
RAX: 0000000000000007 RBX: 1ffff11009104ded RCX: 0000000000000001
RDX: 0000000000000000 RSI: 00000000ffffffff RDI: ffff8880928564e4
RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000
R13: ffff88803f322670 R14: ffff88803f322698 R15: dffffc0000000000
FS: 00007fc79cbaa700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 00000000aac5c000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: e5 01 in $0x1,%eax
2: 89 ee mov %ebp,%esi
4: e8 90 f5 f2 fe callq 0xfef2f599
9: 40 84 ed test %bpl,%bpl
c: 0f 84 00 01 00 00 je 0x112
12: e8 52 f4 f2 fe callq 0xfef2f469
17: 31 d2 xor %edx,%edx
19: be 74 01 00 00 mov $0x174,%esi
1e: 48 c7 c7 a0 80 9a 88 mov $0xffffffff889a80a0,%rdi
25: e8 ff e3 d1 fe callq 0xfed1e429
* 2a: f0 49 0f ba 2c 24 02 lock btsq $0x2,(%r12) <-- trapping instruction
31: 40 0f 92 c5 setb %bpl
35: 31 ff xor %edi,%edi
37: 89 ee mov %ebp,%esi
39: e8 5b f5 f2 fe callq 0xfef2f599
3e: 40 rex
3f: 84 .byte 0x84


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

syzbot

unread,
Oct 14, 2022, 2:57:38 PM10/14/22
to syzkaller...@googlegroups.com
syzbot has found a reproducer for 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=10c129aa880000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=06180202a3562f7bf8cb
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=133abc2c880000
mounted in repro #1: https://storage.googleapis.com/syzbot-assets/21c1c6d8bc93/mount_0.gz
mounted in repro #2: https://storage.googleapis.com/syzbot-assets/9532668ea2f2/mount_4.gz

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

IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50
wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50
IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
PGD afde5067 P4D afde5067 PUD a49f8067 PMD 0
Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8385 Comm: syz-executor.0 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022
RIP: 0010:test_and_set_bit arch/x86/include/asm/bitops.h:209 [inline]
RIP: 0010:test_and_set_bit_lock arch/x86/include/asm/bitops.h:223 [inline]
RIP: 0010:trylock_buffer include/linux/buffer_head.h:367 [inline]
RIP: 0010:lock_buffer include/linux/buffer_head.h:373 [inline]
RIP: 0010:udf_getblk+0x1c1/0x390 fs/udf/inode.c:464
Code: e5 01 89 ee e8 90 f5 f2 fe 40 84 ed 0f 84 00 01 00 00 e8 52 f4 f2 fe 31 d2 be 74 01 00 00 48 c7 c7 a0 80 9a 88 e8 ff e3 d1 fe <f0> 49 0f ba 2c 24 02 40 0f 92 c5 31 ff 89 ee e8 5b f5 f2 fe 40 84
RSP: 0018:ffff888098a7ef58 EFLAGS: 00010246
RAX: 0000000000000007 RBX: 1ffff1101314fded RCX: 0000000000000001
RDX: 0000000000000000 RSI: 00000000ffffffff RDI: ffff8880ab3645a4
RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 00000000d9777620 R12: 0000000000000000
R13: ffff888089c1cbc0 R14: ffff888089c1cbe8 R15: dffffc0000000000
FS: 00007f074fc95700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000009d0a3000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
udf_bread+0x85/0x240 fs/udf/inode.c:1206
udf_add_entry+0xfda/0x2a20 fs/udf/namei.c:509
udf_add_nondir+0xf9/0x400 fs/udf/namei.c:602
udf_create+0x130/0x180 fs/udf/namei.c:639
lookup_open+0x893/0x1a20 fs/namei.c:3235
do_last fs/namei.c:3327 [inline]
path_openat+0x1094/0x2df0 fs/namei.c:3537
do_filp_open+0x18c/0x3f0 fs/namei.c:3567
file_open_name+0x269/0x380 fs/open.c:1032
filp_open+0x47/0x70 fs/open.c:1052
do_coredump+0x1fb2/0x2d60 fs/coredump.c:717
get_signal+0xed9/0x1f70 kernel/signal.c:2583
do_signal+0x8f/0x1670 arch/x86/kernel/signal.c:799
exit_to_usermode_loop+0x204/0x2a0 arch/x86/entry/common.c:163
prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f07504d4707
Code: 08 89 3c 24 48 89 4c 24 18 e8 e5 f8 ff ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 48 8b 74 24 08 8b 3c 24 b8 12 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 04 24 e8 15 f9 ff ff 48 8b
RSP: 002b:00007f074fc94f00 EFLAGS: 00000293 ORIG_RAX: 0000000000000012
RAX: ffffffffffffffe5 RBX: 0000000000000027 RCX: 00007f07504d4707
RDX: 00000000000000c0 RSI: 00000000200102c0 RDI: 0000000000000006
RBP: 0000000000000006 R08: 0000000000000000 R09: 0000000000000000
R10: 0000007375622f2e R11: 0000000000000293 R12: 0000000000000006
R13: 00000000200002f0 R14: 000000000000000a R15: 00007f075056ca20
Modules linked in:
CR2: 0000000000000000
---[ end trace 2493d191c40d941c ]---
RIP: 0010:test_and_set_bit arch/x86/include/asm/bitops.h:209 [inline]
RIP: 0010:test_and_set_bit_lock arch/x86/include/asm/bitops.h:223 [inline]
RIP: 0010:trylock_buffer include/linux/buffer_head.h:367 [inline]
RIP: 0010:lock_buffer include/linux/buffer_head.h:373 [inline]
RIP: 0010:udf_getblk+0x1c1/0x390 fs/udf/inode.c:464
Code: e5 01 89 ee e8 90 f5 f2 fe 40 84 ed 0f 84 00 01 00 00 e8 52 f4 f2 fe 31 d2 be 74 01 00 00 48 c7 c7 a0 80 9a 88 e8 ff e3 d1 fe <f0> 49 0f ba 2c 24 02 40 0f 92 c5 31 ff 89 ee e8 5b f5 f2 fe 40 84
RSP: 0018:ffff888098a7ef58 EFLAGS: 00010246
RAX: 0000000000000007 RBX: 1ffff1101314fded RCX: 0000000000000001
RDX: 0000000000000000 RSI: 00000000ffffffff RDI: ffff8880ab3645a4
RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 00000000d9777620 R12: 0000000000000000
R13: ffff888089c1cbc0 R14: ffff888089c1cbe8 R15: dffffc0000000000
FS: 00007f074fc95700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000009d0a3000 CR4: 00000000003406f0

syzbot

unread,
Nov 15, 2022, 8:05:53 AM11/15/22
to syzkaller...@googlegroups.com
syzbot has found a reproducer for 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=17881dae880000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=06180202a3562f7bf8cb
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12133159880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16bbc335880000
mounted in repro: https://storage.googleapis.com/syzbot-assets/20ad62d1afa6/mount_0.gz

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

loop0: rw=2049, want=2142, limit=2048
Buffer I/O error on dev loop0, logical block 2141, lost async page write
attempt to access beyond end of device
loop0: rw=2049, want=2147, limit=2048
Buffer I/O error on dev loop0, logical block 2146, lost async page write
BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
PGD a49dd067 P4D a49dd067 PUD b3f84067 PMD 0
Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8100 Comm: syz-executor348 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:test_and_set_bit arch/x86/include/asm/bitops.h:209 [inline]
RIP: 0010:test_and_set_bit_lock arch/x86/include/asm/bitops.h:223 [inline]
RIP: 0010:trylock_buffer include/linux/buffer_head.h:367 [inline]
RIP: 0010:lock_buffer include/linux/buffer_head.h:373 [inline]
RIP: 0010:udf_getblk+0x1c1/0x390 fs/udf/inode.c:464
Code: e5 01 89 ee e8 90 f5 f2 fe 40 84 ed 0f 84 00 01 00 00 e8 52 f4 f2 fe 31 d2 be 74 01 00 00 48 c7 c7 a0 80 9a 88 e8 ff e3 d1 fe <f0> 49 0f ba 2c 24 02 40 0f 92 c5 31 ff 89 ee e8 5b f5 f2 fe 40 84
RSP: 0018:ffff88809595f968 EFLAGS: 00010246
RAX: 0000000000000007 RBX: 1ffff11012b2bf2f RCX: 0000000000000001
RDX: 0000000000000000 RSI: 00000000ffffffff RDI: ffff8880b2be8124
RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000014bb57f4 R12: 0000000000000000
R13: ffff88808df57bc0 R14: ffff88808df57be8 R15: dffffc0000000000
FS: 0000555556502300(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000009a145000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
udf_bread+0x85/0x240 fs/udf/inode.c:1206
udf_add_entry+0xfda/0x2a20 fs/udf/namei.c:509
udf_mkdir+0x2c7/0x650 fs/udf/namei.c:710
vfs_mkdir+0x508/0x7a0 fs/namei.c:3819
do_mkdirat+0x262/0x2d0 fs/namei.c:3842
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fa24bdce649
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe75c81f38 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fa24bdce649
RDX: 0000000000000000 RSI: 0000000020000200 RDI: 0000000000000006
RBP: 00007fa24bd8dc20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fa24bd8dcb0
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
CR2: 0000000000000000
---[ end trace 7f943c7746816558 ]---
RIP: 0010:test_and_set_bit arch/x86/include/asm/bitops.h:209 [inline]
RIP: 0010:test_and_set_bit_lock arch/x86/include/asm/bitops.h:223 [inline]
RIP: 0010:trylock_buffer include/linux/buffer_head.h:367 [inline]
RIP: 0010:lock_buffer include/linux/buffer_head.h:373 [inline]
RIP: 0010:udf_getblk+0x1c1/0x390 fs/udf/inode.c:464
Code: e5 01 89 ee e8 90 f5 f2 fe 40 84 ed 0f 84 00 01 00 00 e8 52 f4 f2 fe 31 d2 be 74 01 00 00 48 c7 c7 a0 80 9a 88 e8 ff e3 d1 fe <f0> 49 0f ba 2c 24 02 40 0f 92 c5 31 ff 89 ee e8 5b f5 f2 fe 40 84
RSP: 0018:ffff88809595f968 EFLAGS: 00010246
RAX: 0000000000000007 RBX: 1ffff11012b2bf2f RCX: 0000000000000001
RDX: 0000000000000000 RSI: 00000000ffffffff RDI: ffff8880b2be8124
RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000014bb57f4 R12: 0000000000000000
R13: ffff88808df57bc0 R14: ffff88808df57be8 R15: dffffc0000000000
FS: 0000555556502300(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000009a145000 CR4: 00000000003406f0
Reply all
Reply to author
Forward
0 new messages