syzbot


KASAN: use-after-free Read in leaf_paste_entries (2)

Status: upstream: reported C repro on 2025/11/10 10:16
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+9145cb498df875fd6176@syzkaller.appspotmail.com
First crash: 177d, last: 2d22h
Bug presence (2)
Date Name Commit Repro Result
2025/11/11 linux-6.6.y (ToT) 0a805b6ea8cd C [report] KASAN: use-after-free Read in leaf_paste_entries
2025/11/11 upstream (ToT) 4427259cc7f7 C Didn't crash
Similar bugs (9)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 KASAN: out-of-bounds Read in leaf_paste_entries reiserfs 19 C error 73 1160d 1999d 0/1 upstream: reported C repro on 2020/11/14 23:23
linux-5.15 KASAN: out-of-bounds Read in leaf_paste_entries missing-backport origin:upstream 19 C done 155 17d 1150d 0/3 upstream: reported C repro on 2023/03/13 09:08
linux-4.14 KASAN: use-after-free Read in leaf_paste_entries 19 C done 6 1958d 2001d 1/1 fixed on 2021/01/26 16:42
linux-6.1 KASAN: out-of-bounds Read in leaf_paste_entries origin:upstream missing-backport 19 C done 146 3d01h 1145d 0/3 upstream: reported C repro on 2023/03/18 05:48
linux-4.19 KASAN: use-after-free Read in leaf_paste_entries 19 C done 1 1964d 1964d 1/1 fixed on 2021/01/19 18:33
upstream KASAN: out-of-bounds Read in leaf_paste_entries (2) fs 19 C inconclusive inconclusive 327 831d 1605d 0/29 auto-obsoleted due to no activity on 2024/04/06 02:37
linux-4.14 KASAN: out-of-bounds Read in leaf_paste_entries reiserfs 19 C error 13 1228d 2039d 0/1 upstream: reported C repro on 2020/10/05 14:11
linux-6.6 KASAN: use-after-free Read in leaf_paste_entries 19 1 305d 305d 0/2 auto-obsoleted due to no activity on 2025/10/13 10:20
upstream KASAN: out-of-bounds Read in leaf_paste_entries fs 17 C inconclusive 8 1670d 1901d 20/29 fixed on 2021/11/10 00:50
Fix bisection attempts (3)
Created Duration User Patch Repo Result
2026/03/27 17:04 1m fix candidate upstream error job log
2026/02/24 06:09 1m fix candidate upstream error job log
2026/01/24 20:37 1m fix candidate upstream error job log

Sample crash report:
REISERFS (device loop0): Using tea hash to sort names
REISERFS (device loop0): Created .reiserfs_priv - reserved for xattr storage.
==================================================================
BUG: KASAN: use-after-free in leaf_paste_entries+0x49e/0x10e0 fs/reiserfs/lbalance.c:1362
Read of size 2 at addr ffff88805c5f600c by task syz.0.17/5926

CPU: 1 PID: 5926 Comm: syz.0.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:364 [inline]
 print_report+0xa8/0x210 mm/kasan/report.c:468
 kasan_report+0x117/0x150 mm/kasan/report.c:581
 leaf_paste_entries+0x49e/0x10e0 fs/reiserfs/lbalance.c:1362
 leaf_copy_dir_entries+0x6ee/0x9e0 fs/reiserfs/lbalance.c:119
 leaf_copy_boundary_item+0xb8c/0x21b0 fs/reiserfs/lbalance.c:168
 leaf_copy_items fs/reiserfs/lbalance.c:551 [inline]
 leaf_move_items+0x8cf/0xec0 fs/reiserfs/lbalance.c:726
 leaf_shift_left+0xbd/0x450 fs/reiserfs/lbalance.c:750
 balance_leaf_when_delete_left fs/reiserfs/do_balan.c:194 [inline]
 balance_leaf_when_delete fs/reiserfs/do_balan.c:272 [inline]
 balance_leaf+0x132e/0x10df0 fs/reiserfs/do_balan.c:1393
 do_balance+0x31c/0x930 fs/reiserfs/do_balan.c:1888
 reiserfs_cut_from_item+0x156e/0x1fe0 fs/reiserfs/stree.c:1836
 reiserfs_do_truncate+0x9c2/0x12d0 fs/reiserfs/stree.c:1971
 reiserfs_truncate_file+0x480/0x7d0 fs/reiserfs/inode.c:2306
 reiserfs_setattr+0xc1e/0x1230 fs/reiserfs/inode.c:3392
 notify_change+0xb0d/0xe10 fs/attr.c:499
 do_truncate+0x1b0/0x240 fs/open.c:66
 handle_truncate fs/namei.c:3299 [inline]
 do_open fs/namei.c:3644 [inline]
 path_openat+0x2a32/0x3230 fs/namei.c:3797
 do_filp_open+0x1f5/0x430 fs/namei.c:3824
 do_sys_openat2+0x134/0x1d0 fs/open.c:1421
 do_sys_open fs/open.c:1436 [inline]
 __do_sys_open fs/open.c:1444 [inline]
 __se_sys_open fs/open.c:1440 [inline]
 __x64_sys_open+0x11f/0x140 fs/open.c:1440
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f220eb9cdd9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc45fc08f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000002
RAX: ffffffffffffffda RBX: 00007f220ee15fa0 RCX: 00007f220eb9cdd9
RDX: 0000000000000000 RSI: 000000000014937e RDI: 00002000000002c0
RBP: 00007f220ec32d69 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f220ee15fac R14: 00007f220ee15fa0 R15: 00007f220ee15fa0
 </TASK>

The buggy address belongs to the physical page:
page:ffffea0001717d80 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x5c5f6
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000000 ffffea0001717e88 ffff8880b8f41f20 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 0x141cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP|__GFP_WRITE), pid 5926, tgid 5926 (syz.0.17), ts 100053904207, free_ts 100060280586
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x1c1/0x200 mm/page_alloc.c:1581
 prep_new_page mm/page_alloc.c:1588 [inline]
 get_page_from_freelist+0x1951/0x19e0 mm/page_alloc.c:3220
 __alloc_pages+0x1f0/0x460 mm/page_alloc.c:4500
 folio_alloc+0x1e/0x30 mm/mempolicy.c:2289
 filemap_alloc_folio+0xdf/0x490 mm/filemap.c:1004
 __filemap_get_folio+0x3ea/0xbb0 mm/filemap.c:1962
 pagecache_get_page+0x2a/0x250 mm/folio-compat.c:99
 reiserfs_write_begin+0x54/0x4c0 fs/reiserfs/inode.c:2755
 generic_cont_expand_simple+0x141/0x200 fs/buffer.c:2482
 reiserfs_setattr+0x558/0x1230 fs/reiserfs/inode.c:3302
 notify_change+0xb0d/0xe10 fs/attr.c:499
 do_truncate+0x1b0/0x240 fs/open.c:66
 vfs_truncate+0x266/0x300 fs/open.c:112
 do_sys_truncate+0xf6/0x1c0 fs/open.c:135
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1181 [inline]
 free_unref_page_prepare+0x7b2/0x8c0 mm/page_alloc.c:2365
 free_unref_page_list+0xbe/0x860 mm/page_alloc.c:2504
 release_pages+0x1f7a/0x2200 mm/swap.c:1022
 __folio_batch_release+0x71/0xe0 mm/swap.c:1042
 folio_batch_release include/linux/pagevec.h:83 [inline]
 truncate_inode_pages_range+0x3b9/0xfb0 mm/truncate.c:396
 truncate_inode_pages mm/truncate.c:473 [inline]
 truncate_pagecache mm/truncate.c:766 [inline]
 truncate_setsize+0xbd/0xe0 mm/truncate.c:791
 reiserfs_setattr+0xc11/0x1230 fs/reiserfs/inode.c:3391
 notify_change+0xb0d/0xe10 fs/attr.c:499
 do_truncate+0x1b0/0x240 fs/open.c:66
 handle_truncate fs/namei.c:3299 [inline]
 do_open fs/namei.c:3644 [inline]
 path_openat+0x2a32/0x3230 fs/namei.c:3797
 do_filp_open+0x1f5/0x430 fs/namei.c:3824
 do_sys_openat2+0x134/0x1d0 fs/open.c:1421
 do_sys_open fs/open.c:1436 [inline]
 __do_sys_open fs/open.c:1444 [inline]
 __se_sys_open fs/open.c:1440 [inline]
 __x64_sys_open+0x11f/0x140 fs/open.c:1440
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Memory state around the buggy address:
 ffff88805c5f5f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88805c5f5f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88805c5f6000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                      ^
 ffff88805c5f6080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88805c5f6100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (11):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/05/04 06:18 linux-6.6.y 258cf62a6dfd a0d91488 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-6-kasan KASAN: use-after-free Read in leaf_paste_entries
2025/11/10 11:51 linux-6.6.y 0a805b6ea8cd 4e1406b4 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-6-kasan KASAN: use-after-free Read in leaf_paste_entries
2025/11/10 11:04 linux-6.6.y 0a805b6ea8cd 4e1406b4 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-6-kasan KASAN: slab-out-of-bounds Read in leaf_paste_entries
2026/05/04 05:41 linux-6.6.y 258cf62a6dfd a0d91488 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: use-after-free Read in leaf_paste_entries
2026/05/04 05:41 linux-6.6.y 258cf62a6dfd a0d91488 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: use-after-free Read in leaf_paste_entries
2025/11/10 10:15 linux-6.6.y 0a805b6ea8cd 4e1406b4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: use-after-free Read in leaf_paste_entries
2026/01/10 22:17 linux-6.6.y 5fa4793a2d2d d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: out-of-bounds Read in leaf_paste_entries
2026/01/04 12:25 linux-6.6.y 5fa4793a2d2d d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: out-of-bounds Read in leaf_paste_entries
2025/12/18 22:59 linux-6.6.y 5fa4793a2d2d d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: out-of-bounds Read in leaf_paste_entries
2025/12/12 20:24 linux-6.6.y 5fa4793a2d2d d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: out-of-bounds Read in leaf_paste_entries
2025/12/04 02:12 linux-6.6.y 4791134e4aeb d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: out-of-bounds Read in leaf_paste_entries
* Struck through repros no longer work on HEAD.