[v6.1] KASAN: null-ptr-deref Write in udf_write_fi

0 views
Skip to first unread message

syzbot

unread,
May 29, 2023, 12:55:54 AM5/29/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: a343b0dd87b4 Linux 6.1.30
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=122c8ced280000
kernel config: https://syzkaller.appspot.com/x/.config?x=8ec86bd749598dca
dashboard link: https://syzkaller.appspot.com/bug?extid=29af8562a899a5d033ec
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/aebc00d6f042/disk-a343b0dd.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/7ff0321ebb5a/vmlinux-a343b0dd.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c928974a56d6/Image-a343b0dd.gz.xz

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

el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581
==================================================================
BUG: KASAN: null-ptr-deref in udf_write_fi+0x3e4/0x920
Write of size 18446744073709551572 at addr 0000000000000020 by task syz-executor.3/23681

CPU: 1 PID: 23681 Comm: syz-executor.3 Not tainted 6.1.30-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call trace:
dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
print_report+0xe4/0x4c0 mm/kasan/report.c:398
kasan_report+0xd4/0x130 mm/kasan/report.c:495
kasan_check_range+0x264/0x2a4 mm/kasan/generic.c:189
memset+0x40/0x70 mm/kasan/shadow.c:44
udf_write_fi+0x3e4/0x920
udf_delete_entry fs/udf/namei.c:577 [inline]
udf_rename+0x90c/0x10b0 fs/udf/namei.c:1173
vfs_rename+0x9e0/0xe80 fs/namei.c:4779
do_renameat2+0x980/0x1040 fs/namei.c:4930
__do_sys_renameat fs/namei.c:4970 [inline]
__se_sys_renameat fs/namei.c:4967 [inline]
__arm64_sys_renameat+0xc8/0xe4 fs/namei.c:4967
__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:581
==================================================================
Unable to handle kernel paging request at virtual address dfff800000000003
KASAN: null-ptr-deref in range [0x0000000000000018-0x000000000000001f]
Mem abort info:
ESR = 0x0000000096000006
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x06: level 2 translation fault
Data abort info:
ISV = 0, ISS = 0x00000006
CM = 0, WnR = 0
[dfff800000000003] address between user and kernel address ranges
Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 23681 Comm: syz-executor.3 Tainted: G B 6.1.30-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : crc_itu_t+0x5c/0x108 lib/crc-itu-t.c:60
lr : crc_itu_t+0x38/0x108 lib/crc-itu-t.c:59
sp : ffff80002c567520
x29: ffff80002c567530 x28: 0000000000000000 x27: 00000000fffffff0
x26: ffff80002c5676e8 x25: 1ffff000058acedd x24: ffff800012722200
x23: 000000000000ffd9 x22: dfff800000000000 x21: 000000000000001a
x20: 000000000000001a x19: 00000000a79d5f14 x18: 1fffe000368ba176
x17: ffff8000155ad000 x16: ffff8000120fc834 x15: ffff0001b45d0bbc
x14: ffff0001b45d0bb8 x13: 1fffe000368ba176 x12: 0000000000040000
x11: ff8080000aacd0e4 x10: 0000000000000002 x9 : 0000000000000002
x8 : 0000000000000003 x7 : 1fffe000368ba177 x6 : ffff80000827cdcc
x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffff8000081ae34c
x2 : 000000000000ffda x1 : 000000000000ffda x0 : 0000000000000000
Call trace:
crc_itu_t+0x5c/0x108 lib/crc-itu-t.c:60
udf_write_fi+0x4cc/0x920 fs/udf/namei.c:103
udf_delete_entry fs/udf/namei.c:577 [inline]
udf_rename+0x90c/0x10b0 fs/udf/namei.c:1173
vfs_rename+0x9e0/0xe80 fs/namei.c:4779
do_renameat2+0x980/0x1040 fs/namei.c:4930
__do_sys_renameat fs/namei.c:4970 [inline]
__se_sys_renameat fs/namei.c:4967 [inline]
__arm64_sys_renameat+0xc8/0xe4 fs/namei.c:4967
__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:581
Code: b003e2b8 91080318 d343fea8 12000aa9 (38f66908)
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
0: b003e2b8 adrp x24, 0x7c55000
4: 91080318 add x24, x24, #0x200
8: d343fea8 lsr x8, x21, #3
c: 12000aa9 and w9, w21, #0x7
* 10: 38f66908 ldrsb w8, [x8, x22] <-- trapping instruction


---
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 bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title

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

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

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

syzbot

unread,
May 29, 2023, 4:02:05 AM5/29/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: a343b0dd87b4 Linux 6.1.30
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=125d9a3e280000
kernel config: https://syzkaller.appspot.com/x/.config?x=8ec86bd749598dca
dashboard link: https://syzkaller.appspot.com/bug?extid=29af8562a899a5d033ec
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11533399280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10e24d85280000
mounted in repro: https://storage.googleapis.com/syzbot-assets/ac3a646d0975/mount_0.gz

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

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:581
==================================================================
BUG: KASAN: null-ptr-deref in udf_write_fi+0x3e4/0x920
Write of size 18446744073709551572 at addr 0000000000000020 by task syz-executor239/4225

CPU: 0 PID: 4225 Comm: syz-executor239 Not tainted 6.1.30-syzkaller #0
CPU: 0 PID: 4225 Comm: syz-executor239 Tainted: G B 6.1.30-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : crc_itu_t+0x5c/0x108 lib/crc-itu-t.c:60
lr : crc_itu_t+0x38/0x108 lib/crc-itu-t.c:59
sp : ffff80001da17520
x29: ffff80001da17530 x28: 0000000000000000 x27: 00000000fffffff0
x26: ffff80001da176e8 x25: 1ffff00003b42edd x24: ffff800012722200
x23: 000000000000ffd9 x22: dfff800000000000 x21: 000000000000001a
x20: 000000000000001a x19: 00000000a79d5f14 x18: 1fffe000368b6176
x17: 0000000000000000 x16: ffff8000120fc834 x15: 0000000000000000
x14: 0000000000000000 x13: 0000000000000001 x12: 0000000000000001
x11: ff8080000aacd0e4 x10: 0000000000000000 x9 : 0000000000000002
x8 : 0000000000000003 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff80001da16d58 x4 : ffff800015692ac0 x3 : ffff8000081ae34c
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