syzbot


KASAN: use-after-free Read in sysv_new_inode

Status: upstream: reported C repro on 2024/04/14 13:45
Bug presence: origin:upstream
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+3d6b2fd70949d09bcec7@syzkaller.appspotmail.com
First crash: 501d, last: 3h46m
Fix commit to backport (bisect log) :
tree: upstream
commit 00dac020ca2a2d82c3e4057a930794cca593ea77
Author: Eric Sandeen <sandeen@redhat.com>
Date: Wed Feb 5 22:30:09 2025 +0000

  sysv: convert sysv to use the new mount api

  
Fix bisection: the issue occurs on the latest tested release (bisect log)
Crash: KASAN: use-after-free Read in sysv_new_inode (log)
Repro: C syz .config
  
Bug presence (3)
Date Name Commit Repro Result
2025/05/05 linux-5.15.y (ToT) 16fdf2c7111b C [report] KASAN: use-after-free Read in sysv_new_inode
2025/03/16 upstream (ToT) cb82ca153949 C [report] KASAN: use-after-free Read in sysv_new_inode
2025/05/05 upstream (ToT) 92a09c47464d C Didn't crash
Similar bugs (4)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 KASAN: use-after-free Read in sysv_new_inode origin:upstream missing-backport 19 C inconclusive 2844 3h43m 493d 0/3 upstream: reported C repro on 2024/04/22 17:59
linux-6.6 KASAN: use-after-free Read in sysv_new_inode origin:lts-only 19 C 11 2d08h 46d 0/2 upstream: reported C repro on 2025/07/13 15:52
upstream KASAN: use-after-free Read in sysv_new_inode fs 19 1 570d 566d 0/29 auto-obsoleted due to no activity on 2024/04/05 09:37
upstream KASAN: use-after-free Read in sysv_new_inode (2) fs 19 C inconclusive error 21224 143d 476d 29/29 fixed on 2025/07/16 08:24
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2025/06/04 22:42 8h26m fix candidate upstream OK (1) job log
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+0x10b4/0x1240 fs/sysv/ialloc.c:153
Read of size 2 at addr ffff88806bfd91ce by task syz.0.17/4326

CPU: 0 PID: 4326 Comm: syz.0.17 Not tainted 5.15.189-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106
 print_address_description+0x60/0x2d0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:434 [inline]
 kasan_report+0xdf/0x130 mm/kasan/report.c:451
 sysv_new_inode+0x10b4/0x1240 fs/sysv/ialloc.c:153
 sysv_mknod+0x4a/0xd0 fs/sysv/namei.c:53
 lookup_open fs/namei.c:3462 [inline]
 open_last_lookups fs/namei.c:3532 [inline]
 path_openat+0x11e1/0x2f30 fs/namei.c:3739
 do_filp_open+0x1b3/0x3e0 fs/namei.c:3769
 do_sys_openat2+0x142/0x4a0 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+0x135/0x160 fs/open.c:1280
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f695d485be9
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffec97497f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f695d6acfa0 RCX: 00007f695d485be9
RDX: 0000000000000042 RSI: 0000200000000440 RDI: ffffffffffffff9c
RBP: 00007f695d508e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f695d6acfa0 R14: 00007f695d6acfa0 R15: 0000000000000004
 </TASK>

The buggy address belongs to the page:
page:ffffea0001aff640 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x6bfd9
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea0001aff188 ffffea0001aff4c8 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 4326, ts 67398949609, free_ts 67408960513
 prep_new_page mm/page_alloc.c:2426 [inline]
 get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192
 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5474
 alloc_pages_vma+0x393/0x7c0 mm/mempolicy.c:2146
 do_anonymous_page mm/memory.c:3838 [inline]
 handle_pte_fault mm/memory.c:4648 [inline]
 __handle_mm_fault mm/memory.c:4785 [inline]
 handle_mm_fault+0x2382/0x43c0 mm/memory.c:4883
 do_user_addr_fault+0x489/0xc80 arch/x86/mm/fault.c:1357
 handle_page_fault arch/x86/mm/fault.c:1445 [inline]
 exc_page_fault+0x60/0x100 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+0x637/0x6c0 mm/page_alloc.c:3317
 free_unref_page_list+0x122/0x7e0 mm/page_alloc.c:3433
 release_pages+0x184b/0x1bb0 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+0x164/0x2e0 mm/mmu_gather.c:338
 unmap_region+0x315/0x360 mm/mmap.c:2665
 __do_munmap+0x9d3/0xdc0 mm/mmap.c:2895
 __vm_munmap+0x137/0x230 mm/mmap.c:2948
 __do_sys_munmap mm/mmap.c:2974 [inline]
 __se_sys_munmap mm/mmap.c:2970 [inline]
 __x64_sys_munmap+0x67/0x70 mm/mmap.c:2970
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

Memory state around the buggy address:
 ffff88806bfd9080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88806bfd9100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88806bfd9180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                              ^
 ffff88806bfd9200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88806bfd9280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (2892):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/23 18:22 linux-5.15.y c79648372d02 bf27483f .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
2025/05/13 12:43 linux-5.15.y 3b8db0e4f263 f6671af7 .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
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
2025/05/08 01:47 linux-5.15.y 16fdf2c7111b dbf35fa1 .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/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/08/28 21:31 linux-5.15.y 01879f56bdde d401b9d7 .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/08/27 13:00 linux-5.15.y c79648372d02 e12e5ba4 .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/08/26 13:29 linux-5.15.y c79648372d02 bf27483f .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/08/26 02:27 linux-5.15.y c79648372d02 bf27483f .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/08/25 00:41 linux-5.15.y c79648372d02 bf27483f .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/08/23 17:56 linux-5.15.y c79648372d02 bf27483f .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/08/18 05:59 linux-5.15.y c79648372d02 1804e95e .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/08/16 16:23 linux-5.15.y c79648372d02 1804e95e .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/08/14 08:18 linux-5.15.y c79648372d02 22ec1469 .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/08/11 03:34 linux-5.15.y c79648372d02 32a0e5ed .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/08/04 06:04 linux-5.15.y c79648372d02 7368264b .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/08/03 04:33 linux-5.15.y c79648372d02 7368264b .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/07/28 14:17 linux-5.15.y c79648372d02 6654ea9c .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/07/28 14:15 linux-5.15.y c79648372d02 6654ea9c .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/07/27 17:27 linux-5.15.y c79648372d02 fb8f743d .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/07/26 23:09 linux-5.15.y c79648372d02 fb8f743d .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/07/22 04:31 linux-5.15.y c79648372d02 1555463b .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/07/21 20:56 linux-5.15.y c79648372d02 56d87229 .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/08/26 17:23 linux-5.15.y c79648372d02 e12e5ba4 .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/08/18 13:59 linux-5.15.y c79648372d02 1804e95e .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/08/18 13:57 linux-5.15.y c79648372d02 1804e95e .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/08/14 21:21 linux-5.15.y c79648372d02 5d8c2ac2 .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/08/06 21:32 linux-5.15.y c79648372d02 ffe1dd46 .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/08/04 00:30 linux-5.15.y c79648372d02 7368264b .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/08/04 00:12 linux-5.15.y c79648372d02 7368264b .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/08/03 19:01 linux-5.15.y c79648372d02 7368264b .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/07/30 10:02 linux-5.15.y c79648372d02 f8f2b4da .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/07/29 06:37 linux-5.15.y c79648372d02 c4a95487 .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/07/28 22:10 linux-5.15.y c79648372d02 6654ea9c .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/07/28 07:18 linux-5.15.y c79648372d02 fb8f743d .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/07/28 05:32 linux-5.15.y c79648372d02 fb8f743d .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/07/27 21:40 linux-5.15.y c79648372d02 fb8f743d .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/07/27 15:10 linux-5.15.y c79648372d02 fb8f743d .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/07/25 21:51 linux-5.15.y c79648372d02 fb8f743d .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/07/23 03:55 linux-5.15.y c79648372d02 e1dd4f22 .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/07/23 03:54 linux-5.15.y c79648372d02 e1dd4f22 .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/07/22 14:30 linux-5.15.y c79648372d02 8e9d1dc1 .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/07/22 00:41 linux-5.15.y c79648372d02 1555463b .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/07/21 10:37 linux-5.15.y c79648372d02 56d87229 .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/07/21 06:48 linux-5.15.y c79648372d02 7117feec .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/07/21 03:14 linux-5.15.y c79648372d02 7117feec .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/07/20 14:59 linux-5.15.y c79648372d02 7117feec .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/07/20 11:30 linux-5.15.y c79648372d02 7117feec .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/03/25 15:41 linux-5.15.y 0c935c049b5c 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds 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
* Struck through repros no longer work on HEAD.