==================================================================
BUG: KASAN: slab-out-of-bounds in ip6_ignore_linkdown include/net/addrconf.h:448 [inline]
BUG: KASAN: slab-out-of-bounds in find_match+0xae9/0xc10 net/ipv6/route.c:747
Read of size 4 at addr ffff888040adfa54 by task kworker/0:5/5323
CPU: 0 UID: 0 PID: 5323 Comm: kworker/0:5 Not tainted 6.14.0-rc3-syzkaller-00079-g87a132e73910 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Workqueue: mld mld_dad_work
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:408 [inline]
print_report+0x16e/0x5b0 mm/kasan/report.c:521
kasan_report+0x143/0x180 mm/kasan/report.c:634
ip6_ignore_linkdown include/net/addrconf.h:448 [inline]
find_match+0xae9/0xc10 net/ipv6/route.c:747
__find_rr_leaf+0x275/0x8e0 net/ipv6/route.c:835
find_rr_leaf net/ipv6/route.c:856 [inline]
rt6_select net/ipv6/route.c:900 [inline]
fib6_table_lookup+0x413/0xbb0 net/ipv6/route.c:2195
ip6_pol_route+0x273/0x15d0 net/ipv6/route.c:2231
pol_lookup_func include/net/ip6_fib.h:616 [inline]
fib6_rule_lookup+0x58c/0x790 net/ipv6/fib6_rules.c:119
ip6_route_input_lookup net/ipv6/route.c:2300 [inline]
ip6_route_input+0x859/0xd90 net/ipv6/route.c:2596
ip6_rcv_finish+0x140/0x3d0 net/ipv6/ip6_input.c:77
NF_HOOK+0x3a4/0x450 include/linux/netfilter.h:314
__netif_receive_skb_one_core net/core/dev.c:5828 [inline]
__netif_receive_skb+0x1ea/0x650 net/core/dev.c:5941
process_backlog+0x662/0x15b0 net/core/dev.c:6289
__napi_poll+0xcb/0x490 net/core/dev.c:7106
napi_poll net/core/dev.c:7175 [inline]
net_rx_action+0x89b/0x1240 net/core/dev.c:7297
handle_softirqs+0x2d4/0x9b0 kernel/softirq.c:561
do_softirq+0x11b/0x1e0 kernel/softirq.c:462
__local_bh_enable_ip+0x1bb/0x200 kernel/softirq.c:389
local_bh_enable include/linux/bottom_half.h:33 [inline]
rcu_read_unlock_bh include/linux/rcupdate.h:919 [inline]
__dev_queue_xmit+0x1775/0x3f50 net/core/dev.c:4611
dev_queue_xmit include/linux/netdevice.h:3311 [inline]
neigh_hh_output include/net/neighbour.h:523 [inline]
neigh_output include/net/neighbour.h:537 [inline]
ip6_finish_output2+0x127d/0x17c0 net/ipv6/ip6_output.c:141
ip6_finish_output+0x41e/0x840 net/ipv6/ip6_output.c:226
NF_HOOK+0x9e/0x430 include/linux/netfilter.h:314
mld_sendpack+0x843/0xdb0 net/ipv6/mcast.c:1868
mld_dad_work+0x44/0x500 net/ipv6/mcast.c:2308
process_one_work kernel/workqueue.c:3236 [inline]
process_scheduled_works+0xabe/0x18e0 kernel/workqueue.c:3317
worker_thread+0x870/0xd30 kernel/workqueue.c:3398
kthread+0x7a9/0x920 kernel/kthread.c:464
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Allocated by task 5309:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:377 [inline]
__kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:394
kasan_kmalloc include/linux/kasan.h:260 [inline]
__kmalloc_cache_noprof+0x243/0x390 mm/slub.c:4325
kmalloc_noprof include/linux/slab.h:901 [inline]
kzalloc_noprof include/linux/slab.h:1037 [inline]
mpls_add_dev net/mpls/af_mpls.c:1443 [inline]
mpls_dev_notify+0x109/0x7a0 net/mpls/af_mpls.c:1600
notifier_call_chain+0x1a5/0x3f0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2179 [inline]
call_netdevice_notifiers net/core/dev.c:2193 [inline]
register_netdevice+0x16b5/0x1b60 net/core/dev.c:10896
__ip_tunnel_create+0x3be/0x520 net/ipv4/ip_tunnel.c:267
ip_tunnel_init_net+0x2aa/0x7e0 net/ipv4/ip_tunnel.c:1160
ops_init+0x349/0x5b0 net/core/net_namespace.c:138
setup_net+0x287/0x9e0 net/core/net_namespace.c:362
copy_net_ns+0x33f/0x570 net/core/net_namespace.c:516
create_new_namespaces+0x425/0x7b0 kernel/nsproxy.c:110
unshare_nsproxy_namespaces+0x124/0x180 kernel/nsproxy.c:228
ksys_unshare+0x57d/0xa70 kernel/fork.c:3342
__do_sys_unshare kernel/fork.c:3413 [inline]
__se_sys_unshare kernel/fork.c:3411 [inline]
__x64_sys_unshare+0x38/0x40 kernel/fork.c:3411
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff888040adfa00
which belongs to the cache kmalloc-64 of size 64
The buggy address is located 36 bytes to the right of
allocated 48-byte region [ffff888040adfa00, ffff888040adfa30)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x40adf
anon flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 04fff00000000000 ffff88801b0418c0 0000000000000000 0000000000000001
raw: 0000000000000000 0000000000200020 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 0x52c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5208, tgid 5208 (dhcpcd-run-hook), ts 51757464597, free_ts 51744037068
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1551
prep_new_page mm/page_alloc.c:1559 [inline]
get_page_from_freelist+0x365c/0x37a0 mm/page_alloc.c:3477
__alloc_frozen_pages_noprof+0x292/0x710 mm/page_alloc.c:4739
alloc_pages_mpol+0x311/0x660 mm/mempolicy.c:2270
alloc_slab_page mm/slub.c:2423 [inline]
allocate_slab+0x8f/0x3a0 mm/slub.c:2587
new_slab mm/slub.c:2640 [inline]
___slab_alloc+0xc27/0x14a0 mm/slub.c:3826
__slab_alloc+0x58/0xa0 mm/slub.c:3916
__slab_alloc_node mm/slub.c:3991 [inline]
slab_alloc_node mm/slub.c:4152 [inline]
__do_kmalloc_node mm/slub.c:4293 [inline]
__kmalloc_noprof+0x2e6/0x4c0 mm/slub.c:4306
kmalloc_noprof include/linux/slab.h:905 [inline]
kzalloc_noprof include/linux/slab.h:1037 [inline]
tomoyo_encode2 security/tomoyo/realpath.c:45 [inline]
tomoyo_encode+0x26f/0x540 security/tomoyo/realpath.c:80
tomoyo_realpath_from_path+0x59e/0x5e0 security/tomoyo/realpath.c:283
tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
tomoyo_path_perm+0x2c0/0x610 security/tomoyo/file.c:822
security_inode_getattr+0x130/0x330 security/security.c:2377
vfs_getattr fs/stat.c:243 [inline]
vfs_fstat fs/stat.c:265 [inline]
vfs_fstatat+0xa3/0x150 fs/stat.c:366
__do_sys_newfstatat fs/stat.c:532 [inline]
__se_sys_newfstatat fs/stat.c:526 [inline]
__x64_sys_newfstatat+0x11d/0x1a0 fs/stat.c:526
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 5021 tgid 5021 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1127 [inline]
free_frozen_pages+0xe0d/0x10e0 mm/page_alloc.c:2660
stack_depot_save_flags+0x7c6/0x940 lib/stackdepot.c:674
kasan_save_stack mm/kasan/common.c:48 [inline]
kasan_save_track+0x51/0x80 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:377 [inline]
__kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:394
kasan_kmalloc include/linux/kasan.h:260 [inline]
__kmalloc_cache_noprof+0x243/0x390 mm/slub.c:4325
kmalloc_noprof include/linux/slab.h:901 [inline]
kzalloc_noprof include/linux/slab.h:1037 [inline]
ref_tracker_alloc+0x14b/0x490 lib/ref_tracker.c:203
__netdev_tracker_alloc include/linux/netdevice.h:4281 [inline]
netdev_hold include/linux/netdevice.h:4310 [inline]
fib_check_nh_nongw net/ipv4/fib_semantics.c:1217 [inline]
fib_check_nh+0xd17/0x1bd0 net/ipv4/fib_semantics.c:1237
fib_create_info+0x1573/0x25b0 net/ipv4/fib_semantics.c:1533
fib_table_insert+0x1f6/0x1f20 net/ipv4/fib_trie.c:1231
inet_rtm_newroute+0x149/0x290 net/ipv4/fib_frontend.c:911
rtnetlink_rcv_msg+0x73f/0xcf0 net/core/rtnetlink.c:6921
netlink_rcv_skb+0x206/0x480 net/netlink/af_netlink.c:2543
netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline]
netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1348
netlink_sendmsg+0x8de/0xcb0 net/netlink/af_netlink.c:1892
sock_sendmsg_nosec net/socket.c:718 [inline]
__sock_sendmsg+0x221/0x270 net/socket.c:733
____sys_sendmsg+0x53a/0x860 net/socket.c:2573
Memory state around the buggy address:
ffff888040adf900: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc
ffff888040adf980: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
>ffff888040adfa00: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc
^
ffff888040adfa80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
ffff888040adfb00: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc
==================================================================