================================================================== BUG: KASAN: slab-out-of-bounds in lockdep_register_key+0x396/0x410 kernel/locking/lockdep.c:1231 Read of size 8 at addr ffff8880333b7b60 by task syz-executor.5/23570 CPU: 0 PID: 23570 Comm: syz-executor.5 Not tainted 6.3.0-rc4-next-20230329-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:351 print_report mm/kasan/report.c:462 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:572 lockdep_register_key+0x396/0x410 kernel/locking/lockdep.c:1231 wq_init_lockdep kernel/workqueue.c:3604 [inline] alloc_workqueue+0x3f8/0x1110 kernel/workqueue.c:4476 tipc_topsrv_work_start net/tipc/topsrv.c:635 [inline] tipc_topsrv_start net/tipc/topsrv.c:679 [inline] tipc_topsrv_init_net+0x418/0x9e0 net/tipc/topsrv.c:725 ops_init+0xb9/0x6b0 net/core/net_namespace.c:136 setup_net+0x5d1/0xc50 net/core/net_namespace.c:339 copy_net_ns+0x4ee/0x8e0 net/core/net_namespace.c:491 create_new_namespaces+0x3f6/0xb20 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0xc1/0x1f0 kernel/nsproxy.c:228 ksys_unshare+0x449/0x920 kernel/fork.c:3357 __do_sys_unshare kernel/fork.c:3428 [inline] __se_sys_unshare kernel/fork.c:3426 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:3426 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f1b51a8c0f9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f1b52743168 EFLAGS: 00000246 ORIG_RAX: 0000000000000110 RAX: ffffffffffffffda RBX: 00007f1b51bac1f0 RCX: 00007f1b51a8c0f9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000006c060000 RBP: 00007f1b51ae7b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffce96e3e4f R14: 00007f1b52743300 R15: 0000000000022000 Allocated by task 21600: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] ____kasan_kmalloc mm/kasan/common.c:333 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:196 [inline] __do_kmalloc_node mm/slab_common.c:966 [inline] __kmalloc_node_track_caller+0x5f/0x1a0 mm/slab_common.c:986 kmemdup+0x2c/0x60 mm/util.c:131 kmemdup include/linux/fortify-string.h:702 [inline] ipv6_route_sysctl_init+0x28/0x370 net/ipv6/route.c:6429 ipv6_sysctl_net_init+0x9a/0x2a0 net/ipv6/sysctl_net_ipv6.c:270 ops_init+0xb9/0x6b0 net/core/net_namespace.c:136 setup_net+0x5d1/0xc50 net/core/net_namespace.c:339 copy_net_ns+0x4ee/0x8e0 net/core/net_namespace.c:491 create_new_namespaces+0x3f6/0xb20 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0xc1/0x1f0 kernel/nsproxy.c:228 ksys_unshare+0x449/0x920 kernel/fork.c:3357 __do_sys_unshare kernel/fork.c:3428 [inline] __se_sys_unshare kernel/fork.c:3426 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:3426 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:491 kvfree_call_rcu+0x70/0xad0 kernel/rcu/tree.c:3331 neigh_destroy+0x433/0x660 net/core/neighbour.c:910 neigh_release include/net/neighbour.h:447 [inline] neigh_cleanup_and_release net/core/neighbour.c:103 [inline] neigh_periodic_work+0x726/0xb80 net/core/neighbour.c:994 process_one_work+0x99a/0x15e0 kernel/workqueue.c:2405 worker_thread+0x67d/0x10c0 kernel/workqueue.c:2552 kthread+0x33e/0x440 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Second to last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:491 __call_rcu_common.constprop.0+0x99/0x790 kernel/rcu/tree.c:2637 rxrpc_put_local.part.0+0x128/0x170 net/rxrpc/local_object.c:364 rxrpc_put_local+0x25/0x30 net/rxrpc/local_object.c:356 rxrpc_release_sock net/rxrpc/af_rxrpc.c:891 [inline] rxrpc_release+0x23a/0x560 net/rxrpc/af_rxrpc.c:917 __sock_release net/socket.c:653 [inline] sock_release+0x8b/0x1d0 net/socket.c:681 afs_close_socket+0x1ce/0x330 fs/afs/rxrpc.c:127 afs_net_exit+0x90/0xf0 fs/afs/main.c:158 ops_exit_list+0xb0/0x170 net/core/net_namespace.c:170 cleanup_net+0x4ee/0xb10 net/core/net_namespace.c:614 process_one_work+0x99a/0x15e0 kernel/workqueue.c:2405 worker_thread+0x67d/0x10c0 kernel/workqueue.c:2552 kthread+0x33e/0x440 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 The buggy address belongs to the object at ffff8880333b7800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 96 bytes to the right of allocated 768-byte region [ffff8880333b7800, ffff8880333b7b00) The buggy address belongs to the physical page: page:ffffea0000ccec00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x333b0 head:ffffea0000ccec00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000010200 ffff888012441dc0 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5134, tgid 5134 (syz-executor.3), ts 279893614573, free_ts 0 prep_new_page mm/page_alloc.c:1729 [inline] get_page_from_freelist+0xf75/0x2aa0 mm/page_alloc.c:3493 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:4759 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2283 alloc_slab_page mm/slub.c:1851 [inline] allocate_slab+0x28e/0x380 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3193 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3292 __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] __kmem_cache_alloc_node+0x136/0x320 mm/slub.c:3491 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1057 kmalloc include/linux/slab.h:559 [inline] kzalloc include/linux/slab.h:680 [inline] batadv_hardif_add_interface net/batman-adv/hard-interface.c:864 [inline] batadv_hard_if_event+0x92e/0x15e0 net/batman-adv/hard-interface.c:952 notifier_call_chain+0xb6/0x3c0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1937 call_netdevice_notifiers_extack net/core/dev.c:1975 [inline] call_netdevice_notifiers net/core/dev.c:1989 [inline] register_netdevice+0xfb4/0x1640 net/core/dev.c:10079 veth_newlink+0x352/0x9d0 drivers/net/veth.c:1834 rtnl_newlink_create net/core/rtnetlink.c:3443 [inline] __rtnl_newlink+0x10c2/0x1840 net/core/rtnetlink.c:3660 rtnl_newlink+0x68/0xa0 net/core/rtnetlink.c:3673 rtnetlink_rcv_msg+0x43d/0xd50 net/core/rtnetlink.c:6388 page_owner free stack trace missing Memory state around the buggy address: ffff8880333b7a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880333b7a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880333b7b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880333b7b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880333b7c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================