==================================================================
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:162
Read of size 1 at addr ffff88803991f018 by task syz.4.1304/10974
CPU: 3 UID: 0 PID: 10974 Comm: syz.4.1304 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
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+0x156/0x4c9 mm/kasan/report.c:482
kasan_report+0xdf/0x1e0 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+0x148/0x380 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:162
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:3255
__handle_irq_event_percpu+0x232/0x8e0 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+0x375/0x970 kernel/irq/chip.c:855
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:lockdep_enabled kernel/locking/lockdep.c:124 [inline]
RIP: 0010:lock_release+0x75/0x320 kernel/locking/lockdep.c:5881
Code: f4 0e 45 85 c0 0f 84 48 01 00 00 65 8b 05 ab b2 28 12 85 c0 0f 85 39 01 00 00 65 4c 8b 25 2b 6b 28 12 41 8b bc 24 14 0b 00 00 <85> ff 0f 85 21 01 00 00 48 81 3b 40 07 14 94 0f 84 14 01 00 00 9c
RSP: 0018:ffffc900046c76c0 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffffff8e7e9320 RCX: ffffffff8281b31e
RDX: 0000000000000000 RSI: ffffffff8c1ae920 RDI: 0000000000000000
RBP: ffffffff8281ac55 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff888058eea480
R13: 0000000000000001 R14: 0000000000000001 R15: 800000003f7af007
rcu_lock_release include/linux/rcupdate.h:322 [inline]
rcu_read_unlock_sched include/linux/rcupdate.h:972 [inline]
pfn_valid include/linux/mmzone.h:2207 [inline]
page_table_check_clear+0x17a/0x9e0 mm/page_table_check.c:70
__page_table_check_pte_clear+0xf1/0x100 mm/page_table_check.c:155
page_table_check_pte_clear include/linux/page_table_check.h:55 [inline]
ptep_get_and_clear_full arch/x86/include/asm/pgtable.h:1271 [inline]
get_and_clear_full_ptes include/linux/pgtable.h:865 [inline]
zap_present_folio_ptes mm/memory.c:1630 [inline]
zap_present_ptes mm/memory.c:1712 [inline]
do_zap_pte_range mm/memory.c:1814 [inline]
zap_pte_range mm/memory.c:1916 [inline]
zap_pmd_range mm/memory.c:2008 [inline]
zap_pud_range mm/memory.c:2036 [inline]
zap_p4d_range mm/memory.c:2057 [inline]
unmap_page_range+0x2a10/0x4840 mm/memory.c:2078
unmap_single_vma+0x153/0x240 mm/memory.c:2120
unmap_vmas+0x218/0x470 mm/memory.c:2162
exit_mmap+0x18a/0xdd0 mm/mmap.c:1277
__mmput+0x12a/0x410 kernel/fork.c:1174
mmput+0x67/0x80 kernel/fork.c:1197
exit_mm kernel/exit.c:581 [inline]
do_exit+0x78a/0x2aa0 kernel/exit.c:959
do_group_exit+0xd5/0x2a0 kernel/exit.c:1112
__do_sys_exit_group kernel/exit.c:1123 [inline]
__se_sys_exit_group kernel/exit.c:1121 [inline]
__x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1121
x64_sys_call+0x102c/0x1530 arch/x86/include/generated/asm/syscalls_64.h:232
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x106/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f7ed9d9bf79
Code: Unable to access opcode bytes at 0x7f7ed9d9bf4f.
RSP: 002b:00007ffefa0d1808 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f7ed9d9bf79
RDX: 0000000000000064 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007ffefa0d186c R08: 0000000000000000 R09: 00000000000927c0
R10: 00007f7eda016128 R11: 0000000000000246 R12: 0000000000000108
R13: 00000000000927c0 R14: 000000000004fd4a R15: 00007ffefa0d18c0
Allocated by task 10983:
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:962 [inline]
p9_client_create+0xaf/0xd40 net/9p/client.c:862
v9fs_session_init+0x40/0xce0 fs/9p/v9fs.c:442
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:3760 [inline]
do_new_mount fs/namespace.c:3836 [inline]
path_mount+0x7d0/0x23d0 fs/namespace.c:4146
do_mount fs/namespace.c:4159 [inline]
__do_sys_mount fs/namespace.c:4348 [inline]
__se_sys_mount fs/namespace.c:4325 [inline]
__x64_sys_mount+0x293/0x310 fs/namespace.c:4325
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x106/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 10983:
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:2687 [inline]
slab_free mm/slub.c:6124 [inline]
kfree+0x1f6/0x6b0 mm/slub.c:6442
p9_client_create+0x72d/0xd40 net/9p/client.c:941
v9fs_session_init+0x40/0xce0 fs/9p/v9fs.c:442
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:3760 [inline]
do_new_mount fs/namespace.c:3836 [inline]
path_mount+0x7d0/0x23d0 fs/namespace.c:4146
do_mount fs/namespace.c:4159 [inline]
__do_sys_mount fs/namespace.c:4348 [inline]
__se_sys_mount fs/namespace.c:4325 [inline]
__x64_sys_mount+0x293/0x310 fs/namespace.c:4325
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x106/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88803991f000
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 24 bytes inside of
freed 512-byte region [ffff88803991f000, ffff88803991f200)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3991c
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 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88801b842c80 dead000000000100 dead000000000122
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea0000e64701 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 5950, tgid 5950 (syz-executor), ts 130211158357, free_ts 130144908689
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x153/0x170 mm/page_alloc.c:1888
prep_new_page mm/page_alloc.c:1896 [inline]
get_page_from_freelist+0x111d/0x3140 mm/page_alloc.c:3961
__alloc_frozen_pages_noprof+0x27c/0x2ba0 mm/page_alloc.c:5249
alloc_slab_page mm/slub.c:3255 [inline]
allocate_slab mm/slub.c:3444 [inline]
new_slab+0xa6/0x6d0 mm/slub.c:3502
refill_objects+0x26b/0x400 mm/slub.c:7134
refill_sheaf mm/slub.c:2804 [inline]
alloc_full_sheaf mm/slub.c:2825 [inline]
__pcs_replace_empty_main+0x19f/0x600 mm/slub.c:4588
alloc_from_pcs mm/slub.c:4681 [inline]
slab_alloc_node mm/slub.c:4815 [inline]
__do_kmalloc_node mm/slub.c:5218 [inline]
__kmalloc_noprof+0x688/0x850 mm/slub.c:5231
kmalloc_noprof include/linux/slab.h:966 [inline]
kzalloc_noprof include/linux/slab.h:1204 [inline]
fib6_info_alloc+0x40/0x160 net/ipv6/ip6_fib.c:155
ip6_route_info_create+0x14c/0xad0 net/ipv6/route.c:3819
ip6_route_add+0x4b/0x1d0 net/ipv6/route.c:3948
addrconf_add_mroute+0x1de/0x350 net/ipv6/addrconf.c:2552
addrconf_add_dev+0x14e/0x1a0 net/ipv6/addrconf.c:2570
inet6_addr_add+0xfc/0x9a0 net/ipv6/addrconf.c:3032
inet6_rtm_newaddr+0x1475/0x1bb0 net/ipv6/addrconf.c:5064
rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:6958
netlink_rcv_skb+0x159/0x420 net/netlink/af_netlink.c:2550
page last free pid 12 tgid 12 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1432 [inline]
__free_frozen_pages+0x7ca/0x10a0 mm/page_alloc.c:2977
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x47/0xe0 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:4501 [inline]
slab_alloc_node mm/slub.c:4830 [inline]
__do_kmalloc_node mm/slub.c:5218 [inline]
__kmalloc_noprof+0x2b9/0x850 mm/slub.c:5231
kmalloc_noprof include/linux/slab.h:966 [inline]
kzalloc_noprof include/linux/slab.h:1204 [inline]
fib6_info_alloc+0x40/0x160 net/ipv6/ip6_fib.c:155
ip6_route_info_create+0x14c/0xad0 net/ipv6/route.c:3819
ip6_route_add+0x4b/0x1d0 net/ipv6/route.c:3948
addrconf_add_mroute+0x1de/0x350 net/ipv6/addrconf.c:2552
addrconf_add_dev+0x14e/0x1a0 net/ipv6/addrconf.c:2570
addrconf_dev_config net/ipv6/addrconf.c:3484 [inline]
addrconf_init_auto_addrs+0x10e/0x780 net/ipv6/addrconf.c:3572
addrconf_notify+0x9aa/0x19c0 net/ipv6/addrconf.c:3745
notifier_call_chain+0x99/0x420 kernel/notifier.c:85
call_netdevice_notifiers_info+0xbe/0x110 net/core/dev.c:2242
netif_state_change+0x165/0x380 net/core/dev.c:1596
linkwatch_do_dev net/core/link_watch.c:186 [inline]
linkwatch_do_dev+0xdb/0x110 net/core/link_watch.c:166
Memory state around the buggy address:
ffff88803991ef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88803991ef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88803991f000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88803991f080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88803991f100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess), 2 bytes skipped:
0: 45 85 c0 test %r8d,%r8d
3: 0f 84 48 01 00 00 je 0x151
9: 65 8b 05 ab b2 28 12 mov %gs:0x1228b2ab(%rip),%eax # 0x1228b2bb
10: 85 c0 test %eax,%eax
12: 0f 85 39 01 00 00 jne 0x151
18: 65 4c 8b 25 2b 6b 28 mov %gs:0x12286b2b(%rip),%r12 # 0x12286b4b
1f: 12
20: 41 8b bc 24 14 0b 00 mov 0xb14(%r12),%edi
27: 00
* 28: 85 ff test %edi,%edi <-- trapping instruction
2a: 0f 85 21 01 00 00 jne 0x151
30: 48 81 3b 40 07 14 94 cmpq $0xffffffff94140740,(%rbx)
37: 0f 84 14 01 00 00 je 0x151
3d: 9c pushf