BUG: spinlock bad magic on CPU#0, syz-executor.2/32135 ================================================================== BUG: KASAN: slab-out-of-bounds in task_pid_nr include/linux/sched.h:1565 [inline] BUG: KASAN: slab-out-of-bounds in spin_dump kernel/locking/spinlock_debug.c:63 [inline] BUG: KASAN: slab-out-of-bounds in spin_bug.cold+0x95/0x9e kernel/locking/spinlock_debug.c:77 Read of size 4 at addr ffff8881d02bd878 by task syz-executor.2/32135 CPU: 0 PID: 32135 Comm: syz-executor.2 Not tainted 6.1.0-syzkaller-07447-gaba5b397cad7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15e/0x45d mm/kasan/report.c:395 kasan_report+0xbf/0x1f0 mm/kasan/report.c:495 task_pid_nr include/linux/sched.h:1565 [inline] spin_dump kernel/locking/spinlock_debug.c:63 [inline] spin_bug.cold+0x95/0x9e kernel/locking/spinlock_debug.c:77 debug_spin_lock_before kernel/locking/spinlock_debug.c:85 [inline] do_raw_spin_lock+0x219/0x2b0 kernel/locking/spinlock_debug.c:114 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0x45/0x60 kernel/locking/spinlock.c:162 skb_queue_tail+0x25/0x150 net/core/skbuff.c:3569 rxrpc_encap_rcv+0x106/0x230 net/rxrpc/io_thread.c:39 udpv6_queue_rcv_one_skb+0xa76/0x15c0 net/ipv6/udp.c:731 udpv6_queue_rcv_skb+0x192/0x9c0 net/ipv6/udp.c:792 udp6_unicast_rcv_skb+0x157/0x2f0 net/ipv6/udp.c:935 __udp6_lib_rcv+0xcca/0x2a30 net/ipv6/udp.c:1020 ip6_protocol_deliver_rcu+0x2dd/0x1280 net/ipv6/ip6_input.c:439 ip6_input_finish+0x150/0x2c0 net/ipv6/ip6_input.c:484 NF_HOOK include/linux/netfilter.h:302 [inline] NF_HOOK include/linux/netfilter.h:296 [inline] ip6_input+0xa0/0xd0 net/ipv6/ip6_input.c:493 dst_input include/net/dst.h:454 [inline] ip6_rcv_finish net/ipv6/ip6_input.c:79 [inline] NF_HOOK include/linux/netfilter.h:302 [inline] NF_HOOK include/linux/netfilter.h:296 [inline] ipv6_rcv+0x250/0x380 net/ipv6/ip6_input.c:309 __netif_receive_skb_one_core+0x114/0x180 net/core/dev.c:5482 __netif_receive_skb+0x1f/0x1c0 net/core/dev.c:5596 process_backlog+0x3e4/0x810 net/core/dev.c:5924 __napi_poll+0xb8/0x770 net/core/dev.c:6485 napi_poll net/core/dev.c:6552 [inline] net_rx_action+0xa00/0xde0 net/core/dev.c:6663 __do_softirq+0x1fb/0xadc kernel/softirq.c:571 do_softirq.part.0+0xde/0x130 kernel/softirq.c:472 do_softirq kernel/softirq.c:464 [inline] __local_bh_enable_ip+0x106/0x130 kernel/softirq.c:396 local_bh_enable include/linux/bottom_half.h:33 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:834 [inline] ip6_finish_output2+0x5be/0x1530 net/ipv6/ip6_output.c:135 __ip6_finish_output net/ipv6/ip6_output.c:195 [inline] ip6_finish_output+0x694/0x1170 net/ipv6/ip6_output.c:206 NF_HOOK_COND include/linux/netfilter.h:291 [inline] ip6_output+0x1f1/0x540 net/ipv6/ip6_output.c:227 dst_output include/net/dst.h:444 [inline] ip6_local_out+0xb3/0x1a0 net/ipv6/output_core.c:155 ip6_send_skb+0xbb/0x340 net/ipv6/ip6_output.c:1971 udp_v6_send_skb+0x82a/0x18a0 net/ipv6/udp.c:1294 udpv6_sendmsg+0x20e2/0x2c80 net/ipv6/udp.c:1586 inet6_sendmsg+0x9d/0xe0 net/ipv6/af_inet6.c:660 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0xd3/0x120 net/socket.c:734 ____sys_sendmsg+0x712/0x8c0 net/socket.c:2476 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2530 __sys_sendmsg+0xf7/0x1c0 net/socket.c:2559 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:0x7ff4c5c8c0d9 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:00007ff4c6a28168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007ff4c5dabf80 RCX: 00007ff4c5c8c0d9 RDX: 0000000000000000 RSI: 0000000020000700 RDI: 0000000000000003 RBP: 00007ff4c5ce7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdcd41965f R14: 00007ff4c6a28300 R15: 0000000000022000 Allocated by task 15677: 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:371 [inline] ____kasan_kmalloc mm/kasan/common.c:330 [inline] __kasan_kmalloc+0xa5/0xb0 mm/kasan/common.c:380 kmalloc include/linux/slab.h:580 [inline] kzalloc include/linux/slab.h:720 [inline] ref_tracker_alloc+0x158/0x560 lib/ref_tracker.c:85 __netdev_tracker_alloc include/linux/netdevice.h:4020 [inline] netdev_hold include/linux/netdevice.h:4049 [inline] netdev_hold include/linux/netdevice.h:4044 [inline] netdev_queue_add_kobject net/core/net-sysfs.c:1663 [inline] netdev_queue_update_kobjects+0x1ab/0x4f0 net/core/net-sysfs.c:1718 register_queue_kobjects net/core/net-sysfs.c:1779 [inline] netdev_register_kobject+0x334/0x400 net/core/net-sysfs.c:2019 register_netdevice+0xd77/0x1640 net/core/dev.c:10045 bond_newlink drivers/net/bonding/bond_netlink.c:560 [inline] bond_newlink+0x4b/0xa0 drivers/net/bonding/bond_netlink.c:550 rtnl_newlink_create net/core/rtnetlink.c:3407 [inline] __rtnl_newlink+0x10c2/0x1840 net/core/rtnetlink.c:3624 rtnl_newlink+0x68/0xa0 net/core/rtnetlink.c:3637 rtnetlink_rcv_msg+0x43e/0xca0 net/core/rtnetlink.c:6141 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2564 netlink_unicast_kernel net/netlink/af_netlink.c:1330 [inline] netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1356 netlink_sendmsg+0x91b/0xe10 net/netlink/af_netlink.c:1932 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0xd3/0x120 net/socket.c:734 ____sys_sendmsg+0x712/0x8c0 net/socket.c:2476 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2530 __sys_sendmsg+0xf7/0x1c0 net/socket.c:2559 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 The buggy address belongs to the object at ffff8881d02bd840 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 24 bytes to the right of 32-byte region [ffff8881d02bd840, ffff8881d02bd860) The buggy address belongs to the physical page: page:ffffea000740af40 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1d02bd ksm flags: 0x57ff00000000200(slab|node=1|zone=2|lastcpupid=0x7ff) raw: 057ff00000000200 ffff888012441500 ffffea00071e7dc0 dead000000000003 raw: 0000000000000000 0000000000400040 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 12154, tgid 12154 (kworker/u4:1), ts 1739632921633, free_ts 1738784260758 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x10b5/0x2d50 mm/page_alloc.c:4291 __alloc_pages+0x1cb/0x5b0 mm/page_alloc.c:5558 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2285 alloc_slab_page mm/slub.c:1851 [inline] allocate_slab+0x25f/0x350 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+0x1a4/0x430 mm/slub.c:3491 __do_kmalloc_node mm/slab_common.c:967 [inline] __kmalloc+0x4a/0xd0 mm/slab_common.c:981 kmalloc include/linux/slab.h:584 [inline] batadv_tt_prepare_tvlv_local_data+0x1b2/0x650 net/batman-adv/translation-table.c:950 batadv_tt_tvlv_container_update+0x158/0x780 net/batman-adv/translation-table.c:1005 batadv_tt_local_commit_changes_nolock+0xc3d/0xd80 net/batman-adv/translation-table.c:3691 batadv_tt_local_commit_changes+0x26/0x40 net/batman-adv/translation-table.c:3719 batadv_iv_ogm_schedule_buff+0x10fd/0x1450 net/batman-adv/bat_iv_ogm.c:812 batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:869 [inline] batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:862 [inline] batadv_iv_send_outstanding_bat_ogm_packet+0x744/0x910 net/batman-adv/bat_iv_ogm.c:1713 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 worker_thread+0x669/0x1090 kernel/workqueue.c:2436 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare+0x65c/0xd90 mm/page_alloc.c:1509 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page_list+0x176/0xc40 mm/page_alloc.c:3529 release_pages+0xc8a/0x1360 mm/swap.c:1055 tlb_batch_pages_flush+0xa8/0x1a0 mm/mmu_gather.c:59 tlb_flush_mmu_free mm/mmu_gather.c:254 [inline] tlb_flush_mmu mm/mmu_gather.c:261 [inline] tlb_finish_mmu+0x14b/0x7e0 mm/mmu_gather.c:361 exit_mmap+0x202/0x7b0 mm/mmap.c:3096 __mmput+0x128/0x4c0 kernel/fork.c:1188 mmput+0x60/0x70 kernel/fork.c:1210 exit_mm kernel/exit.c:516 [inline] do_exit+0xa41/0x2a30 kernel/exit.c:807 do_group_exit+0xd4/0x2a0 kernel/exit.c:950 __do_sys_exit_group kernel/exit.c:961 [inline] __se_sys_exit_group kernel/exit.c:959 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:959 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 Memory state around the buggy address: ffff8881d02bd700: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc ffff8881d02bd780: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc >ffff8881d02bd800: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc ^ ffff8881d02bd880: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc ffff8881d02bd900: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc ==================================================================