EXT4-fs warning (device loop2): dx_probe:893: inode #2: comm syz.2.17: dx entry: limit 65535 != root limit 120
EXT4-fs warning (device loop2): dx_probe:966: inode #2: comm syz.2.17: Corrupt directory, running e2fsck is recommended
==================================================================
BUG: KASAN: use-after-free in __ext4_check_dir_entry+0x7c2/0x970 fs/ext4/dir.c:85
Read of size 2 at addr ffff88811bfea003 by task syz.2.17/373
CPU: 1 PID: 373 Comm: syz.2.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
Call Trace:
<TASK>
__dump_stack+0x21/0x30 lib/dump_stack.c:88
dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:427 [inline]
kasan_report+0xf1/0x140 mm/kasan/report.c:444
__asan_report_load2_noabort+0x14/0x20 mm/kasan/report_generic.c:307
__ext4_check_dir_entry+0x7c2/0x970 fs/ext4/dir.c:85
ext4_readdir+0x123c/0x3b20 fs/ext4/dir.c:261
iterate_dir+0x260/0x600 fs/readdir.c:-1
__do_sys_getdents64 fs/readdir.c:369 [inline]
__se_sys_getdents64+0xf2/0x250 fs/readdir.c:354
__x64_sys_getdents64+0x7b/0x90 fs/readdir.c:354
x64_sys_call+0x592/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:218
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:0x7f8ffade8e59
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:00007ffdf6c3c6a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9
RAX: ffffffffffffffda RBX: 00007f8ffb061fa0 RCX: 00007f8ffade8e59
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 00007f8ffae7ed6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f8ffb061fac R14: 00007f8ffb061fa0 R15: 00007f8ffb061fa0
</TASK>
Allocated by task 320:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:45 [inline]
set_alloc_info mm/kasan/common.c:433 [inline]
__kasan_slab_alloc+0xbd/0xf0 mm/kasan/common.c:466
kasan_slab_alloc include/linux/kasan.h:217 [inline]
slab_post_alloc_hook+0x4f/0x2b0 mm/slab.h:550
slab_alloc_node mm/slub.c:3245 [inline]
slab_alloc mm/slub.c:3255 [inline]
kmem_cache_alloc+0xf7/0x260 mm/slub.c:3260
dst_alloc+0x15c/0x1d0 net/core/dst.c:92
ip6_dst_alloc net/ipv6/route.c:342 [inline]
icmp6_dst_alloc+0xf5/0x560 net/ipv6/route.c:3281
ndisc_send_skb+0x284/0xd10 net/ipv6/ndisc.c:493
ndisc_send_ns+0x84e/0xb00 net/ipv6/ndisc.c:655
addrconf_dad_work+0xa4a/0x1560 net/ipv6/addrconf.c:4222
process_one_work+0x6be/0xba0 kernel/workqueue.c:2325
worker_thread+0xa59/0x1200 kernel/workqueue.c:2472
kthread+0x411/0x500 kernel/kthread.c:337
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
Freed by task 0:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4a/0x70 mm/kasan/common.c:45
kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370
____kasan_slab_free+0x125/0x160 mm/kasan/common.c:365
__kasan_slab_free+0x11/0x20 mm/kasan/common.c:373
kasan_slab_free include/linux/kasan.h:193 [inline]
slab_free_hook mm/slub.c:1728 [inline]
slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1754
slab_free mm/slub.c:3526 [inline]
kmem_cache_free+0x100/0x320 mm/slub.c:3544
dst_destroy+0x1eb/0x2c0 net/core/dst.c:124
dst_destroy_rcu+0x19/0x20 net/core/dst.c:137
rcu_do_batch+0x532/0xbe0 kernel/rcu/tree.c:2523
rcu_core+0x5ee/0xf80 kernel/rcu/tree.c:2763
rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2776
handle_softirqs+0x250/0x560 kernel/softirq.c:583
__do_softirq kernel/softirq.c:621 [inline]
invoke_softirq kernel/softirq.c:443 [inline]
__irq_exit_rcu+0x52/0xf0 kernel/softirq.c:670
irq_exit_rcu+0x9/0x10 kernel/softirq.c:682
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline]
sysvec_apic_timer_interrupt+0xa9/0xc0 arch/x86/kernel/apic/apic.c:1108
asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:676
Last potentially related work creation:
kasan_save_stack+0x3a/0x60 mm/kasan/common.c:38
__kasan_record_aux_stack+0xd2/0x100 mm/kasan/generic.c:348
kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358
__call_rcu_common kernel/rcu/tree.c:3011 [inline]
call_rcu+0x10b/0xf80 kernel/rcu/tree.c:3129
call_rcu_hurry include/linux/rcupdate.h:90 [inline]
dst_release+0x123/0x190 net/core/dst.c:181
refdst_drop include/net/dst.h:255 [inline]
skb_dst_drop include/net/dst.h:267 [inline]
__dev_queue_xmit+0x7b7/0x2da0 net/core/dev.c:4265
dev_queue_xmit+0x17/0x20 net/core/dev.c:4355
neigh_resolve_output+0x6cf/0x770 net/core/neighbour.c:1504
neigh_output include/net/neighbour.h:517 [inline]
ip6_finish_output2+0x10b6/0x17a0 net/ipv6/ip6_output.c:130
__ip6_finish_output+0x61e/0x7d0 net/ipv6/ip6_output.c:201
ip6_finish_output+0x31/0x240 net/ipv6/ip6_output.c:211
NF_HOOK_COND include/linux/netfilter.h:294 [inline]
ip6_output+0x1fa/0x410 net/ipv6/ip6_output.c:234
dst_output include/net/dst.h:453 [inline]
NF_HOOK include/linux/netfilter.h:305 [inline]
ndisc_send_skb+0x80d/0xd10 net/ipv6/ndisc.c:513
ndisc_send_ns+0x84e/0xb00 net/ipv6/ndisc.c:655
addrconf_dad_work+0xa4a/0x1560 net/ipv6/addrconf.c:4222
process_one_work+0x6be/0xba0 kernel/workqueue.c:2325
worker_thread+0xa59/0x1200 kernel/workqueue.c:2472
kthread+0x411/0x500 kernel/kthread.c:337
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
The buggy address belongs to the object at ffff88811bfea000
which belongs to the cache ip6_dst_cache of size 240
The buggy address is located 3 bytes inside of
240-byte region [ffff88811bfea000, ffff88811bfea0f0)
The buggy address belongs to the page:
page:ffffea00046ffa80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11bfea
flags: 0x4000000000000200(slab|zone=1)
raw: 4000000000000200 0000000000000000 dead000000000122 ffff8881081fb980
raw: 0000000000000000 00000000000c000c 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 0x112a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 320, ts 29227118892, free_ts 28685318379
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2605
prep_new_page+0x1c/0x110 mm/page_alloc.c:2611
get_page_from_freelist+0x2d3a/0x2dc0 mm/page_alloc.c:4485
__alloc_pages+0x1a2/0x460 mm/page_alloc.c:5822
alloc_slab_page mm/slub.c:-1 [inline]
allocate_slab mm/slub.c:1937 [inline]
new_slab+0xa1/0x4d0 mm/slub.c:2000
___slab_alloc+0x381/0x810 mm/slub.c:3033
__slab_alloc+0x49/0x90 mm/slub.c:3120
slab_alloc_node mm/slub.c:3211 [inline]
slab_alloc mm/slub.c:3255 [inline]
kmem_cache_alloc+0x138/0x260 mm/slub.c:3260
dst_alloc+0x15c/0x1d0 net/core/dst.c:92
ip6_dst_alloc net/ipv6/route.c:342 [inline]
ip6_rt_pcpu_alloc net/ipv6/route.c:1376 [inline]
rt6_make_pcpu_route net/ipv6/route.c:1425 [inline]
ip6_pol_route+0x988/0x1170 net/ipv6/route.c:2263
ip6_pol_route_input+0x56/0x80 net/ipv6/route.c:2284
pol_lookup_func include/net/ip6_fib.h:592 [inline]
fib6_rule_lookup+0x20a/0x5d0 net/ipv6/fib6_rules.c:115
ip6_route_input_lookup net/ipv6/route.c:2296 [inline]
ip6_route_input+0x607/0x8c0 net/ipv6/route.c:2592
ip6_rcv_finish_core net/ipv6/ip6_input.c:66 [inline]
ip6_rcv_finish+0x156/0x360 net/ipv6/ip6_input.c:77
NF_HOOK include/linux/netfilter.h:305 [inline]
ipv6_rcv+0xed/0x230 net/ipv6/ip6_input.c:300
__netif_receive_skb_one_core net/core/dev.c:5559 [inline]
__netif_receive_skb+0xc8/0x280 net/core/dev.c:5673
page last free stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
free_pages_prepare mm/page_alloc.c:1472 [inline]
free_pcp_prepare mm/page_alloc.c:1544 [inline]
free_unref_page_prepare+0x542/0x550 mm/page_alloc.c:3534
free_unref_page+0xae/0x540 mm/page_alloc.c:3616
free_the_page mm/page_alloc.c:805 [inline]
__free_pages+0x6c/0x100 mm/page_alloc.c:5898
__vunmap+0x86d/0xa00 mm/vmalloc.c:2660
__vfree mm/vmalloc.c:2709 [inline]
vfree+0x8b/0xc0 mm/vmalloc.c:2740
kcov_put kernel/kcov.c:417 [inline]
kcov_close+0x2b/0x50 kernel/kcov.c:519
__fput+0x20b/0x8b0 fs/file_table.c:311
____fput+0x15/0x20 fs/file_table.c:339
task_work_run+0x127/0x190 kernel/task_work.c:188
exit_task_work include/linux/task_work.h:33 [inline]
do_exit+0xa9e/0x27e0 kernel/exit.c:889
do_group_exit+0x141/0x310 kernel/exit.c:1003
get_signal+0x66a/0x1480 kernel/signal.c:2907
arch_do_signal_or_restart+0xdf/0x11c0 arch/x86/kernel/signal.c:867
handle_signal_work kernel/entry/common.c:154 [inline]
exit_to_user_mode_loop+0xa7/0xe0 kernel/entry/common.c:178
exit_to_user_mode_prepare+0x87/0xd0 kernel/entry/common.c:214
__syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:307
Memory state around the buggy address:
ffff88811bfe9f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88811bfe9f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88811bfea000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88811bfea080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc
ffff88811bfea100: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00
==================================================================
EXT4-fs error (device loop2): ext4_readdir:263: inode #2: block 3: comm syz.2.17: path /0/file0: bad entry in directory: rec_len % 4 != 0 - offset=1023, inode=2587623679, rec_len=33055, size=1024 fake=0