==================================================================
BUG: KASAN: slab-use-after-free in __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:132 [inline]
BUG: KASAN: slab-use-after-free in _raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:166
Read of size 1 at addr ffff888029200818 by task kworker/u32:12/16222
CPU: 0 UID: 0 PID: 16222 Comm: kworker/u32:12 Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Workqueue: netns cleanup_net
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0x13d/0x4b0 mm/kasan/report.c:482
kasan_report+0xdf/0x1d0 mm/kasan/report.c:595
__kasan_check_byte+0x36/0x50 mm/kasan/common.c:574
kasan_check_byte include/linux/kasan.h:402 [inline]
lock_acquire kernel/locking/lockdep.c:5842 [inline]
lock_acquire+0x12a/0x370 kernel/locking/lockdep.c:5825
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:132 [inline]
_raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:166
p9_tag_remove net/9p/client.c:274 [inline]
p9_req_put net/9p/client.c:282 [inline]
p9_req_put+0xaf/0x250 net/9p/client.c:279
req_done+0x1dc/0x2e0 net/9p/trans_virtio.c:147
vring_interrupt+0x2ef/0x650 drivers/virtio/virtio_ring.c:3254
__handle_irq_event_percpu+0x235/0x8c0 kernel/irq/handle.c:209
handle_irq_event_percpu kernel/irq/handle.c:246 [inline]
handle_irq_event+0xab/0x1e0 kernel/irq/handle.c:263
handle_edge_irq+0x35e/0x960 kernel/irq/chip.c:856
generic_handle_irq_desc include/linux/irqdesc.h:186 [inline]
handle_irq arch/x86/kernel/irq.c:262 [inline]
call_irq_handler arch/x86/kernel/irq.c:318 [inline]
__common_interrupt+0xd8/0x2f0 arch/x86/kernel/irq.c:333
common_interrupt+0xb9/0xe0 arch/x86/kernel/irq.c:326
asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:688
RIP: 0010:unwind_next_frame+0xfaf/0x2090 arch/x86/kernel/unwind_orc.c:693
Code: 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 c2 0d 00 00 49 89 6d 40 48 b8 00 00 00 00 00 fc ff df 4c 89 ea 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 6c 0d 00 00 41 39 5d 00 0f 84
RSP: 0000:ffffc9000d8ef068 EFLAGS: 00000a02
RAX: dffffc0000000000 RBX: 0000000000000001 RCX: ffffffff91769db2
RDX: 1ffff92001b1de25 RSI: ffffc9000d8ef0f8 RDI: ffffc9000d8ef168
RBP: ffffc9000d8ef1b8 R08: 0000000000000001 R09: 0000000000000007
R10: 0000000000000200 R11: 000000000000b7a1 R12: ffffc9000d8ef178
R13: ffffc9000d8ef128 R14: ffffc9000d8ef128 R15: ffffc9000d8ef15c
__unwind_start+0x3d1/0x7f0 arch/x86/kernel/unwind_orc.c:787
unwind_start arch/x86/include/asm/unwind.h:64 [inline]
arch_stack_walk+0x73/0xf0 arch/x86/kernel/stacktrace.c:24
stack_trace_save+0x8e/0xc0 kernel/stacktrace.c:122
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:253 [inline]
__kasan_slab_free+0x5f/0x80 mm/kasan/common.c:285
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2689 [inline]
slab_free mm/slub.c:6250 [inline]
kfree+0x223/0x6c0 mm/slub.c:6565
skb_kfree_head net/core/skbuff.c:1075 [inline]
skb_free_head+0xb9/0x160 net/core/skbuff.c:1087
skb_release_data+0x6c5/0x8e0 net/core/skbuff.c:1114
skb_release_all net/core/skbuff.c:1189 [inline]
__kfree_skb net/core/skbuff.c:1203 [inline]
consume_skb net/core/skbuff.c:1436 [inline]
consume_skb+0xc4/0x110 net/core/skbuff.c:1430
netlink_broadcast_filtered+0x366/0xe90 net/netlink/af_netlink.c:1535
nlmsg_multicast_filtered include/net/netlink.h:1165 [inline]
nlmsg_multicast include/net/netlink.h:1184 [inline]
nlmsg_notify+0xb1/0x290 net/netlink/af_netlink.c:2593
inet_netconf_notify_devconf+0xf8/0x170 net/ipv4/devinet.c:2256
__devinet_sysctl_unregister net/ipv4/devinet.c:2739 [inline]
devinet_sysctl_unregister net/ipv4/devinet.c:2763 [inline]
inetdev_destroy net/ipv4/devinet.c:334 [inline]
inetdev_event+0xa70/0x17f0 net/ipv4/devinet.c:1655
notifier_call_chain+0x99/0x400 kernel/notifier.c:85
call_netdevice_notifiers_info+0xbe/0x110 net/core/dev.c:2249
call_netdevice_notifiers_extack net/core/dev.c:2287 [inline]
call_netdevice_notifiers net/core/dev.c:2301 [inline]
unregister_netdevice_many_notify+0x118f/0x24f0 net/core/dev.c:12421
unregister_netdevice_many net/core/dev.c:12484 [inline]
default_device_exit_batch+0x926/0xc10 net/core/dev.c:13076
ops_exit_list net/core/net_namespace.c:205 [inline]
ops_undo_list+0x363/0xab0 net/core/net_namespace.c:252
cleanup_net+0x499/0x920 net/core/net_namespace.c:702
process_one_work+0xa0e/0x1980 kernel/workqueue.c:3314
process_scheduled_works kernel/workqueue.c:3397 [inline]
worker_thread+0x5ef/0xe50 kernel/workqueue.c:3478
kthread+0x370/0x450 kernel/kthread.c:436
ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Allocated by task 22440:
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415
kmalloc_noprof include/linux/slab.h:950 [inline]
p9_client_create+0xaf/0xd40 net/9p/client.c:862
v9fs_session_init+0x3c/0xd20 fs/9p/v9fs.c:446
v9fs_get_tree+0xb8/0xb50 fs/9p/vfs_super.c:97
vfs_get_tree+0x92/0x320 fs/super.c:1754
fc_mount fs/namespace.c:1193 [inline]
do_new_mount_fc fs/namespace.c:3758 [inline]
do_new_mount fs/namespace.c:3834 [inline]
path_mount+0x7d0/0x23d0 fs/namespace.c:4154
do_mount fs/namespace.c:4167 [inline]
__do_sys_mount fs/namespace.c:4383 [inline]
__se_sys_mount fs/namespace.c:4360 [inline]
__ia32_sys_mount+0x292/0x310 fs/namespace.c:4360
do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
__do_fast_syscall_32+0xe7/0x950 arch/x86/entry/syscall_32.c:307
do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:332
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
Freed by task 22440:
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:253 [inline]
__kasan_slab_free+0x5f/0x80 mm/kasan/common.c:285
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2689 [inline]
slab_free mm/slub.c:6250 [inline]
kfree+0x223/0x6c0 mm/slub.c:6565
p9_client_create+0x72d/0xd40 net/9p/client.c:941
v9fs_session_init+0x3c/0xd20 fs/9p/v9fs.c:446
v9fs_get_tree+0xb8/0xb50 fs/9p/vfs_super.c:97
vfs_get_tree+0x92/0x320 fs/super.c:1754
fc_mount fs/namespace.c:1193 [inline]
do_new_mount_fc fs/namespace.c:3758 [inline]
do_new_mount fs/namespace.c:3834 [inline]
path_mount+0x7d0/0x23d0 fs/namespace.c:4154
do_mount fs/namespace.c:4167 [inline]
__do_sys_mount fs/namespace.c:4383 [inline]
__se_sys_mount fs/namespace.c:4360 [inline]
__ia32_sys_mount+0x292/0x310 fs/namespace.c:4360
do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
__do_fast_syscall_32+0xe7/0x950 arch/x86/entry/syscall_32.c:307
do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:332
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
The buggy address belongs to the object at ffff888029200800
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 24 bytes inside of
freed 512-byte region [ffff888029200800, ffff888029200a00)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x29200
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88801b842c80 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88801b842c80 dead000000000100 dead000000000122
head: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffffffffffff01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5738, tgid 5738 (syz-executor), ts 55464189458, free_ts 53852187821
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x153/0x170 mm/page_alloc.c:1858
prep_new_page mm/page_alloc.c:1866 [inline]
get_page_from_freelist+0x11a6/0x33b0 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x27c/0x2bc0 mm/page_alloc.c:5226
alloc_slab_page mm/slub.c:3278 [inline]
allocate_slab mm/slub.c:3467 [inline]
new_slab+0xa6/0x6c0 mm/slub.c:3525
refill_objects+0x277/0x420 mm/slub.c:7271
refill_sheaf mm/slub.c:2816 [inline]
__pcs_replace_empty_main+0x375/0x650 mm/slub.c:4651
alloc_from_pcs mm/slub.c:4749 [inline]
slab_alloc_node mm/slub.c:4883 [inline]
__do_kmalloc_node mm/slub.c:5294 [inline]
__kmalloc_noprof+0x688/0x850 mm/slub.c:5307
kmalloc_noprof include/linux/slab.h:954 [inline]
kzalloc_noprof include/linux/slab.h:1188 [inline]
fib6_info_alloc+0x40/0x160 net/ipv6/ip6_fib.c:155
ip6_route_info_create+0x14c/0xad0 net/ipv6/route.c:3828
addrconf_f6i_alloc+0x2d9/0x670 net/ipv6/route.c:4697
ipv6_add_addr+0x580/0x1fb0 net/ipv6/addrconf.c:1126
inet6_addr_add+0x26f/0x9a0 net/ipv6/addrconf.c:3050
inet6_rtm_newaddr+0x1475/0x1bb0 net/ipv6/addrconf.c:5071
rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:6996
netlink_rcv_skb+0x159/0x420 net/netlink/af_netlink.c:2550
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x585/0x850 net/netlink/af_netlink.c:1344
page last free pid 5736 tgid 5736 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1402 [inline]
__free_frozen_pages+0x747/0x1040 mm/page_alloc.c:2943
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:350
kasan_slab_alloc include/linux/kasan.h:253 [inline]
slab_post_alloc_hook mm/slub.c:4569 [inline]
slab_alloc_node mm/slub.c:4898 [inline]
__do_kmalloc_node mm/slub.c:5294 [inline]
__kvmalloc_node_noprof+0x316/0xa00 mm/slub.c:6832
netif_alloc_netdev_queues net/core/dev.c:11212 [inline]
alloc_netdev_mqs+0xb4a/0x1560 net/core/dev.c:12096
rtnl_create_link+0xc13/0xf80 net/core/rtnetlink.c:3672
veth_newlink+0x203/0xa00 drivers/net/veth.c:1848
rtnl_newlink_create net/core/rtnetlink.c:3864 [inline]
__rtnl_newlink net/core/rtnetlink.c:3995 [inline]
rtnl_newlink+0x1499/0x2380 net/core/rtnetlink.c:4110
rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:6996
netlink_rcv_skb+0x159/0x420 net/netlink/af_netlink.c:2550
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x585/0x850 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x8b0/0xda0 net/netlink/af_netlink.c:1894
sock_sendmsg_nosec net/socket.c:787 [inline]
__sock_sendmsg net/socket.c:802 [inline]
__sys_sendto+0x468/0x4b0 net/socket.c:2265
__do_compat_sys_socketcall net/compat.c:475 [inline]
__se_compat_sys_socketcall net/compat.c:423 [inline]
__ia32_compat_sys_socketcall+0x59a/0x770 net/compat.c:423
do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
do_int80_emulation+0x141/0x700 arch/x86/entry/syscall_32.c:172
Memory state around the buggy address:
ffff888029200700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888029200780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888029200800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888029200880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888029200900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess), 7 bytes skipped:
0: 48 c1 ea 03 shr $0x3,%rdx
4: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1)
8: 0f 85 c2 0d 00 00 jne 0xdd0
e: 49 89 6d 40 mov %rbp,0x40(%r13)
12: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
19: fc ff df
1c: 4c 89 ea mov %r13,%rdx
1f: 48 c1 ea 03 shr $0x3,%rdx
* 23: 0f b6 04 02 movzbl (%rdx,%rax,1),%eax <-- trapping instruction
27: 84 c0 test %al,%al
29: 74 08 je 0x33
2b: 3c 03 cmp $0x3,%al
2d: 0f 8e 6c 0d 00 00 jle 0xd9f
33: 41 39 5d 00 cmp %ebx,0x0(%r13)
37: 0f .byte 0xf
38: 84 .byte 0x84