syzbot


KASAN: slab-out-of-bounds Write in udf_readdir

Status: upstream: reported C repro on 2024/04/15 06:11
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+136740e3b42e006e87fb@syzkaller.appspotmail.com
First crash: 235d, last: 50d
Fix commit to backport (bisect log) :
tree: upstream
commit 1c80afa04db39c98aebea9aabfafa37a208cdfee
Author: Jan Kara <jack@suse.cz>
Date: Wed Oct 5 16:28:33 2022 +0000

  udf: Implement searching for directory entry using new iteration code

[report pending]
  
Bug presence (2)
Date Name Commit Repro Result
2024/05/04 linux-5.15.y (ToT) 284087d4f7d5 C [report] KASAN: slab-out-of-bounds Write in udf_readdir
2024/05/04 upstream (ToT) 7367539ad4b0 C Didn't crash
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 KASAN: slab-out-of-bounds Write in udf_readdir origin:lts-only C done 161 47d 231d 0/3 upstream: reported C repro on 2024/04/19 05:30
Last patch testing requests (2)
Created Duration User Patch Repo Result
2024/10/03 13:43 13m retest repro linux-5.15.y report log
2024/10/03 13:43 10m retest repro linux-5.15.y report log
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2024/06/07 22:59 4h56m fix candidate upstream OK (1) job log

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in udf_readdir+0xcaa/0x2170 fs/udf/dir.c:182
Write of size 201 at addr ffff888012a2e036 by task syz-executor203/3499

CPU: 1 PID: 3499 Comm: syz-executor203 Not tainted 5.15.163-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
 print_address_description+0x63/0x3b0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:434 [inline]
 kasan_report+0x16b/0x1c0 mm/kasan/report.c:451
 kasan_check_range+0x27e/0x290 mm/kasan/generic.c:189
 memcpy+0x3c/0x60 mm/kasan/shadow.c:66
 udf_readdir+0xcaa/0x2170 fs/udf/dir.c:182
 iterate_dir+0x224/0x570
 __do_sys_getdents64 fs/readdir.c:369 [inline]
 __se_sys_getdents64+0x209/0x4f0 fs/readdir.c:354
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f9ec3eeafa3
Code: c1 66 0f 1f 44 00 00 48 83 c4 08 48 89 ef 5b 5d e9 92 48 fb ff 66 90 b8 ff ff ff 7f 48 39 c2 48 0f 47 d0 b8 d9 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 05 c3 0f 1f 40 00 48 c7 c2 b8 ff ff ff f7 d8
RSP: 002b:00007ffeb03b1118 EFLAGS: 00000293 ORIG_RAX: 00000000000000d9
RAX: ffffffffffffffda RBX: 0000555557548770 RCX: 00007f9ec3eeafa3
RDX: 0000000000008000 RSI: 0000555557548770 RDI: 0000000000000005
RBP: 0000555557548744 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000001000 R11: 0000000000000293 R12: ffffffffffffffb8
R13: 0000000000000016 R14: 0000555557548740 R15: 00007ffeb03b4480
 </TASK>

Allocated by task 3499:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:46 [inline]
 set_alloc_info mm/kasan/common.c:434 [inline]
 ____kasan_kmalloc+0xba/0xf0 mm/kasan/common.c:513
 kasan_kmalloc include/linux/kasan.h:264 [inline]
 kmem_cache_alloc_trace+0x143/0x290 mm/slub.c:3247
 kmalloc include/linux/slab.h:591 [inline]
 udf_readdir+0xbc6/0x2170 fs/udf/dir.c:172
 iterate_dir+0x224/0x570
 __do_sys_getdents64 fs/readdir.c:369 [inline]
 __se_sys_getdents64+0x209/0x4f0 fs/readdir.c:354
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

The buggy address belongs to the object at ffff888012a2e000
 which belongs to the cache kmalloc-256 of size 256
The buggy address is located 54 bytes inside of
 256-byte region [ffff888012a2e000, ffff888012a2e100)
The buggy address belongs to the page:
page:ffffea00004a8b80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12a2e
head:ffffea00004a8b80 order:1 compound_mapcount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 0000000000000000 0000000c00000001 ffff888011c41b40
raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, ts 2319670283, free_ts 0
 prep_new_page mm/page_alloc.c:2426 [inline]
 get_page_from_freelist+0x322a/0x33c0 mm/page_alloc.c:4159
 __alloc_pages+0x272/0x700 mm/page_alloc.c:5423
 alloc_page_interleave+0x22/0x1c0 mm/mempolicy.c:2031
 alloc_slab_page mm/slub.c:1775 [inline]
 allocate_slab mm/slub.c:1912 [inline]
 new_slab+0xbb/0x4b0 mm/slub.c:1975
 ___slab_alloc+0x6f6/0xe10 mm/slub.c:3008
 __slab_alloc mm/slub.c:3095 [inline]
 slab_alloc_node mm/slub.c:3186 [inline]
 slab_alloc mm/slub.c:3228 [inline]
 __kmalloc_track_caller+0x1c7/0x300 mm/slub.c:4925
 __do_krealloc mm/slab_common.c:1217 [inline]
 krealloc+0x4b/0xc0 mm/slab_common.c:1250
 add_sysfs_param+0xca/0x7f0 kernel/params.c:651
 kernel_add_sysfs_param+0xb0/0x130 kernel/params.c:812
 param_sysfs_builtin+0x16a/0x1f0 kernel/params.c:851
 param_sysfs_init+0x66/0x70 kernel/params.c:970
 do_one_initcall+0x22b/0x7a0 init/main.c:1302
 do_initcall_level+0x157/0x210 init/main.c:1375
 do_initcalls+0x49/0x90 init/main.c:1391
 kernel_init_freeable+0x425/0x5c0 init/main.c:1615
 kernel_init+0x19/0x290 init/main.c:1506
page_owner free stack trace missing

Memory state around the buggy address:
 ffff888012a2df80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888012a2e000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff888012a2e080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06
                                                                ^
 ffff888012a2e100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888012a2e180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (403):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/25 06:28 linux-5.15.y 7c6d66f0266f d1a1b0ca .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/04/15 07:06 linux-5.15.y fa3df276cd36 c8349e48 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/10/16 12:32 linux-5.15.y 3a5928702e71 bde2d81c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/10/15 20:45 linux-5.15.y 3a5928702e71 7eb57b4a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/10/15 20:45 linux-5.15.y 3a5928702e71 7eb57b4a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/10/05 00:19 linux-5.15.y 3a5928702e71 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/09/16 04:39 linux-5.15.y 3a5928702e71 08d8a733 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/09/14 04:42 linux-5.15.y 3a5928702e71 b58f933c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/09/11 14:41 linux-5.15.y 14e468424d3e 8ab55d0e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/09/11 02:05 linux-5.15.y 14e468424d3e 86aa7bd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/09/07 20:29 linux-5.15.y 14e468424d3e 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/09/07 13:14 linux-5.15.y 14e468424d3e 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/09/07 12:06 linux-5.15.y 14e468424d3e 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/09/03 02:06 linux-5.15.y fa93fa65db6e 8045124c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/09/02 17:27 linux-5.15.y fa93fa65db6e 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/08/30 22:03 linux-5.15.y fa93fa65db6e 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/08/30 12:59 linux-5.15.y fa93fa65db6e ee2602b8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/08/30 12:56 linux-5.15.y fa93fa65db6e ee2602b8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/08/29 06:13 linux-5.15.y fa93fa65db6e ef3de9e8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/08/29 00:35 linux-5.15.y fa93fa65db6e ef3de9e8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/08/28 23:31 linux-5.15.y fa93fa65db6e ef3de9e8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/08/26 05:51 linux-5.15.y fa93fa65db6e d7d32352 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/08/24 14:11 linux-5.15.y fa93fa65db6e d7d32352 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/08/18 14:22 linux-5.15.y 7e89efd3ae1c dbc93b08 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/08/17 07:34 linux-5.15.y 7e89efd3ae1c dbc93b08 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/08/15 07:14 linux-5.15.y 7e89efd3ae1c e4bacdaf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/08/14 02:03 linux-5.15.y 7e89efd3ae1c bde81f6f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/08/13 18:42 linux-5.15.y 7e89efd3ae1c f21a18ca .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/08/12 07:19 linux-5.15.y 7e89efd3ae1c 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/08/12 06:40 linux-5.15.y 7e89efd3ae1c 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/08/11 21:58 linux-5.15.y 7e89efd3ae1c 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/08/11 11:38 linux-5.15.y 7e89efd3ae1c 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/08/08 09:17 linux-5.15.y 7e89efd3ae1c de12cf65 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/08/07 18:33 linux-5.15.y 7e89efd3ae1c 109d2082 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/08/04 07:49 linux-5.15.y 7e89efd3ae1c 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/08/03 00:39 linux-5.15.y 7e89efd3ae1c 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/08/02 17:50 linux-5.15.y 7e89efd3ae1c 1e9c4cf3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/08/02 13:28 linux-5.15.y 7e89efd3ae1c 1e9c4cf3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/07/25 00:35 linux-5.15.y 7c6d66f0266f d1a1b0ca .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/07/14 21:48 linux-5.15.y f45bea23c39c eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/07/11 17:08 linux-5.15.y f45bea23c39c c699c2eb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/07/07 18:44 linux-5.15.y f45bea23c39c 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/07/06 22:02 linux-5.15.y f45bea23c39c 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/07/06 12:52 linux-5.15.y f45bea23c39c 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/07/06 09:57 linux-5.15.y f45bea23c39c 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/04/15 06:10 linux-5.15.y fa3df276cd36 c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Write in udf_readdir
2024/04/25 06:51 linux-5.15.y c52b9710c83d 8bdc0f22 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_readdir
* Struck through repros no longer work on HEAD.