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: 522d, last: 3h09m
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 2885 12h14m 514d 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 23d 67d 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 591d 587d 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 164d 497d 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
attempt to access beyond end of device
loop0: rw=0, want=6491538, limit=128
Buffer I/O error on dev loop0, logical block 3245768, async page read
==================================================================
BUG: KASAN: use-after-free in sysv_new_inode+0x10b4/0x1240 fs/sysv/ialloc.c:153
Read of size 2 at addr ffff88805b01c1ce by task syz.0.17/4349

CPU: 1 PID: 4349 Comm: syz.0.17 Not tainted 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_symlink+0x9b/0x150 fs/sysv/namei.c:80
 vfs_symlink+0x247/0x3d0 fs/namei.c:4429
 do_symlinkat+0x1be/0x6c0 fs/namei.c:4458
 __do_sys_symlink fs/namei.c:4480 [inline]
 __se_sys_symlink fs/namei.c:4478 [inline]
 __x64_sys_symlink+0x7a/0x90 fs/namei.c:4478
 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:0x7f674f07dbe9
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:00007ffe5da19ad8 EFLAGS: 00000246 ORIG_RAX: 0000000000000058
RAX: ffffffffffffffda RBX: 00007f674f2b4fa0 RCX: 00007f674f07dbe9
RDX: 0000000000000000 RSI: 0000200000000140 RDI: 0000200000000100
RBP: 00007f674f100e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f674f2b4fa0 R14: 00007f674f2b4fa0 R15: 0000000000000002
 </TASK>

The buggy address belongs to the page:
page:ffffea00016c0700 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x5b01c
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea00016c0748 ffffea00016dff88 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 0x1100cca(GFP_HIGHUSER_MOVABLE), pid 4318, ts 69757182368, free_ts 69765242719
 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:5487
 alloc_pages_vma+0x393/0x7c0 mm/mempolicy.c:2146
 wp_page_copy+0x235/0x1fd0 mm/memory.c:3056
 handle_pte_fault mm/memory.c:4668 [inline]
 __handle_mm_fault mm/memory.c:4785 [inline]
 handle_mm_fault+0x1eca/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
 exit_mmap+0x3a6/0x5f0 mm/mmap.c:3218
 __mmput+0x115/0x3b0 kernel/fork.c:1127
 exit_mm+0x567/0x6c0 kernel/exit.c:550
 do_exit+0x5a1/0x20a0 kernel/exit.c:870
 do_group_exit+0x12e/0x300 kernel/exit.c:997
 __do_sys_exit_group kernel/exit.c:1008 [inline]
 __se_sys_exit_group kernel/exit.c:1006 [inline]
 __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1006
 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:
 ffff88805b01c080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88805b01c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88805b01c180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                              ^
 ffff88805b01c200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88805b01c280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (2910):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/09/01 23:15 linux-5.15.y 01879f56bdde 807a3b61 .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/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/09/18 19:24 linux-5.15.y 43bb85222e53 e2beed91 .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/09/17 00:38 linux-5.15.y 43bb85222e53 e2beed91 .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/09/16 15:22 linux-5.15.y 43bb85222e53 e2beed91 .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/09/16 10:33 linux-5.15.y 43bb85222e53 e2beed91 .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/09/14 16:29 linux-5.15.y 43bb85222e53 e2beed91 .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/09/14 05:40 linux-5.15.y 43bb85222e53 e2beed91 .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/09/07 15:47 linux-5.15.y 7a6c2d093c45 d291dd2d .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/09/07 15:34 linux-5.15.y 7a6c2d093c45 d291dd2d .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/09/07 09:28 linux-5.15.y 7a6c2d093c45 d291dd2d .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/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
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.