syzbot


KASAN: out-of-bounds Write in udf_write_fi

Status: upstream: reported C repro on 2022/02/06 00:22
Subsystems: udf
[Documentation on labels]
Reported-by: syzbot+016c71588b119564cde8@syzkaller.appspotmail.com
First crash: 800d, last: 419d
Fix bisection: failed (error log, bisect log)
  
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 16 35d 322d 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 17 131d 378d 0/3 upstream: reported C repro on 2023/04/03 11:46
linux-4.14 KASAN: out-of-bounds Write in udf_write_fi C 1 417d 417d 0/1 upstream: reported C repro on 2023/02/23 05:38
upstream KASAN: null-ptr-deref Write in udf_write_fi udf C inconclusive done 51 444d 567d 22/26 fixed on 2023/06/08 14:41

Sample crash report:
RDX: 00000000000000b0 RSI: 00000000200000c0 RDI: 0000000020000200
RBP: 00007ffc129600b0 R08: 0000000000000002 R09: aaaaaaaaaaaa0102
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004
R13: 00007f91ae7e177c R14: 0000000000000003 R15: 0000000000000001
==================================================================
BUG: KASAN: out-of-bounds in memset include/linux/string.h:362 [inline]
BUG: KASAN: out-of-bounds in udf_write_fi+0x8f9/0xf40 fs/udf/namei.c:93
Write of size 18446744073709551328 at addr ffff88808ce4a920 by task syz-executor370/8112

CPU: 0 PID: 8112 Comm: syz-executor370 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256
 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354
 kasan_report+0x8f/0xa0 mm/kasan/report.c:412
 memset+0x20/0x40 mm/kasan/kasan.c:285
 memset include/linux/string.h:362 [inline]
 udf_write_fi+0x8f9/0xf40 fs/udf/namei.c:93
 udf_rename+0x45e/0x1270 fs/udf/namei.c:1185
 vfs_rename+0x67e/0x1bc0 fs/namei.c:4479
 do_renameat2+0xb59/0xc70 fs/namei.c:4629
 __do_sys_rename fs/namei.c:4675 [inline]
 __se_sys_rename fs/namei.c:4673 [inline]
 __x64_sys_rename+0x5d/0x80 fs/namei.c:4673
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f91ae7734b9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 71 17 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc12960068 EFLAGS: 00000246 ORIG_RAX: 0000000000000052
RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f91ae7734b9
RDX: 00000000000000b0 RSI: 00000000200000c0 RDI: 0000000020000200
RBP: 00007ffc129600b0 R08: 0000000000000002 R09: aaaaaaaaaaaa0102
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004
R13: 00007f91ae7e177c R14: 0000000000000003 R15: 0000000000000001

The buggy address belongs to the page:
page:ffffea0002339280 count:2 mapcount:0 mapping:ffff8880b1b0fae0 index:0xe
flags: 0xfff00000001074(referenced|dirty|lru|active|private)
raw: 00fff00000001074 ffffea000295a608 ffffea00023392c8 ffff8880b1b0fae0
raw: 000000000000000e ffff88808dbd8d20 00000002ffffffff ffff8880b59f68c0
page dumped because: kasan: bad access detected
page->mem_cgroup:ffff8880b59f68c0

Memory state around the buggy address:
 ffff88808ce4a800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88808ce4a880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88808ce4a900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                               ^
 ffff88808ce4a980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88808ce4aa00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/02/21 22:50 linux-4.19.y 3f8a27f9e27b 42a4d508 .config console log report syz C [disk image] [vmlinux] [mounted in repro] ci2-linux-4-19 KASAN: out-of-bounds Write in udf_write_fi
2022/09/25 21:56 linux-4.19.y 3f8a27f9e27b 0042f2b4 .config console log report syz C ci2-linux-4-19 KASAN: out-of-bounds Write in udf_write_fi
2022/02/06 00:52 linux-4.19.y 3f8a27f9e27b a7dab638 .config console log report syz C ci2-linux-4-19 KASAN: out-of-bounds Write in udf_write_fi
2022/09/24 19:28 linux-4.19.y 3f8a27f9e27b 0042f2b4 .config console log report syz C ci2-linux-4-19 KASAN: null-ptr-deref Write in udf_write_fi
2023/01/16 08:38 linux-4.19.y 3f8a27f9e27b a63719e7 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: out-of-bounds Write in udf_write_fi
2022/02/06 00:21 linux-4.19.y 3f8a27f9e27b a7dab638 .config console log report info ci2-linux-4-19 KASAN: out-of-bounds Write in udf_write_fi
2022/12/17 17:30 linux-4.19.y 3f8a27f9e27b 05494336 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: null-ptr-deref Write in udf_write_fi
2022/10/16 19:49 linux-4.19.y 3f8a27f9e27b 67cb024c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: null-ptr-deref Write in udf_write_fi
2022/10/12 10:19 linux-4.19.y 3f8a27f9e27b 02b6492e .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: null-ptr-deref Write in udf_write_fi
* Struck through repros no longer work on HEAD.