==================================================================
BUG: KASAN: slab-use-after-free in fib_rules_lookup+0x15e/0xeb0 net/core/fib_rules.c:321
Read of size 8 at addr ffff888026998980 by task dhcpcd/16657
CPU: 0 UID: 101 PID: 16657 Comm: dhcpcd Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Call Trace:
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_address_description+0x55/0x1e0 mm/kasan/report.c:378
print_report+0x58/0x70 mm/kasan/report.c:482
kasan_report+0x117/0x150 mm/kasan/report.c:595
fib_rules_lookup+0x15e/0xeb0 net/core/fib_rules.c:321
__fib_lookup+0x106/0x210 net/ipv4/fib_rules.c:96
ip_route_input_slow net/ipv4/route.c:2353 [inline]
ip_route_input_rcu+0x19ee/0x3190 net/ipv4/route.c:2540
ip_route_input_noref+0x17c/0x270 net/ipv4/route.c:2551
arp_process+0xaab/0x18c0 net/ipv4/arp.c:841
NF_HOOK+0x33a/0x3c0 include/linux/netfilter.h:-1
__netif_receive_skb_one_core net/core/dev.c:6204 [inline]
__netif_receive_skb net/core/dev.c:6317 [inline]
process_backlog+0xbf0/0x1860 net/core/dev.c:6668
__napi_poll+0xaa/0x330 net/core/dev.c:7727
napi_poll net/core/dev.c:7790 [inline]
net_rx_action+0x61d/0xf50 net/core/dev.c:7947
handle_softirqs+0x225/0x840 kernel/softirq.c:622
do_softirq+0x76/0xd0 kernel/softirq.c:523
__local_bh_enable_ip+0xf8/0x130 kernel/softirq.c:450
local_bh_enable include/linux/bottom_half.h:33 [inline]
rcu_read_unlock_bh include/linux/rcupdate.h:912 [inline]
__dev_queue_xmit+0x1ed7/0x37f0 net/core/dev.c:4907
packet_snd net/packet/af_packet.c:3082 [inline]
packet_sendmsg+0x3d95/0x5040 net/packet/af_packet.c:3114
sock_sendmsg_nosec net/socket.c:787 [inline]
__sock_sendmsg net/socket.c:802 [inline]
sock_write_iter+0x498/0x4e0 net/socket.c:1255
do_iter_readv_writev+0x612/0x8c0 fs/read_write.c:-1
vfs_writev+0x343/0x990 fs/read_write.c:1059
do_writev+0x154/0x2e0 fs/read_write.c:1105
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f3c9e57b407
Code: 48 89 fa 4c 89 df e8 38 aa 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff
RSP: 002b:00007ffde4fa9f10 EFLAGS: 00000202 ORIG_RAX: 0000000000000014
RAX: ffffffffffffffda RBX: 00007f3c9e4f1780 RCX: 00007f3c9e57b407
RDX: 0000000000000002 RSI: 00007ffde4fa9f70 RDI: 0000000000000003
RBP: 000000000000005c R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 00007ffde4fa9fb0
R13: 0000562f44e96d80 R14: 00007ffde4faa000 R15: 00007ffde4fba1d0
Allocated by task 5628:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
__kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415
kasan_kmalloc include/linux/kasan.h:263 [inline]
__do_kmalloc_node mm/slub.c:5296 [inline]
__kmalloc_node_track_caller_noprof+0x4d7/0x7b0 mm/slub.c:5408
kmemdup_noprof+0x2b/0x70 mm/util.c:138
kmemdup_noprof include/linux/fortify-string.h:763 [inline]
fib_rules_register+0x2f/0x400 net/core/fib_rules.c:170
fib4_rules_init+0x21/0x160 net/ipv4/fib_rules.c:508
ip_fib_net_init net/ipv4/fib_frontend.c:1578 [inline]
fib_net_init+0x17a/0x3e0 net/ipv4/fib_frontend.c:1628
ops_init+0x35d/0x5d0 net/core/net_namespace.c:137
setup_net+0x118/0x350 net/core/net_namespace.c:446
copy_net_ns+0x4f9/0x720 net/core/net_namespace.c:579
create_new_namespaces+0x3f0/0x6b0 kernel/nsproxy.c:132
unshare_nsproxy_namespaces+0x149/0x190 kernel/nsproxy.c:234
ksys_unshare+0x57d/0xa00 kernel/fork.c:3242
__do_sys_unshare kernel/fork.c:3316 [inline]
__se_sys_unshare kernel/fork.c:3314 [inline]
__x64_sys_unshare+0x38/0x50 kernel/fork.c:3314
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 23:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:253 [inline]
__kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2689 [inline]
__rcu_free_sheaf_prepare+0x12d/0x2a0 mm/slub.c:2940
rcu_free_sheaf+0x31/0x200 mm/slub.c:5850
rcu_do_batch kernel/rcu/tree.c:2617 [inline]
rcu_core+0x78b/0x10a0 kernel/rcu/tree.c:2869
handle_softirqs+0x225/0x840 kernel/softirq.c:622
run_ksoftirqd+0x36/0x60 kernel/softirq.c:1076
smpboot_thread_fn+0x57c/0xa80 kernel/smpboot.c:160
kthread+0x389/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
The buggy address belongs to the object at ffff888026998900
which belongs to the cache kmalloc-192 of size 192
The buggy address is located 128 bytes inside of
freed 192-byte region [ffff888026998900, ffff8880269989c0)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x26998
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000000 ffff88813fe163c0 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800100010 00000000f5000000 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 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 5135288753, free_ts 5127428589
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x22d/0x280 mm/page_alloc.c:1853
prep_new_page mm/page_alloc.c:1861 [inline]
get_page_from_freelist+0x24ae/0x2530 mm/page_alloc.c:3941
__alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5221
alloc_slab_page mm/slub.c:3278 [inline]
allocate_slab+0x77/0x660 mm/slub.c:3467
new_slab mm/slub.c:3525 [inline]
refill_objects+0x336/0x3d0 mm/slub.c:7272
refill_sheaf mm/slub.c:2816 [inline]
__pcs_replace_empty_main+0x320/0x720 mm/slub.c:4652
alloc_from_pcs mm/slub.c:4750 [inline]
slab_alloc_node mm/slub.c:4884 [inline]
__kmalloc_cache_noprof+0x388/0x660 mm/slub.c:5415
kmalloc_noprof include/linux/slab.h:950 [inline]
kzalloc_noprof include/linux/slab.h:1188 [inline]
call_usermodehelper_setup+0x8e/0x270 kernel/umh.c:362
kobject_uevent_env+0x662/0x9e0 lib/kobject_uevent.c:631
device_add+0x544/0xb90 drivers/base/core.c:3672
serial_base_ctrl_add+0x140/0x1b0 drivers/tty/serial/serial_base_bus.c:132
serial_core_ctrl_device_add drivers/tty/serial/serial_core.c:3252 [inline]
serial_core_register_port+0x34e/0x28a0 drivers/tty/serial/serial_core.c:3288
serial8250_register_8250_port+0x164a/0x1fa0 drivers/tty/serial/8250/8250_core.c:822
serial_pnp_probe+0x56a/0x7f0 drivers/tty/serial/8250/8250_pnp.c:480
pnp_device_probe+0x30b/0x4c0 drivers/pnp/driver.c:111
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x254/0xae0 drivers/base/dd.c:709
page last free pid 10 tgid 10 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1397 [inline]
__free_frozen_pages+0xc0d/0xd20 mm/page_alloc.c:2938
vfree+0x1fd/0x330 mm/vmalloc.c:3472
delayed_vfree_work+0x55/0x80 mm/vmalloc.c:3392
process_one_work kernel/workqueue.c:3314 [inline]
process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3397
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3478
kthread+0x389/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Memory state around the buggy address:
ffff888026998880: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
ffff888026998900: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888026998980: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
^
ffff888026998a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888026998a80: 00 00 00 00 00 00 00 07 fc fc fc fc fc fc fc fc
==================================================================