Hello,
syzbot found the following issue on:
HEAD commit: 228da13e907e Linux 6.1.175
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=1148d8ae580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=29caf4bae4b0566f
dashboard link:
https://syzkaller.appspot.com/bug?extid=0437695a987b689f5fde
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
userspace arch: arm64
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/bf27a408696a/disk-228da13e.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/264d4943ab43/vmlinux-228da13e.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/a499b0d2a133/Image-228da13e.gz.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+043769...@syzkaller.appspotmail.com
ERROR: (device loop0): release_metapage: write_one_page() failed
ERROR: (device loop0): remounting filesystem as read-only
==================================================================
BUG: KASAN: use-after-free in drop_metapage fs/jfs/jfs_metapage.c:223 [inline]
BUG: KASAN: use-after-free in release_metapage+0x718/0xc6c fs/jfs/jfs_metapage.c:757
Read of size 8 at addr ffff0000cfce27e8 by task syz.0.20/4488
CPU: 0 PID: 4488 Comm: syz.0.20 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/02/2026
Call trace:
dump_backtrace+0x1c0/0x1ec arch/arm64/kernel/stacktrace.c:158
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
__dump_stack+0x30/0x40 lib/dump_stack.c:88
dump_stack_lvl+0xf4/0x15c lib/dump_stack.c:106
print_address_description+0x88/0x218 mm/kasan/report.c:316
print_report+0x50/0x68 mm/kasan/report.c:420
kasan_report+0xa8/0xfc mm/kasan/report.c:524
__asan_report_load8_noabort+0x2c/0x38 mm/kasan/report_generic.c:351
drop_metapage fs/jfs/jfs_metapage.c:223 [inline]
release_metapage+0x718/0xc6c fs/jfs/jfs_metapage.c:757
write_metapage fs/jfs/jfs_metapage.h:75 [inline]
flush_metapage fs/jfs/jfs_metapage.h:81 [inline]
ea_put fs/jfs/xattr.c:623 [inline]
__jfs_setxattr+0xc14/0xfb8 fs/jfs/xattr.c:792
__jfs_xattr_set+0xe0/0x178 fs/jfs/xattr.c:941
jfs_xattr_set+0x58/0x70 fs/jfs/xattr.c:965
__vfs_setxattr+0x384/0x3a0 fs/xattr.c:182
__vfs_setxattr_noperm+0x120/0x564 fs/xattr.c:216
__vfs_setxattr_locked+0x1ec/0x218 fs/xattr.c:277
vfs_setxattr+0x158/0x2ac fs/xattr.c:309
do_setxattr fs/xattr.c:594 [inline]
setxattr+0x258/0x2d8 fs/xattr.c:617
path_setxattr+0x130/0x260 fs/xattr.c:636
__do_sys_lsetxattr fs/xattr.c:659 [inline]
__se_sys_lsetxattr fs/xattr.c:655 [inline]
__arm64_sys_lsetxattr+0xbc/0xd8 fs/xattr.c:655
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
do_el0_svc+0x58/0x130 arch/arm64/kernel/syscall.c:204
el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
Allocated by task 4488:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4c/0x80 mm/kasan/common.c:53
kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:505
__kasan_slab_alloc+0x70/0x88 mm/kasan/common.c:329
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook+0x74/0x430 mm/slab.h:737
slab_alloc_node mm/slub.c:3359 [inline]
slab_alloc mm/slub.c:3367 [inline]
__kmem_cache_alloc_lru mm/slub.c:3374 [inline]
kmem_cache_alloc+0x22c/0x308 mm/slub.c:3383
mempool_alloc_slab+0x58/0x74 mm/mempool.c:532
mempool_alloc+0x150/0x3fc mm/mempool.c:412
alloc_metapage fs/jfs/jfs_metapage.c:176 [inline]
__get_metapage+0x5c4/0xfac fs/jfs/jfs_metapage.c:651
ea_get+0x874/0xed0 fs/jfs/xattr.c:528
__jfs_setxattr+0x458/0xfb8 fs/jfs/xattr.c:727
__jfs_xattr_set+0xe0/0x178 fs/jfs/xattr.c:941
jfs_xattr_set+0x58/0x70 fs/jfs/xattr.c:965
__vfs_setxattr+0x384/0x3a0 fs/xattr.c:182
__vfs_setxattr_noperm+0x120/0x564 fs/xattr.c:216
__vfs_setxattr_locked+0x1ec/0x218 fs/xattr.c:277
vfs_setxattr+0x158/0x2ac fs/xattr.c:309
do_setxattr fs/xattr.c:594 [inline]
setxattr+0x258/0x2d8 fs/xattr.c:617
path_setxattr+0x130/0x260 fs/xattr.c:636
__do_sys_lsetxattr fs/xattr.c:659 [inline]
__se_sys_lsetxattr fs/xattr.c:655 [inline]
__arm64_sys_lsetxattr+0xbc/0xd8 fs/xattr.c:655
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
do_el0_svc+0x58/0x130 arch/arm64/kernel/syscall.c:204
el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
Freed by task 4491:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4c/0x80 mm/kasan/common.c:53
kasan_save_free_info+0x38/0x5c mm/kasan/generic.c:516
____kasan_slab_free+0x148/0x1b0 mm/kasan/common.c:237
__kasan_slab_free+0x18/0x28 mm/kasan/common.c:245
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1729 [inline]
slab_free_freelist_hook+0x16c/0x1e8 mm/slub.c:1755
slab_free mm/slub.c:3687 [inline]
kmem_cache_free+0x118/0x314 mm/slub.c:3709
mempool_free_slab+0x28/0x38 mm/mempool.c:539
mempool_free+0xbc/0x2e0 mm/mempool.c:521
free_metapage fs/jfs/jfs_metapage.c:191 [inline]
metapage_release_folio+0x44c/0x5b4 fs/jfs/jfs_metapage.c:551
filemap_release_folio+0x170/0x248 mm/filemap.c:4026
mapping_evict_folio+0x1a8/0x264 mm/truncate.c:303
invalidate_mapping_pagevec+0x2c0/0x50c mm/truncate.c:552
invalidate_mapping_pages+0x38/0x4c mm/truncate.c:591
drop_pagecache_sb+0x16c/0x220 fs/drop_caches.c:39
iterate_supers+0x11c/0x1d0 fs/super.c:757
drop_caches_sysctl_handler+0xb8/0x2fc fs/drop_caches.c:62
proc_sys_call_handler+0x400/0x6a4 fs/proc/proc_sysctl.c:602
proc_sys_write+0x2c/0x3c fs/proc/proc_sysctl.c:628
do_iter_readv_writev fs/read_write.c:-1 [inline]
do_iter_write+0x53c/0x940 fs/read_write.c:861
vfs_iter_write+0x88/0xac fs/read_write.c:902
iter_file_splice_write+0x520/0xa7c fs/splice.c:685
do_splice_from fs/splice.c:763 [inline]
direct_splice_actor+0xe4/0x134 fs/splice.c:950
splice_direct_to_actor+0x3a0/0x954 fs/splice.c:896
do_splice_direct+0x168/0x25c fs/splice.c:1002
do_sendfile+0x478/0xcc8 fs/read_write.c:1255
__do_sys_sendfile64 fs/read_write.c:1317 [inline]
__se_sys_sendfile64 fs/read_write.c:1309 [inline]
__arm64_sys_sendfile64+0x20c/0x36c fs/read_write.c:1309
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
do_el0_svc+0x58/0x130 arch/arm64/kernel/syscall.c:204
el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
The buggy address belongs to the object at ffff0000cfce27c0
which belongs to the cache jfs_mp of size 184
The buggy address is located 40 bytes inside of
184-byte region [ffff0000cfce27c0, ffff0000cfce2878)
The buggy address belongs to the physical page:
page:000000005f23782b refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10fce2
flags: 0x5ffc00000000200(slab|node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000000200 0000000000000000 dead000000000122 ffff0000c80cca80
raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff0000cfce2680: 00 fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00
ffff0000cfce2700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff0000cfce2780: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
^
ffff0000cfce2800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc
ffff0000cfce2880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
hsr_slave_0: hsr_addr_subst_dest: Unknown node
hsr_slave_1: hsr_addr_subst_dest: Unknown node
hsr_slave_0: hsr_addr_subst_dest: Unknown node
hsr_slave_1: hsr_addr_subst_dest: Unknown node
hsr_slave_0: hsr_addr_subst_dest: Unknown node
hsr_slave_1: hsr_addr_subst_dest: Unknown node
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup