INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 1 PID: 8973 Comm: syz-executor243 Not tainted 5.2.0-rc1+ #1 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 assign_lock_key kernel/locking/lockdep.c:774 [inline] register_lock_class+0x167e/0x1860 kernel/locking/lockdep.c:1083 __lock_acquire+0x116/0x5490 kernel/locking/lockdep.c:3673 lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:4302 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:338 [inline] rhashtable_walk_enter+0xf9/0x390 lib/rhashtable.c:669 __tipc_dump_start+0x1fa/0x3c0 net/tipc/socket.c:3414 tipc_dump_start+0x70/0x90 net/tipc/socket.c:3396 __netlink_dump_start+0x4f8/0x7d0 net/netlink/af_netlink.c:2351 netlink_dump_start include/linux/netlink.h:226 [inline] tipc_sock_diag_handler_dump+0x1d9/0x270 net/tipc/diag.c:91 __sock_diag_cmd net/core/sock_diag.c:232 [inline] sock_diag_rcv_msg+0x319/0x410 net/core/sock_diag.c:263 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2486 sock_diag_rcv+0x2b/0x40 net/core/sock_diag.c:274 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x531/0x710 net/netlink/af_netlink.c:1337 netlink_sendmsg+0x8ae/0xd70 net/netlink/af_netlink.c:1926 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:671 ___sys_sendmsg+0x803/0x920 net/socket.c:2292 __sys_sendmsg+0x105/0x1d0 net/socket.c:2330 __compat_sys_sendmsg net/compat.c:640 [inline] __do_compat_sys_sendmsg net/compat.c:647 [inline] __se_compat_sys_sendmsg net/compat.c:644 [inline] __ia32_compat_sys_sendmsg+0x7a/0xb0 net/compat.c:644 do_syscall_32_irqs_on arch/x86/entry/common.c:337 [inline] do_fast_syscall_32+0x27b/0xd7d arch/x86/entry/common.c:408 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7f82849 Code: 85 d2 74 02 89 0a 5b 5d c3 8b 04 24 c3 8b 14 24 c3 8b 3c 24 c3 90 90 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000ff87305c EFLAGS: 00000246 ORIG_RAX: 0000000000000172 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000020000040 RDX: 0000000000000000 RSI: 00000000080ea078 RDI: 00000000ff8730b0 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ================================================================== BUG: KASAN: slab-out-of-bounds in rhashtable_walk_enter+0x2ed/0x390 lib/rhashtable.c:671 Read of size 8 at addr ffff88809ae3e0a8 by task syz-executor243/8973 CPU: 1 PID: 8973 Comm: syz-executor243 Not tainted 5.2.0-rc1+ #1 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:188 __kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 kasan_report+0x12/0x20 mm/kasan/common.c:614 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 rhashtable_walk_enter+0x2ed/0x390 lib/rhashtable.c:671 __tipc_dump_start+0x1fa/0x3c0 net/tipc/socket.c:3414 tipc_dump_start+0x70/0x90 net/tipc/socket.c:3396 __netlink_dump_start+0x4f8/0x7d0 net/netlink/af_netlink.c:2351 netlink_dump_start include/linux/netlink.h:226 [inline] tipc_sock_diag_handler_dump+0x1d9/0x270 net/tipc/diag.c:91 __sock_diag_cmd net/core/sock_diag.c:232 [inline] sock_diag_rcv_msg+0x319/0x410 net/core/sock_diag.c:263 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2486 sock_diag_rcv+0x2b/0x40 net/core/sock_diag.c:274 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x531/0x710 net/netlink/af_netlink.c:1337 netlink_sendmsg+0x8ae/0xd70 net/netlink/af_netlink.c:1926 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:671 ___sys_sendmsg+0x803/0x920 net/socket.c:2292 __sys_sendmsg+0x105/0x1d0 net/socket.c:2330 __compat_sys_sendmsg net/compat.c:640 [inline] __do_compat_sys_sendmsg net/compat.c:647 [inline] __se_compat_sys_sendmsg net/compat.c:644 [inline] __ia32_compat_sys_sendmsg+0x7a/0xb0 net/compat.c:644 do_syscall_32_irqs_on arch/x86/entry/common.c:337 [inline] do_fast_syscall_32+0x27b/0xd7d arch/x86/entry/common.c:408 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7f82849 Code: 85 d2 74 02 89 0a 5b 5d c3 8b 04 24 c3 8b 14 24 c3 8b 3c 24 c3 90 90 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000ff87305c EFLAGS: 00000246 ORIG_RAX: 0000000000000172 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000020000040 RDX: 0000000000000000 RSI: 00000000080ea078 RDI: 00000000ff8730b0 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 1: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_kmalloc mm/kasan/common.c:489 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:462 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:503 kmem_cache_alloc_trace+0x151/0x750 mm/slab.c:3555 kmalloc include/linux/slab.h:547 [inline] kzalloc include/linux/slab.h:742 [inline] batadv_hardif_add_interface net/batman-adv/hard-interface.c:911 [inline] batadv_hard_if_event+0x87a/0xf80 net/batman-adv/hard-interface.c:1032 call_netdevice_notifier net/core/dev.c:1621 [inline] register_netdevice_notifier+0x196/0x630 net/core/dev.c:1657 batadv_init+0x195/0x1cd net/batman-adv/main.c:119 do_one_initcall+0x107/0x7ba init/main.c:914 do_initcall_level init/main.c:982 [inline] do_initcalls init/main.c:990 [inline] do_basic_setup init/main.c:1008 [inline] kernel_init_freeable+0x4d4/0x5c3 init/main.c:1168 kernel_init+0x12/0x1c5 init/main.c:1086 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff88809ae3e0c0 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 24 bytes to the left of 512-byte region [ffff88809ae3e0c0, ffff88809ae3e2c0) The buggy address belongs to the page: page:ffffea00026b8f80 refcount:1 mapcount:0 mapping:ffff8880aa400940 index:0x0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea000269d648 ffffea000265df88 ffff8880aa400940 raw: 0000000000000000 ffff88809ae3e0c0 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809ae3df80: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc ffff88809ae3e000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88809ae3e080: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ^ ffff88809ae3e100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88809ae3e180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================