syzbot


KASAN: slab-use-after-free Read in list_lru_del

Status: upstream: reported syz repro on 2025/02/06 17:01
Subsystems: mm bcachefs
[Documentation on labels]
Reported-by: syzbot+6663075ddb9be85fa6e5@syzkaller.appspotmail.com
First crash: 1d12h, last: 1d04h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [mm?] [bcachefs?] KASAN: slab-use-after-free Read in list_lru_del 0 (1) 2025/02/06 17:01
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: corrupted list in list_lru_del mm 2 784d 824d 0/28 auto-obsoleted due to no activity on 2023/03/15 19:34

Sample crash report:
 slab radix_tree_node start ffff8880411d9600 pointer offset 24 size 576
list_del corruption. next->prev should be ffff88803f847358, but was 0000000008000105. (next=ffff8880411d9618)
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:67!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5628 Comm: modprobe Not tainted 6.14.0-rc1-syzkaller-00034-g92514ef226f5 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:__list_del_entry_valid_or_report+0x18c/0x190 lib/list_debug.c:65
Code: ba 56 15 fd 42 80 3c 2b 00 74 08 4c 89 e7 e8 7b 02 37 fd 49 8b 56 08 48 c7 c7 20 8f 60 8c 4c 89 fe 4c 89 f1 e8 65 10 38 fc 90 <0f> 0b 66 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f
RSP: 0018:ffffc9000cdced10 EFLAGS: 00010046
RAX: 000000000000006d RBX: 1ffff1100823b2c4 RCX: a96f20814868f300
RDX: 0000000000000000 RSI: 0000000080000002 RDI: 0000000000000000
RBP: ffff888032fbde80 R08: ffffffff819f146c R09: fffffbfff1cfa588
R10: dffffc0000000000 R11: fffffbfff1cfa588 R12: ffff8880411d9620
R13: dffffc0000000000 R14: ffff8880411d9618 R15: ffff88803f847358
FS:  0000000000000000(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff0ee1cb270 CR3: 0000000000712000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __list_del_entry_valid include/linux/list.h:124 [inline]
 __list_del_entry include/linux/list.h:215 [inline]
 list_del_init include/linux/list.h:287 [inline]
 list_lru_del+0x9a/0x1f0 mm/list_lru.c:206
 list_lru_del_obj+0x17b/0x250 mm/list_lru.c:223
 workingset_update_node+0x174/0x230 mm/workingset.c:636
 xas_update lib/xarray.c:356 [inline]
 update_node lib/xarray.c:764 [inline]
 xas_store+0xb89/0x1870 lib/xarray.c:851
 __filemap_add_folio+0xab1/0x1320 mm/filemap.c:925
 filemap_add_folio+0x155/0x380 mm/filemap.c:981
 __filemap_get_folio+0x52b/0xae0 mm/filemap.c:1980
 grow_dev_folio fs/buffer.c:1039 [inline]
 grow_buffers fs/buffer.c:1105 [inline]
 __getblk_slow fs/buffer.c:1131 [inline]
 bdev_getblk+0x1d4/0x670 fs/buffer.c:1431
 getblk_unmovable include/linux/buffer_head.h:369 [inline]
 ext4_getblk+0x31b/0x880 fs/ext4/inode.c:864
 ext4_bread_batch+0x63/0x4e0 fs/ext4/inode.c:933
 __ext4_find_entry+0xfab/0x1eb0 fs/ext4/namei.c:1627
 ext4_lookup_entry fs/ext4/namei.c:1729 [inline]
 ext4_lookup+0x15f/0x750 fs/ext4/namei.c:1797
 __lookup_slow+0x296/0x400 fs/namei.c:1793
 lookup_slow+0x53/0x70 fs/namei.c:1810
 walk_component fs/namei.c:2114 [inline]
 link_path_walk+0x99b/0xea0 fs/namei.c:2479
 path_openat+0x266/0x3590 fs/namei.c:3985
 do_filp_open+0x27f/0x4e0 fs/namei.c:4016
 do_sys_openat2+0x13e/0x1d0 fs/open.c:1427
 do_sys_open fs/open.c:1442 [inline]
 __do_sys_openat fs/open.c:1458 [inline]
 __se_sys_openat fs/open.c:1453 [inline]
 __x64_sys_openat+0x247/0x2a0 fs/open.c:1453
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ff0ee472a46
Code: 10 00 00 00 44 8b 54 24 e0 48 89 44 24 c0 48 8d 44 24 d0 48 89 44 24 c8 44 89 c2 4c 89 ce bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 0c f7 d8 89 05 0a 48 01 00 48 83 c8 ff c3 31
RSP: 002b:00007ffdd50a1c28 EFLAGS: 00000287 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007ffdd50a1e88 RCX: 00007ff0ee472a46
RDX: 0000000000080000 RSI: 00007ffdd50a1ca0 RDI: 00000000ffffff9c
RBP: 00007ffdd50a1c90 R08: 0000000000080000 R09: 00007ffdd50a1ca0
R10: 0000000000000000 R11: 0000000000000287 R12: 00007ffdd50a1ca0
R13: 0000000000000000 R14: 00007ffdd50a1e6f R15: 00000000ffffffff
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__list_del_entry_valid_or_report+0x18c/0x190 lib/list_debug.c:65
Code: ba 56 15 fd 42 80 3c 2b 00 74 08 4c 89 e7 e8 7b 02 37 fd 49 8b 56 08 48 c7 c7 20 8f 60 8c 4c 89 fe 4c 89 f1 e8 65 10 38 fc 90 <0f> 0b 66 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f
RSP: 0018:ffffc9000cdced10 EFLAGS: 00010046
RAX: 000000000000006d RBX: 1ffff1100823b2c4 RCX: a96f20814868f300
RDX: 0000000000000000 RSI: 0000000080000002 RDI: 0000000000000000
RBP: ffff888032fbde80 R08: ffffffff819f146c R09: fffffbfff1cfa588
R10: dffffc0000000000 R11: fffffbfff1cfa588 R12: ffff8880411d9620
R13: dffffc0000000000 R14: ffff8880411d9618 R15: ffff88803f847358
FS:  0000000000000000(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff0ee1cb270 CR3: 0000000000712000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/02/06 13:59 upstream 92514ef226f5 1e1faf27 .config console log report syz / log [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root BUG: corrupted list in list_lru_del
2025/02/06 06:31 upstream 92514ef226f5 577d049b .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Read in list_lru_del
* Struck through repros no longer work on HEAD.