syzbot


KASAN: null-ptr-deref Write in udf_write_fi

Status: fixed on 2023/06/08 14:41
Subsystems: udf
[Documentation on labels]
Reported-by: syzbot+8a5a459f324d510ea15a@syzkaller.appspotmail.com
Fix commit: e9109a92d2a9 udf: Convert udf_rename() to new directory iteration code
First crash: 789d, last: 665d
Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: KASAN: null-ptr-deref Write in udf_write_fi (log)
Repro: C syz .config
  
Fix bisection: fixed by (bisect log) :
commit e9109a92d2a95889498bed3719cd2318892171a2
Author: Jan Kara <jack@suse.cz>
Date: Thu Oct 6 14:41:23 2022 +0000

  udf: Convert udf_rename() to new directory iteration code

  
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] KASAN: null-ptr-deref Write in udf_write_fi 1 (3) 2023/02/28 07:56
[PATCH 0/1] udf: Fix null-ptr-deref in udf_write_fi() 3 (3) 2023/01/09 09:44
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 KASAN: null-ptr-deref Write in udf_write_fi origin:lts-only C inconclusive 34 78d 543d 0/3 upstream: reported C repro on 2023/05/29 04:55
linux-5.15 KASAN: out-of-bounds Write in udf_write_fi origin:lts-only C done 45 33d 599d 0/3 upstream: reported C repro on 2023/04/03 11:46
linux-4.19 KASAN: out-of-bounds Write in udf_write_fi udf C error 9 640d 1020d 0/1 upstream: reported C repro on 2022/02/06 00:22
linux-4.14 KASAN: out-of-bounds Write in udf_write_fi C 1 638d 638d 0/1 upstream: reported C repro on 2023/02/23 05:38

Sample crash report:
loop0: detected capacity change from 0 to 2048
UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/09/12 12:00 (1000)
==================================================================
BUG: KASAN: null-ptr-deref in udf_write_fi+0x493/0xc10
Write of size 18446744073709551572 at addr 0000000000000020 by task syz-executor169/3610

CPU: 1 PID: 3610 Comm: syz-executor169 Not tainted 6.1.0-rc3-syzkaller-00280-g64c3dd0b98f5 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106
 print_report+0xed/0x1f0 mm/kasan/report.c:398
 kasan_report+0xcd/0x100 mm/kasan/report.c:495
 kasan_check_range+0x2a7/0x2e0 mm/kasan/generic.c:189
 memset+0x1f/0x40 mm/kasan/shadow.c:44
 udf_write_fi+0x493/0xc10
 udf_delete_entry fs/udf/namei.c:577 [inline]
 udf_rename+0x90c/0x15f0 fs/udf/namei.c:1173
 vfs_rename+0xd53/0x1130 fs/namei.c:4778
 do_renameat2+0xb53/0x1370 fs/namei.c:4929
 __do_sys_renameat2 fs/namei.c:4962 [inline]
 __se_sys_renameat2 fs/namei.c:4959 [inline]
 __x64_sys_renameat2+0xce/0xe0 fs/namei.c:4959
 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:0x7fa041c7eda9
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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffcbd2c1d98 EFLAGS: 00000246 ORIG_RAX: 000000000000013c
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fa041c7eda9
RDX: 0000000000000004 RSI: 00000000200001c0 RDI: 0000000000000004
RBP: 0000000000000006 R08: 0000000000000000 R09: 001c000000000150
R10: 0000000020000200 R11: 0000000000000246 R12: 00007ffcbd2c1de0
R13: 00007ffcbd2c1dd8 R14: 00007ffcbd2c1df0 R15: 0000000000000003
 </TASK>
==================================================================

Crashes (51):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/11/05 07:22 upstream 64c3dd0b98f5 6d752409 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs KASAN: null-ptr-deref Write in udf_write_fi
2022/10/09 10:45 upstream a6afa4199d3d aea5da89 .config strace log report syz C [disk image] [vmlinux] [mounted in repro] ci2-upstream-fs KASAN: null-ptr-deref Write in udf_write_fi
2022/09/25 06:15 upstream 1a61b828566f 0042f2b4 .config strace log report syz C [disk image] [vmlinux] ci-upstream-kasan-gce-root KASAN: null-ptr-deref Write in udf_write_fi
2022/11/14 04:31 linux-next f8f60f322f06 3ead01ad .config strace log report syz C [mounted in repro] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in udf_write_fi
2022/11/14 04:53 upstream af7a05689189 3ead01ad .config console log report syz C [mounted in repro] ci-upstream-kasan-gce-root KASAN: out-of-bounds Write in udf_write_fi
2022/10/31 05:39 upstream b229b6ca5abb 2a71366b .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root KASAN: out-of-bounds Write in udf_write_fi
2022/10/21 21:38 upstream 6d36c728bc2e 63e790dd .config strace log report syz C [disk image] [vmlinux] [mounted in repro] ci2-upstream-fs KASAN: out-of-bounds Write in udf_write_fi
2022/10/11 09:54 upstream 55be6084c8e0 2b253ced .config strace log report syz C [disk image] [vmlinux] [mounted in repro] ci-upstream-kasan-gce-root KASAN: out-of-bounds Write in udf_write_fi
2022/10/05 19:31 upstream 0326074ff465 267e3bb1 .config strace log report syz C [disk image] [vmlinux] [mounted in repro] ci2-upstream-fs KASAN: out-of-bounds Write in udf_write_fi
2022/09/29 17:39 upstream c3e0e1e23c70 1d385642 .config strace log report syz C [disk image] [vmlinux] ci-upstream-kasan-gce-root KASAN: out-of-bounds Write in udf_write_fi
2022/09/27 17:38 upstream 3800a713b607 10323ddf .config strace log report syz C ci2-upstream-fs KASAN: out-of-bounds Write in udf_write_fi
2022/11/06 21:35 linux-next 0cdb3579f1ee 6d752409 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root KASAN: out-of-bounds Write in udf_write_fi
2022/10/26 19:26 linux-next 4d48f589d294 2159e4d2 .config strace log report syz C [disk image] [vmlinux] [mounted in repro] ci-upstream-linux-next-kasan-gce-root KASAN: out-of-bounds Write in udf_write_fi
2022/10/17 05:56 upstream 55be6084c8e0 67cb024c .config console log report syz C [disk image] [vmlinux] [mounted in repro] ci-upstream-kasan-gce-root KASAN: null-ptr-deref Write in udf_write_fi
2023/01/12 10:01 upstream e8f60cd7db24 96166539 .config console log report info ci-qemu-upstream KASAN: null-ptr-deref Write in udf_write_fi
2022/11/25 06:28 upstream c3eb11fbb826 74a66371 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: null-ptr-deref Write in udf_write_fi
2022/11/24 02:55 upstream 4312098baf37 12c66417 .config console log report info ci-upstream-kasan-gce-selinux-root KASAN: null-ptr-deref Write in udf_write_fi
2022/11/22 07:38 upstream eb7081409f94 1c576c23 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: null-ptr-deref Write in udf_write_fi
2022/11/14 03:42 upstream af7a05689189 7ba4d859 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: null-ptr-deref Write in udf_write_fi
2022/11/11 06:20 upstream 4bbf3422df78 f42ee5d8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: null-ptr-deref Write in udf_write_fi
2022/11/02 19:22 upstream b229b6ca5abb 08977f5d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: null-ptr-deref Write in udf_write_fi
2022/11/02 10:06 upstream b229b6ca5abb 08977f5d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: null-ptr-deref Write in udf_write_fi
2022/11/02 05:29 upstream b229b6ca5abb 08977f5d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: null-ptr-deref Write in udf_write_fi
2022/10/30 16:42 upstream b229b6ca5abb 2a71366b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root KASAN: null-ptr-deref Write in udf_write_fi
2022/10/27 04:44 upstream 4dc12f37a8e9 86777b7f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: null-ptr-deref Write in udf_write_fi
2022/10/23 06:53 upstream 4da34b7d175d c0b80a55 .config console log report info [disk image] [vmlinux] ci2-upstream-fs KASAN: null-ptr-deref Write in udf_write_fi
2022/10/22 23:32 upstream 440b7895c990 c0b80a55 .config console log report info [disk image] [vmlinux] ci2-upstream-fs KASAN: null-ptr-deref Write in udf_write_fi
2022/10/14 15:12 upstream 55be6084c8e0 4954e4b2 .config console log report info [disk image] [vmlinux] ci-upstream-kasan-gce-smack-root KASAN: null-ptr-deref Write in udf_write_fi
2022/10/14 14:25 upstream 493ffd6605b2 4954e4b2 .config console log report info [disk image] [vmlinux] ci2-upstream-fs KASAN: null-ptr-deref Write in udf_write_fi
2022/10/13 19:11 upstream 493ffd6605b2 adf90437 .config console log report info [disk image] [vmlinux] ci2-upstream-fs KASAN: null-ptr-deref Write in udf_write_fi
2022/10/10 18:18 upstream 493ffd6605b2 5bcf0c31 .config console log report info [disk image] [vmlinux] ci2-upstream-fs KASAN: null-ptr-deref Write in udf_write_fi
2022/10/09 08:01 upstream a6afa4199d3d aea5da89 .config console log report info [disk image] [vmlinux] ci-upstream-kasan-gce-root KASAN: null-ptr-deref Write in udf_write_fi
2022/10/10 18:26 linux-next aaa11ce2ffc8 aea5da89 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in udf_write_fi
2023/01/07 00:32 upstream 1f5abbd77e2c 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: out-of-bounds Write in udf_write_fi
2022/12/27 23:44 upstream 1b929c02afd3 44712fbc .config console log report info ci-qemu-upstream KASAN: out-of-bounds Write in udf_write_fi
2022/12/25 09:44 upstream 72a85e2b0a1e 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root KASAN: out-of-bounds Write in udf_write_fi
2022/11/17 05:03 upstream 59d0d52c30d4 3a127a31 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: out-of-bounds Write in udf_write_fi
2022/11/14 09:04 upstream 094226ad94f4 7ba4d859 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: out-of-bounds Write in udf_write_fi
2022/11/10 22:04 upstream 1767a722a708 3ead01ad .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: out-of-bounds Write in udf_write_fi
2022/11/09 02:46 upstream f141df371335 5fa28208 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: out-of-bounds Write in udf_write_fi
2022/10/30 20:22 upstream 200204f56f3b 2a71366b .config console log report info ci-qemu-upstream KASAN: out-of-bounds Write in udf_write_fi
2022/10/29 10:39 upstream b229b6ca5abb 899d812a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: out-of-bounds Write in udf_write_fi
2022/10/26 17:33 upstream 4dc12f37a8e9 2159e4d2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root KASAN: out-of-bounds Write in udf_write_fi
2022/10/25 08:10 upstream 337a0a0b63f1 45645420 .config console log report info [disk image] [vmlinux] ci2-upstream-fs KASAN: out-of-bounds Write in udf_write_fi
2022/10/18 09:05 upstream 493ffd6605b2 94744d21 .config console log report info ci2-upstream-fs KASAN: out-of-bounds Write in udf_write_fi
2022/10/15 09:55 upstream 55be6084c8e0 67cb024c .config console log report info [disk image] [vmlinux] ci-upstream-kasan-gce-smack-root KASAN: out-of-bounds Write in udf_write_fi
2022/10/15 04:28 upstream 493ffd6605b2 67cb024c .config console log report info ci2-upstream-fs KASAN: out-of-bounds Write in udf_write_fi
2023/01/27 20:38 upstream 7c46948a6e9c 7374c4e5 .config console log report info ci-qemu-upstream-386 KASAN: out-of-bounds Write in udf_write_fi
2023/01/07 09:16 upstream a689b938df39 1dac8c7a .config console log report info ci-qemu-upstream-386 KASAN: out-of-bounds Write in udf_write_fi
2022/12/12 20:35 upstream 830b3c68c1fb 67be1ae7 .config console log report info ci-qemu-upstream-386 KASAN: out-of-bounds Write in udf_write_fi
2022/10/16 18:49 linux-next aaa11ce2ffc8 67cb024c .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root KASAN: out-of-bounds Write in udf_write_fi
* Struck through repros no longer work on HEAD.