syzbot


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

Status: upstream: reported C repro on 2023/03/11 14:12
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+600a32676df180ebc4af@syzkaller.appspotmail.com
First crash: 640d, last: 51d
Fix commit to backport (bisect log) :
tree: upstream
commit 00bce6f792caccefa73daeaf9bde82d24d50037f
Author: Jan Kara <jack@suse.cz>
Date: Thu Oct 6 12:22:33 2022 +0000

  udf: Convert udf_mkdir() to new directory iteration code

[report pending]
  
Bug presence (2)
Date Name Commit Repro Result
2023/05/04 linux-6.1.y (ToT) ca48fc16c493 C [report] KASAN: slab-out-of-bounds Write in udf_write_aext
2023/05/04 upstream (ToT) 1a5304fecee5 C Didn't crash
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 KASAN: slab-out-of-bounds Write in udf_write_aext origin:lts-only C error 7050 50d 640d 0/3 upstream: reported C repro on 2023/03/11 18:52
linux-4.14 KASAN: slab-out-of-bounds Write in udf_write_aext udf f2fs tmpfs C 17 646d 808d 0/1 upstream: reported C repro on 2022/09/25 01:59
upstream KASAN: slab-out-of-bounds Write in udf_write_aext udf C error error 674 646d 806d 0/28 auto-obsoleted due to no activity on 2023/07/26 07:31
linux-4.19 KASAN: slab-out-of-bounds Write in udf_write_aext udf tmpfs erofs C error 67 646d 1137d 0/1 upstream: reported C repro on 2021/10/31 06:20
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2023/09/24 05:26 3h39m fix candidate upstream OK (1) job log

Sample crash report:
loop0: detected capacity change from 0 to 2048
UDF-fs: error (device loop0): udf_process_sequence: Primary Volume Descriptor not found!
UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/11/22 14:59 (1000)
==================================================================
BUG: KASAN: slab-out-of-bounds in udf_write_aext+0x6a7/0x7a0 fs/udf/inode.c:2089
Write of size 4 at addr ffff888022d79bf8 by task syz-executor109/3627

CPU: 1 PID: 3627 Comm: syz-executor109 Not tainted 6.1.20-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:284 [inline]
 print_report+0x15f/0x4f0 mm/kasan/report.c:395
 kasan_report+0x136/0x160 mm/kasan/report.c:495
 udf_write_aext+0x6a7/0x7a0 fs/udf/inode.c:2089
 udf_add_entry+0x17b7/0x3350 fs/udf/namei.c:482
 udf_mkdir+0x1a8/0xaa0 fs/udf/namei.c:681
 vfs_mkdir+0x3b6/0x590 fs/namei.c:4036
 do_mkdirat+0x260/0x520 fs/namei.c:4061
 __do_sys_mkdir fs/namei.c:4081 [inline]
 __se_sys_mkdir fs/namei.c:4079 [inline]
 __x64_sys_mkdir+0x6a/0x80 fs/namei.c:4079
 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:0x7f87cfc78219
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 81 14 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:00007ffccf1d2b78 EFLAGS: 00000246 ORIG_RAX: 0000000000000053
RAX: ffffffffffffffda RBX: 00007f87cfced720 RCX: 00007f87cfc78219
RDX: 00007f87cfc36483 RSI: 0000000000000000 RDI: 0000000020000200
RBP: 0000000000000001 R08: 0000000000000c07 R09: 001c00000000000c
R10: 00007ffccf1d2a40 R11: 0000000000000246 R12: 0000000000000004
R13: 0000000000000003 R14: 00007ffccf1d2b97 R15: 00007ffccf1d2b9a
 </TASK>

Allocated by task 3341:
 kasan_save_stack mm/kasan/common.c:45 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
 ____kasan_kmalloc mm/kasan/common.c:374 [inline]
 __kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:383
 kmalloc include/linux/slab.h:553 [inline]
 kzalloc include/linux/slab.h:689 [inline]
 alloc_bprm+0x57/0x700 fs/exec.c:1508
 do_execveat_common+0x1b3/0x720 fs/exec.c:1893
 do_execve fs/exec.c:2016 [inline]
 __do_sys_execve fs/exec.c:2092 [inline]
 __se_sys_execve fs/exec.c:2087 [inline]
 __x64_sys_execve+0x8e/0xa0 fs/exec.c:2087
 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

The buggy address belongs to the object at ffff888022d79800
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 504 bytes to the right of
 512-byte region [ffff888022d79800, ffff888022d79a00)

The buggy address belongs to the physical page:
page:ffffea00008b5e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888022d79800 pfn:0x22d78
head:ffffea00008b5e00 order:2 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 0000000000000000 dead000000000001 ffff888012441c80
raw: ffff888022d79800 000000008010000f 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1550, tgid 1550 (kworker/u4:5), ts 10312954671, free_ts 0
 prep_new_page mm/page_alloc.c:2539 [inline]
 get_page_from_freelist+0x3573/0x3700 mm/page_alloc.c:4291
 __alloc_pages+0x28d/0x7e0 mm/page_alloc.c:5558
 alloc_slab_page+0x6a/0x150 mm/slub.c:1794
 allocate_slab mm/slub.c:1939 [inline]
 new_slab+0x84/0x2d0 mm/slub.c:1992
 ___slab_alloc+0xa71/0x1080 mm/slub.c:3180
 __slab_alloc mm/slub.c:3279 [inline]
 slab_alloc_node mm/slub.c:3364 [inline]
 __kmem_cache_alloc_node+0x19f/0x260 mm/slub.c:3437
 kmalloc_trace+0x26/0x60 mm/slab_common.c:1045
 kmalloc include/linux/slab.h:553 [inline]
 kzalloc include/linux/slab.h:689 [inline]
 alloc_bprm+0x57/0x700 fs/exec.c:1508
 kernel_execve+0x92/0xa10 fs/exec.c:1967
 call_usermodehelper_exec_async+0x22f/0x370 kernel/umh.c:113
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
page_owner free stack trace missing

Memory state around the buggy address:
 ffff888022d79a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888022d79b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888022d79b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                                                ^
 ffff888022d79c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff888022d79c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (5821):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/03/18 13:17 linux-6.1.y 7eaef76fbc46 7939252e .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/06/12 22:09 linux-6.1.y ae9f2a70d69e f815599d .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2024/05/13 09:01 linux-6.1.y 909ba1f1b414 9026e142 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2024/04/18 04:35 linux-6.1.y 6741e066ec76 acc528cb .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2024/03/28 13:08 linux-6.1.y e5cd595e23c1 120789fd .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2024/03/01 10:04 linux-6.1.y 81e1dc2f7001 352ab904 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2024/02/09 07:08 linux-6.1.y f1bb70486c9c 7f07e9b0 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2024/01/26 20:48 linux-6.1.y 883d1a956208 cc4a4020 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2024/01/23 02:16 linux-6.1.y 8fd7f4462453 9bd8dcda .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2023/12/21 18:53 linux-6.1.y 4aa6747d9352 4f9530a3 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2023/11/23 11:46 linux-6.1.y 69e434a1cb21 fc59b78e .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2023/08/13 15:20 linux-6.1.y 1321ab403b38 39990d51 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2023/05/22 15:51 linux-6.1.y fa74641fb6b9 4bce1a3e .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2023/05/14 18:23 linux-6.1.y bf4ad6fa4e53 2b9ba477 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2023/05/07 19:42 linux-6.1.y ca48fc16c493 90c93c40 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2023/03/26 03:19 linux-6.1.y e3a87a10f259 fbf0499a .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2024/10/21 02:38 linux-6.1.y 54d90d17e8ce cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/10/21 02:36 linux-6.1.y 54d90d17e8ce cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/10/19 11:27 linux-6.1.y 54d90d17e8ce cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/10/18 06:33 linux-6.1.y 54d90d17e8ce 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/10/16 16:07 linux-6.1.y aa4cd140bba5 bde2d81c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/10/12 15:43 linux-6.1.y aa4cd140bba5 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/10/08 02:52 linux-6.1.y aa4cd140bba5 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/10/07 22:25 linux-6.1.y aa4cd140bba5 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/10/07 10:12 linux-6.1.y aa4cd140bba5 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/10/07 08:38 linux-6.1.y aa4cd140bba5 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/10/06 12:27 linux-6.1.y aa4cd140bba5 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/10/06 12:24 linux-6.1.y aa4cd140bba5 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/10/03 01:16 linux-6.1.y aa4cd140bba5 02f9582a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/09/28 21:10 linux-6.1.y e526b12bf916 ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/09/28 09:21 linux-6.1.y e526b12bf916 440b26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/09/28 06:34 linux-6.1.y e526b12bf916 440b26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/09/25 07:19 linux-6.1.y e526b12bf916 5643e0e9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/09/20 15:12 linux-6.1.y e526b12bf916 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/09/20 14:37 linux-6.1.y e526b12bf916 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/09/20 09:03 linux-6.1.y e526b12bf916 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/09/19 07:50 linux-6.1.y e526b12bf916 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/09/17 14:37 linux-6.1.y 5f55cad62cc9 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/09/17 14:31 linux-6.1.y 5f55cad62cc9 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/09/17 10:34 linux-6.1.y 5f55cad62cc9 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/09/17 04:30 linux-6.1.y 5f55cad62cc9 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/09/15 17:00 linux-6.1.y 5f55cad62cc9 08d8a733 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/09/08 22:38 linux-6.1.y 5ca5b389fddf 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in udf_write_aext
2024/10/20 22:52 linux-6.1.y 54d90d17e8ce cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2024/10/20 21:30 linux-6.1.y 54d90d17e8ce cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2024/10/20 16:55 linux-6.1.y 54d90d17e8ce cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2024/10/20 07:24 linux-6.1.y 54d90d17e8ce cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2024/10/17 12:23 linux-6.1.y aa4cd140bba5 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2024/10/16 12:38 linux-6.1.y aa4cd140bba5 bde2d81c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2024/10/12 14:16 linux-6.1.y aa4cd140bba5 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2024/09/28 05:25 linux-6.1.y e526b12bf916 440b26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2024/09/23 06:32 linux-6.1.y e526b12bf916 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2024/09/19 13:55 linux-6.1.y e526b12bf916 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2024/09/19 06:13 linux-6.1.y e526b12bf916 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2024/09/17 05:33 linux-6.1.y 5f55cad62cc9 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2024/09/17 02:34 linux-6.1.y 5f55cad62cc9 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2024/09/15 11:17 linux-6.1.y 5f55cad62cc9 08d8a733 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2024/09/13 12:31 linux-6.1.y 5f55cad62cc9 73e8a465 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2024/09/09 11:38 linux-6.1.y 5ca5b389fddf 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2023/03/11 14:11 linux-6.1.y 11585e2f8b9d 5205ef30 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Write in udf_write_aext
2024/05/26 01:40 linux-6.1.y 88690811da69 a10a183e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Write in udf_write_aext
* Struck through repros no longer work on HEAD.