syzbot


KASAN: use-after-free Read in sysv_new_inode

Status: upstream: reported C repro on 2024/04/14 13:45
Reported-by: syzbot+3d6b2fd70949d09bcec7@syzkaller.appspotmail.com
First crash: 301d, last: 59m
Bug presence (1)
Date Name Commit Repro Result
2025/01/28 upstream (ToT) 13845bdc869f C Failed due to an error; will retry later
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 KASAN: use-after-free Read in sysv_new_inode origin:upstream C 1437 14m 293d 0/3 upstream: reported C repro on 2024/04/22 17:59
upstream KASAN: use-after-free Read in sysv_new_inode fs 1 370d 366d 0/28 auto-obsoleted due to no activity on 2024/04/05 09:37
upstream KASAN: use-after-free Read in sysv_new_inode (2) fs C inconclusive 14288 now 276d 0/28 upstream: reported C repro on 2024/05/09 07:33
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2024/08/31 22:55 1h57m bisect fix linux-5.15.y OK (0) job log log

Sample crash report:
loop0: detected capacity change from 0 to 128
VFS: Found a Xenix FS (block size = 1024) on device loop0
==================================================================
BUG: KASAN: use-after-free in sysv_new_inode+0x1062/0x11f0 fs/sysv/ialloc.c:153
Read of size 2 at addr ffff8880715fe1ce by task syz-executor226/4165

CPU: 1 PID: 4165 Comm: syz-executor226 Not tainted 5.15.177-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/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
 sysv_new_inode+0x1062/0x11f0 fs/sysv/ialloc.c:153
 sysv_mknod+0x4a/0xe0 fs/sysv/namei.c:53
 lookup_open fs/namei.c:3462 [inline]
 open_last_lookups fs/namei.c:3532 [inline]
 path_openat+0x130a/0x2f20 fs/namei.c:3739
 do_filp_open+0x21c/0x460 fs/namei.c:3769
 do_sys_openat2+0x13b/0x4f0 fs/open.c:1253
 do_sys_open fs/open.c:1269 [inline]
 __do_sys_openat fs/open.c:1285 [inline]
 __se_sys_openat fs/open.c:1280 [inline]
 __x64_sys_openat+0x243/0x290 fs/open.c:1280
 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:0x7f82f7650129
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 21 18 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffcf1f83118 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f82f7650129
RDX: 000000000000275a RSI: 0000000020000080 RDI: 00000000ffffff9c
RBP: 0000000000000004 R08: 0000000000009e7e R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffcf1f83160
R13: 00007ffcf1f831a0 R14: 0000000000010000 R15: 0000000000000003
 </TASK>

The buggy address belongs to the page:
page:ffffea0001c57f80 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x715fe
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea0001c567c8 ffffea0001c57848 0000000000000000
raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 0, migratetype Movable, gfp_mask 0x1100dca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO), pid 4163, ts 58663712342, free_ts 58793553914
 prep_new_page mm/page_alloc.c:2426 [inline]
 get_page_from_freelist+0x3b78/0x3d40 mm/page_alloc.c:4192
 __alloc_pages+0x272/0x700 mm/page_alloc.c:5465
 alloc_pages_vma+0x39a/0x800 mm/mempolicy.c:2146
 do_anonymous_page mm/memory.c:3836 [inline]
 handle_pte_fault mm/memory.c:4646 [inline]
 __handle_mm_fault mm/memory.c:4783 [inline]
 handle_mm_fault+0x2f49/0x5960 mm/memory.c:4881
 do_user_addr_fault arch/x86/mm/fault.c:1357 [inline]
 handle_page_fault arch/x86/mm/fault.c:1445 [inline]
 exc_page_fault+0x271/0x700 arch/x86/mm/fault.c:1501
 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:606
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1340 [inline]
 free_pcp_prepare mm/page_alloc.c:1391 [inline]
 free_unref_page_prepare+0xc34/0xcf0 mm/page_alloc.c:3317
 free_unref_page_list+0x1f7/0x8e0 mm/page_alloc.c:3433
 release_pages+0x1bb9/0x1f40 mm/swap.c:963
 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline]
 tlb_flush_mmu_free mm/mmu_gather.c:240 [inline]
 tlb_flush_mmu mm/mmu_gather.c:247 [inline]
 tlb_finish_mmu+0x177/0x320 mm/mmu_gather.c:338
 exit_mmap+0x3cd/0x620 mm/mmap.c:3206
 __mmput+0x112/0x3b0 kernel/fork.c:1127
 exit_mm+0x688/0x7f0 kernel/exit.c:550
 do_exit+0x626/0x2480 kernel/exit.c:861
 do_group_exit+0x144/0x310 kernel/exit.c:996
 __do_sys_exit_group kernel/exit.c:1007 [inline]
 __se_sys_exit_group kernel/exit.c:1005 [inline]
 __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1005
 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

Memory state around the buggy address:
 ffff8880715fe080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8880715fe100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8880715fe180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                              ^
 ffff8880715fe200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8880715fe280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (1464):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/01/27 04:13 linux-5.15.y 003148680b79 9fbd772e .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2024/12/18 16:00 linux-5.15.y 963e654022cc a0626d3a .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in sysv_new_inode
2024/05/04 21:20 linux-5.15.y 284087d4f7d5 610f2a54 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in sysv_new_inode
2025/02/09 16:59 linux-5.15.y c16c81c81336 ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/09 15:00 linux-5.15.y c16c81c81336 ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/09 12:53 linux-5.15.y c16c81c81336 ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/08 13:49 linux-5.15.y c16c81c81336 ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/08 04:25 linux-5.15.y c16c81c81336 ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/08 00:13 linux-5.15.y c16c81c81336 ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/07 23:42 linux-5.15.y c16c81c81336 ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/07 20:31 linux-5.15.y c16c81c81336 ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/07 17:31 linux-5.15.y c16c81c81336 53657d1b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/07 11:09 linux-5.15.y c16c81c81336 53657d1b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/07 03:30 linux-5.15.y c16c81c81336 8002dd28 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/07 02:51 linux-5.15.y c16c81c81336 8002dd28 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/05 16:59 linux-5.15.y c16c81c81336 4dc70884 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/05 15:14 linux-5.15.y c16c81c81336 4dc70884 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/05 14:51 linux-5.15.y c16c81c81336 4dc70884 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/05 06:03 linux-5.15.y c16c81c81336 5896748e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/05 03:37 linux-5.15.y c16c81c81336 5896748e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/04 23:28 linux-5.15.y c16c81c81336 5896748e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/04 20:31 linux-5.15.y c16c81c81336 8f267cef .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/04 15:06 linux-5.15.y c16c81c81336 8f267cef .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/04 13:14 linux-5.15.y c16c81c81336 8f267cef .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/04 03:01 linux-5.15.y c16c81c81336 8f267cef .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/03 15:40 linux-5.15.y c16c81c81336 a21a8419 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/02 18:22 linux-5.15.y c16c81c81336 568559e4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/02 12:47 linux-5.15.y c16c81c81336 568559e4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in sysv_new_inode
2025/02/10 03:48 linux-5.15.y c16c81c81336 ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in sysv_new_inode
2025/02/10 00:57 linux-5.15.y c16c81c81336 ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in sysv_new_inode
2025/02/09 16:52 linux-5.15.y c16c81c81336 ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in sysv_new_inode
2025/02/09 05:17 linux-5.15.y c16c81c81336 ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in sysv_new_inode
2025/02/09 01:44 linux-5.15.y c16c81c81336 ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in sysv_new_inode
2025/02/07 07:27 linux-5.15.y c16c81c81336 53657d1b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in sysv_new_inode
2025/02/07 05:38 linux-5.15.y c16c81c81336 8002dd28 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in sysv_new_inode
2025/02/06 13:44 linux-5.15.y c16c81c81336 577d049b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in sysv_new_inode
2025/02/06 11:31 linux-5.15.y c16c81c81336 577d049b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in sysv_new_inode
2025/02/06 10:19 linux-5.15.y c16c81c81336 577d049b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in sysv_new_inode
2025/02/06 07:42 linux-5.15.y c16c81c81336 577d049b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in sysv_new_inode
2025/02/05 11:56 linux-5.15.y c16c81c81336 5896748e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in sysv_new_inode
2025/02/04 04:51 linux-5.15.y c16c81c81336 8f267cef .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in sysv_new_inode
2025/02/04 00:26 linux-5.15.y c16c81c81336 8f267cef .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in sysv_new_inode
2025/02/03 11:58 linux-5.15.y c16c81c81336 a21a8419 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in sysv_new_inode
2025/02/03 10:25 linux-5.15.y c16c81c81336 568559e4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in sysv_new_inode
2025/02/03 03:50 linux-5.15.y c16c81c81336 568559e4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in sysv_new_inode
2025/02/03 03:50 linux-5.15.y c16c81c81336 568559e4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in sysv_new_inode
2025/02/03 01:12 linux-5.15.y c16c81c81336 568559e4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in sysv_new_inode
2025/02/02 23:25 linux-5.15.y c16c81c81336 568559e4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in sysv_new_inode
2024/04/14 13:44 linux-5.15.y fa3df276cd36 c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in sysv_new_inode
2025/01/03 13:43 linux-5.15.y 91786f140358 d3ccff63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: out-of-bounds Read in sysv_new_inode
2025/01/15 13:44 linux-5.15.y 4735586da88e 7315a7cf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in sysv_new_inode
* Struck through repros no longer work on HEAD.