Hello,
syzbot found the following issue on:
HEAD commit: 93741761e5e3 Linux 5.15.207
git tree: linux-5.15.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=1192e02e580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=353ae28c40b35af5
dashboard link:
https://syzkaller.appspot.com/bug?extid=15983f7de405411aff84
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/7087b65c18a1/disk-93741761.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/5892df79f094/vmlinux-93741761.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/4602fe2cead2/bzImage-93741761.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+15983f...@syzkaller.appspotmail.com
EXT4-fs (loop4): mounted filesystem without journal. Opts: grpquota,delalloc,resuid=0x0000000000000000,debug,dioread_nolock,bsddf,nomblk_io_submit,noauto_da_alloc,,errors=continue. Quota mode: writeback.
==================================================================
BUG: KASAN: use-after-free in ext4_get_inode_usage+0x401/0x5b0 fs/ext4/xattr.c:821
Read of size 4 at addr ffff888029f01070 by task syz.4.368/5839
CPU: 0 PID: 5839 Comm: syz.4.368 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
Call Trace:
<TASK>
dump_stack_lvl+0x188/0x250 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
ext4_get_inode_usage+0x401/0x5b0 fs/ext4/xattr.c:821
__dquot_transfer+0x177/0x2270 fs/quota/dquot.c:2015
dquot_transfer+0x2f1/0x460 fs/quota/dquot.c:2167
ext4_setattr+0x735/0x1b60 fs/ext4/inode.c:5477
notify_change+0xbcd/0xee0 fs/attr.c:505
chown_common+0x4a7/0x660 fs/open.c:680
vfs_fchown fs/open.c:748 [inline]
ksys_fchown+0xe2/0x150 fs/open.c:759
__do_sys_fchown fs/open.c:767 [inline]
__se_sys_fchown fs/open.c:765 [inline]
__x64_sys_fchown+0x76/0x80 fs/open.c:765
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:0x7fc1ea198e59
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:00007fc1e83f2028 EFLAGS: 00000246 ORIG_RAX: 000000000000005d
RAX: ffffffffffffffda RBX: 00007fc1ea411fa0 RCX: 00007fc1ea198e59
RDX: 000000000000ee01 RSI: 0000000000000000 RDI: 0000000000000005
RBP: 00007fc1ea22ed6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fc1ea412038 R14: 00007fc1ea411fa0 R15: 00007fffccf986c8
</TASK>
Allocated by task 5549:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:46 [inline]
set_alloc_info mm/kasan/common.c:434 [inline]
____kasan_kmalloc mm/kasan/common.c:513 [inline]
__kasan_kmalloc+0xb5/0xf0 mm/kasan/common.c:522
kmalloc_array_node include/linux/slab.h:700 [inline]
kcalloc_node include/linux/slab.h:705 [inline]
memcg_alloc_page_obj_cgroups+0x81/0x120 mm/memcontrol.c:2839
account_slab_page mm/slab.h:424 [inline]
allocate_slab mm/slub.c:1933 [inline]
new_slab+0x100/0x4b0 mm/slub.c:1980
___slab_alloc+0x80a/0xdd0 mm/slub.c:3013
__slab_alloc mm/slub.c:3100 [inline]
slab_alloc_node mm/slub.c:3191 [inline]
slab_alloc mm/slub.c:3233 [inline]
kmem_cache_alloc+0x195/0x290 mm/slub.c:3238
vm_area_dup kernel/fork.c:358 [inline]
dup_mmap kernel/fork.c:557 [inline]
dup_mm kernel/fork.c:1466 [inline]
copy_mm+0x8cd/0x13f0 kernel/fork.c:1518
copy_process+0x17eb/0x3e20 kernel/fork.c:2290
kernel_clone+0x23f/0x990 kernel/fork.c:2679
__do_sys_clone kernel/fork.c:2796 [inline]
__se_sys_clone kernel/fork.c:2780 [inline]
__x64_sys_clone+0x19a/0x210 kernel/fork.c:2780
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
Freed by task 4457:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:46
kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360
____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366
kasan_slab_free include/linux/kasan.h:230 [inline]
slab_free_hook mm/slub.c:1710 [inline]
slab_free_freelist_hook+0xea/0x170 mm/slub.c:1736
slab_free mm/slub.c:3504 [inline]
kfree+0xef/0x2a0 mm/slub.c:4564
memcg_free_page_obj_cgroups mm/slab.h:255 [inline]
unaccount_slab_page mm/slab.h:434 [inline]
__free_slab+0x135/0x370 mm/slub.c:2004
free_slab mm/slub.c:2020 [inline]
discard_slab mm/slub.c:2026 [inline]
__unfreeze_partials+0x1a5/0x200 mm/slub.c:2512
put_cpu_partial+0x12d/0x190 mm/slub.c:2592
qlist_free_all+0x35/0x90 mm/kasan/quarantine.c:176
kasan_quarantine_reduce+0x150/0x160 mm/kasan/quarantine.c:283
__kasan_slab_alloc+0x2f/0xd0 mm/kasan/common.c:444
kasan_slab_alloc include/linux/kasan.h:254 [inline]
slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519
slab_alloc_node mm/slub.c:3225 [inline]
slab_alloc mm/slub.c:3233 [inline]
kmem_cache_alloc+0x100/0x290 mm/slub.c:3238
getname_flags+0xb5/0x500 fs/namei.c:138
getname fs/namei.c:217 [inline]
__do_sys_rename fs/namei.c:5039 [inline]
__se_sys_rename fs/namei.c:5037 [inline]
__x64_sys_rename+0x5b/0x90 fs/namei.c:5037
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
Last potentially related work creation:
kasan_save_stack+0x35/0x60 mm/kasan/common.c:38
kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348
__call_rcu kernel/rcu/tree.c:3011 [inline]
call_rcu+0x189/0x950 kernel/rcu/tree.c:3091
nf_hook_entries_free net/netfilter/core.c:88 [inline]
__nf_register_net_hook+0x6fe/0x850 net/netfilter/core.c:419
nf_register_net_hook+0xae/0x190 net/netfilter/core.c:536
nf_register_net_hooks+0x40/0x1a0 net/netfilter/core.c:552
ipt_register_table+0x54b/0x800 net/ipv4/netfilter/ip_tables.c:1782
iptable_mangle_table_init+0x3d/0x60 net/ipv4/netfilter/iptable_mangle.c:91
xt_find_table_lock+0x220/0x360 net/netfilter/x_tables.c:1282
xt_request_find_table_lock+0x22/0x100 net/netfilter/x_tables.c:1307
get_info net/ipv4/netfilter/ip_tables.c:964 [inline]
do_ipt_get_ctl+0x6df/0x1110 net/ipv4/netfilter/ip_tables.c:1660
nf_getsockopt+0x25e/0x280 net/netfilter/nf_sockopt.c:116
ip_getsockopt+0x1256/0x16a0 net/ipv4/ip_sockglue.c:1797
tcp_getsockopt+0x200/0x25a0 net/ipv4/tcp.c:4322
__sys_getsockopt+0x1b0/0x230 net/socket.c:2256
__do_sys_getsockopt net/socket.c:2271 [inline]
__se_sys_getsockopt net/socket.c:2268 [inline]
__x64_sys_getsockopt+0xb1/0xc0 net/socket.c:2268
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
The buggy address belongs to the object at ffff888029f01000
which belongs to the cache kmalloc-128 of size 128
The buggy address is located 112 bytes inside of
128-byte region [ffff888029f01000, ffff888029f01080)
The buggy address belongs to the page:
page:ffffea0000a7c040 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x29f01
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 ffffea00008ce500 0000000a0000000a ffff888016c418c0
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 4190, ts 76396484522, free_ts 76396264906
prep_new_page mm/page_alloc.c:2426 [inline]
get_page_from_freelist+0x1bbd/0x1ca0 mm/page_alloc.c:4192
__alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501
alloc_slab_page mm/slub.c:1780 [inline]
allocate_slab mm/slub.c:1917 [inline]
new_slab+0xc0/0x4b0 mm/slub.c:1980
___slab_alloc+0x80a/0xdd0 mm/slub.c:3013
__slab_alloc mm/slub.c:3100 [inline]
slab_alloc_node mm/slub.c:3191 [inline]
__kmalloc_node+0x200/0x3b0 mm/slub.c:4456
kmalloc_node include/linux/slab.h:630 [inline]
kvmalloc_node+0x84/0x130 mm/util.c:619
kvmalloc include/linux/mm.h:816 [inline]
kvzalloc include/linux/mm.h:824 [inline]
allocate_hook_entries_size net/netfilter/core.c:61 [inline]
nf_hook_entries_grow+0x309/0x730 net/netfilter/core.c:128
__nf_register_net_hook+0x238/0x850 net/netfilter/core.c:401
nf_register_net_hook+0xae/0x190 net/netfilter/core.c:536
nf_register_net_hooks+0x40/0x1a0 net/netfilter/core.c:552
nf_nat_register_fn+0x3cb/0x580 net/netfilter/nf_nat_core.c:1043
ipt_nat_register_lookups net/ipv4/netfilter/iptable_nat.c:84 [inline]
iptable_nat_table_init+0xd0/0x2d0 net/ipv4/netfilter/iptable_nat.c:128
xt_find_table_lock+0x220/0x360 net/netfilter/x_tables.c:1282
xt_request_find_table_lock+0x22/0x100 net/netfilter/x_tables.c:1307
get_info net/ipv4/netfilter/ip_tables.c:964 [inline]
do_ipt_get_ctl+0x6df/0x1110 net/ipv4/netfilter/ip_tables.c:1660
nf_getsockopt+0x25e/0x280 net/netfilter/nf_sockopt.c:116
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+0x8f/0x2a0 mm/page_alloc.c:3396
__vunmap+0x8b9/0xa50 mm/vmalloc.c:2628
copy_entries_to_user net/ipv4/netfilter/ip_tables.c:867 [inline]
get_entries net/ipv4/netfilter/ip_tables.c:1023 [inline]
do_ipt_get_ctl+0xe5e/0x1110 net/ipv4/netfilter/ip_tables.c:1669
nf_getsockopt+0x25e/0x280 net/netfilter/nf_sockopt.c:116
ip_getsockopt+0x1256/0x16a0 net/ipv4/ip_sockglue.c:1797
tcp_getsockopt+0x200/0x25a0 net/ipv4/tcp.c:4322
__sys_getsockopt+0x1b0/0x230 net/socket.c:2256
__do_sys_getsockopt net/socket.c:2271 [inline]
__se_sys_getsockopt net/socket.c:2268 [inline]
__x64_sys_getsockopt+0xb1/0xc0 net/socket.c:2268
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:
ffff888029f00f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888029f00f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff888029f01000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888029f01080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888029f01100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
---
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