==================================================================
BUG: KASAN: slab-use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:85 [inline]
BUG: KASAN: slab-use-after-free in do_raw_spin_lock+0x26f/0x2b0 kernel/locking/spinlock_debug.c:114
Read of size 4 at addr ffff888075cc0404 by task syz-executor.3/4562
CPU: 1 PID: 4562 Comm: syz-executor.3 Not tainted 6.6.0-rc1-syzkaller-00033-g3669558bdf35 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0xc4/0x620 mm/kasan/report.c:475
kasan_report+0xda/0x110 mm/kasan/report.c:588
debug_spin_lock_before kernel/locking/spinlock_debug.c:85 [inline]
do_raw_spin_lock+0x26f/0x2b0 kernel/locking/spinlock_debug.c:114
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline]
_raw_spin_lock_irqsave+0x42/0x50 kernel/locking/spinlock.c:162
p9_tag_remove net/9p/client.c:394 [inline]
p9_req_put net/9p/client.c:402 [inline]
p9_req_put+0xc6/0x250 net/9p/client.c:399
req_done+0x1e7/0x2e0 net/9p/trans_virtio.c:147
vring_interrupt drivers/virtio/virtio_ring.c:2595 [inline]
vring_interrupt+0x317/0x3f0 drivers/virtio/virtio_ring.c:2570
__handle_irq_event_percpu+0x22a/0x740 kernel/irq/handle.c:158
handle_irq_event_percpu kernel/irq/handle.c:193 [inline]
handle_irq_event+0xab/0x1e0 kernel/irq/handle.c:210
handle_edge_irq+0x261/0xcf0 kernel/irq/chip.c:831
generic_handle_irq_desc include/linux/irqdesc.h:161 [inline]
handle_irq arch/x86/kernel/irq.c:238 [inline]
__common_interrupt+0xdb/0x240 arch/x86/kernel/irq.c:257
common_interrupt+0xa9/0xd0 arch/x86/kernel/irq.c:247
asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:636
RIP: 0010:debug_lockdep_rcu_enabled+0x2f/0x30 kernel/rcu/update.c:321
Code: 05 9a 3d 8f 04 85 c0 74 21 8b 05 f4 71 8f 04 85 c0 74 17 65 48 8b 04 25 c0 bc 03 00 8b 80 c4 0a 00 00 85 c0 0f 94 c0 0f b6 c0 66 0f 1f 00 55 53 65 8b 05 8f 9d c3 75 85 c0 40 0f 95 c5 65 8b
RSP: 0018:ffffc90006c878b0 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffea00006ee100 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8ae928a0 RDI: ffffffff8c5cea48
RBP: 000000000000000f R08: 0000000000000000 R09: fffffbfff1d9c4b2
R10: ffffffff8ece2597 R11: dffffc0000000000 R12: 0000000000000000
R13: ffffc90006c87920 R14: ffff888074ccdc00 R15: ffff888040648780
rcu_read_lock include/linux/rcupdate.h:750 [inline]
percpu_ref_get_many include/linux/percpu-refcount.h:202 [inline]
percpu_ref_get include/linux/percpu-refcount.h:222 [inline]
obj_cgroup_get include/linux/memcontrol.h:798 [inline]
memcg_slab_post_alloc_hook+0x15b/0x390 mm/slab.h:537
slab_post_alloc_hook mm/slab.h:770 [inline]
slab_alloc_node mm/slub.c:3478 [inline]
slab_alloc mm/slub.c:3486 [inline]
__kmem_cache_alloc_lru mm/slub.c:3493 [inline]
kmem_cache_alloc+0x1a7/0x3b0 mm/slub.c:3502
vm_area_dup+0x21/0x2f0 kernel/fork.c:500
dup_mmap+0x93c/0x1d80 kernel/fork.c:710
dup_mm kernel/fork.c:1686 [inline]
copy_mm kernel/fork.c:1735 [inline]
copy_process+0x6c11/0x7400 kernel/fork.c:2501
kernel_clone+0xfd/0x930 kernel/fork.c:2909
__do_compat_sys_ia32_clone+0xb7/0xf0 arch/x86/kernel/sys_ia32.c:254
do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline]
__do_fast_syscall_32+0x61/0xe0 arch/x86/entry/common.c:178
do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203
entry_SYSENTER_compat_after_hwframe+0x70/0x82
RIP: 0023:0xf7f03579
Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00
RSP: 002b:00000000ffe9fa6c EFLAGS: 00000292 ORIG_RAX: 0000000000000078
RAX: ffffffffffffffda RBX: 0000000001200011 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000574ac468
RBP: 00000000f7353ff4 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Allocated by task 7636:
kasan_save_stack+0x33/0x50 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+0xa2/0xb0 mm/kasan/common.c:383
kmalloc include/linux/slab.h:599 [inline]
p9_client_create+0xcf/0x1210 net/9p/client.c:978
v9fs_session_init+0x1f8/0x1a80 fs/9p/v9fs.c:410
v9fs_mount+0xc6/0xcd0 fs/9p/vfs_super.c:123
legacy_get_tree+0x109/0x220 fs/fs_context.c:638
vfs_get_tree+0x8c/0x370 fs/super.c:1750
do_new_mount fs/namespace.c:3335 [inline]
path_mount+0x1492/0x1ed0 fs/namespace.c:3662
do_mount fs/namespace.c:3675 [inline]
__do_sys_mount fs/namespace.c:3884 [inline]
__se_sys_mount fs/namespace.c:3861 [inline]
__ia32_sys_mount+0x291/0x310 fs/namespace.c:3861
do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline]
__do_fast_syscall_32+0x61/0xe0 arch/x86/entry/common.c:178
do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203
entry_SYSENTER_compat_after_hwframe+0x70/0x82
Freed by task 7636:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
kasan_set_track+0x25/0x30 mm/kasan/common.c:52
kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522
____kasan_slab_free mm/kasan/common.c:236 [inline]
____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200
kasan_slab_free include/linux/kasan.h:164 [inline]
slab_free_hook mm/slub.c:1800 [inline]
slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826
slab_free mm/slub.c:3809 [inline]
__kmem_cache_free+0xb8/0x2f0 mm/slub.c:3822
p9_client_create+0xa14/0x1210 net/9p/client.c:1049
v9fs_session_init+0x1f8/0x1a80 fs/9p/v9fs.c:410
v9fs_mount+0xc6/0xcd0 fs/9p/vfs_super.c:123
legacy_get_tree+0x109/0x220 fs/fs_context.c:638
vfs_get_tree+0x8c/0x370 fs/super.c:1750
do_new_mount fs/namespace.c:3335 [inline]
path_mount+0x1492/0x1ed0 fs/namespace.c:3662
do_mount fs/namespace.c:3675 [inline]
__do_sys_mount fs/namespace.c:3884 [inline]
__se_sys_mount fs/namespace.c:3861 [inline]
__ia32_sys_mount+0x291/0x310 fs/namespace.c:3861
do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline]
__do_fast_syscall_32+0x61/0xe0 arch/x86/entry/common.c:178
do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203
entry_SYSENTER_compat_after_hwframe+0x70/0x82
Last potentially related work creation:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
__kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492
kvfree_call_rcu+0x70/0xbe0 kernel/rcu/tree.c:3372
ma_put net/ipv6/mcast.c:869 [inline]
ma_put+0x11a/0x170 net/ipv6/mcast.c:865
__ipv6_dev_mc_dec+0x297/0x360 net/ipv6/mcast.c:982
ipv6_mc_destroy_dev+0x2cb/0x680 net/ipv6/mcast.c:2798
addrconf_ifdown.isra.0+0x1597/0x1c50 net/ipv6/addrconf.c:3935
addrconf_notify+0x22d/0x1920 net/ipv6/addrconf.c:3715
notifier_call_chain+0xb6/0x3b0 kernel/notifier.c:93
call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1970
call_netdevice_notifiers_extack net/core/dev.c:2008 [inline]
call_netdevice_notifiers net/core/dev.c:2022 [inline]
unregister_netdevice_many_notify+0x85f/0x1a20 net/core/dev.c:10938
vti6_exit_batch_net+0x3c3/0x730 net/ipv6/ip6_vti.c:1188
ops_exit_list+0x125/0x170 net/core/net_namespace.c:175
cleanup_net+0x505/0xb20 net/core/net_namespace.c:614
process_one_work+0x887/0x15d0 kernel/workqueue.c:2630
process_scheduled_works kernel/workqueue.c:2703 [inline]
worker_thread+0x8bb/0x1290 kernel/workqueue.c:2784
kthread+0x33a/0x430 kernel/kthread.c:388
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
Second to last potentially related work creation:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
__kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492
kvfree_call_rcu+0x70/0xbe0 kernel/rcu/tree.c:3372
ma_put net/ipv6/mcast.c:869 [inline]
ma_put+0x11a/0x170 net/ipv6/mcast.c:865
ipv6_mc_destroy_dev+0x3ba/0x680 net/ipv6/mcast.c:2808
addrconf_ifdown.isra.0+0x1597/0x1c50 net/ipv6/addrconf.c:3935
addrconf_notify+0x22d/0x1920 net/ipv6/addrconf.c:3715
notifier_call_chain+0xb6/0x3b0 kernel/notifier.c:93
call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1970
call_netdevice_notifiers_extack net/core/dev.c:2008 [inline]
call_netdevice_notifiers net/core/dev.c:2022 [inline]
unregister_netdevice_many_notify+0x85f/0x1a20 net/core/dev.c:10938
vlan_device_event+0x1897/0x2110 net/8021q/vlan.c:489
notifier_call_chain+0xb6/0x3b0 kernel/notifier.c:93
call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1970
call_netdevice_notifiers_extack net/core/dev.c:2008 [inline]
call_netdevice_notifiers net/core/dev.c:2022 [inline]
unregister_netdevice_many_notify+0x85f/0x1a20 net/core/dev.c:10938
rtnl_delete_link net/core/rtnetlink.c:3227 [inline]
rtnl_dellink+0x3c1/0xae0 net/core/rtnetlink.c:3279
rtnetlink_rcv_msg+0x439/0xd30 net/core/rtnetlink.c:6444
netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2545
netlink_unicast_kernel net/netlink/af_netlink.c:1342 [inline]
netlink_unicast+0x536/0x810 net/netlink/af_netlink.c:1368
netlink_sendmsg+0x93c/0xe40 net/netlink/af_netlink.c:1910
sock_sendmsg_nosec net/socket.c:730 [inline]
sock_sendmsg+0xd9/0x180 net/socket.c:753
____sys_sendmsg+0x6ac/0x940 net/socket.c:2541
___sys_sendmsg+0x135/0x1d0 net/socket.c:2595
__sys_sendmsg+0x117/0x1e0 net/socket.c:2624
do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline]
__do_fast_syscall_32+0x61/0xe0 arch/x86/entry/common.c:178
do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203
entry_SYSENTER_compat_after_hwframe+0x70/0x82
The buggy address belongs to the object at ffff888075cc0400
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 4 bytes inside of
freed 512-byte region [ffff888075cc0400, ffff888075cc0600)
The buggy address belongs to the physical page:
page:ffffea0001d73000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x75cc0
head:ffffea0001d73000 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0x4fff00000000840(slab|head|node=1|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 04fff00000000840 ffff888012c42c80 0000000000000000 dead000000000001
raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000
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 28, tgid 28 (kworker/1:0), ts 174750234415, free_ts 0
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536
prep_new_page mm/page_alloc.c:1543 [inline]
get_page_from_freelist+0xee0/0x2f20 mm/page_alloc.c:3170
__alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4426
alloc_pages+0x1a9/0x270 mm/mempolicy.c:2298
alloc_slab_page mm/slub.c:1870 [inline]
allocate_slab+0x251/0x380 mm/slub.c:2017
new_slab mm/slub.c:2070 [inline]
___slab_alloc+0x8be/0x1570 mm/slub.c:3223
__slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322
__slab_alloc_node mm/slub.c:3375 [inline]
slab_alloc_node mm/slub.c:3468 [inline]
__kmem_cache_alloc_node+0x137/0x350 mm/slub.c:3517
__do_kmalloc_node mm/slab_common.c:1022 [inline]
__kmalloc+0x4f/0x100 mm/slab_common.c:1036
kmalloc include/linux/slab.h:603 [inline]
kzalloc include/linux/slab.h:720 [inline]
fib6_info_alloc+0x40/0x160 net/ipv6/ip6_fib.c:155
ip6_route_info_create+0x337/0x1e70 net/ipv6/route.c:3749
ip6_route_add+0x26/0x150 net/ipv6/route.c:3843
addrconf_add_mroute+0x1e0/0x350 net/ipv6/addrconf.c:2498
addrconf_add_dev+0x150/0x1c0 net/ipv6/addrconf.c:2516
addrconf_dev_config net/ipv6/addrconf.c:3419 [inline]
addrconf_init_auto_addrs+0x380/0x810 net/ipv6/addrconf.c:3506
addrconf_notify+0x70f/0x1920 net/ipv6/addrconf.c:3679
page_owner free stack trace missing
Memory state around the buggy address:
ffff888075cc0300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888075cc0380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888075cc0400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888075cc0480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888075cc0500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 05 9a 3d 8f 04 add $0x48f3d9a,%eax
5: 85 c0 test %eax,%eax
7: 74 21 je 0x2a
9: 8b 05 f4 71 8f 04 mov 0x48f71f4(%rip),%eax # 0x48f7203
f: 85 c0 test %eax,%eax
11: 74 17 je 0x2a
13: 65 48 8b 04 25 c0 bc mov %gs:0x3bcc0,%rax
1a: 03 00
1c: 8b 80 c4 0a 00 00 mov 0xac4(%rax),%eax
22: 85 c0 test %eax,%eax
24: 0f 94 c0 sete %al
27: 0f b6 c0 movzbl %al,%eax
* 2a: c3 ret <-- trapping instruction
2b: 66 0f 1f 00 nopw (%rax)
2f: 55 push %rbp
30: 53 push %rbx
31: 65 8b 05 8f 9d c3 75 mov %gs:0x75c39d8f(%rip),%eax # 0x75c39dc7
38: 85 c0 test %eax,%eax
3a: 40 0f 95 c5 setne %bpl
3e: 65 gs
3f: 8b .byte 0x8b