==================================================================
BUG: KASAN: slab-use-after-free in __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [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 ffff88803fc02418 by task syz-executor/32245
CPU: 3 UID: 0 PID: 32245 Comm: syz-executor 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/0x1a0 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+0xf5/0x330 kernel/locking/lockdep.c:5825
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [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+0x33b/0x430 drivers/virtio/virtio_ring.c:2718
__handle_irq_event_percpu+0x232/0x800 kernel/irq/handle.c:211
handle_irq_event_percpu kernel/irq/handle.c:248 [inline]
handle_irq_event+0xab/0x1e0 kernel/irq/handle.c:265
handle_edge_irq+0x375/0x970 kernel/irq/chip.c:855
generic_handle_irq_desc include/linux/irqdesc.h:172 [inline]
handle_irq arch/x86/kernel/irq.c:255 [inline]
call_irq_handler arch/x86/kernel/irq.c:311 [inline]
__common_interrupt+0xd8/0x2f0 arch/x86/kernel/irq.c:326
common_interrupt+0xb9/0xe0 arch/x86/kernel/irq.c:319
asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:688
RIP: 0010:___slab_alloc+0x687/0x1ca0 mm/slub.c:4735
Code: 85 c9 74 0c 41 80 7c 24 30 01 74 04 90 0f 0b 90 41 c6 44 24 30 00 80 e7 02 0f 85 66 02 00 00 9c 58 f6 c4 02 0f 85 83 0a 00 00 <48> 8b 45 c8 65 48 2b 05 05 f9 7e 11 0f 85 cb 12 00 00 48 8d 65 d0
RSP: 0018:ffffc900252df630 EFLAGS: 00000246
RAX: 0000000000000002 RBX: 0000000000000286 RCX: 0000000000000040
RDX: 0000000000000000 RSI: ffffffff8dc45440 RDI: ffffffff8bfa35a0
RBP: ffffc900252df6e0 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88806a7407d0
R13: 0000000000000003 R14: 0000000000000003 R15: ffff888012405340
__slab_alloc.isra.0+0x63/0x110 mm/slub.c:4779
__slab_alloc_node mm/slub.c:4855 [inline]
slab_alloc_node mm/slub.c:5251 [inline]
kmem_cache_alloc_noprof+0x4ec/0x780 mm/slub.c:5270
radix_tree_node_alloc.constprop.0+0x1d2/0x340 lib/radix-tree.c:253
radix_tree_extend+0x1a2/0x4d0 lib/radix-tree.c:425
idr_get_free+0x5ec/0xa00 lib/radix-tree.c:1493
idr_alloc_u32+0x1ac/0x320 lib/idr.c:48
idr_alloc_cyclic+0x10b/0x230 lib/idr.c:127
alloc_pid+0x560/0x13b0 kernel/pid.c:237
copy_process+0x4117/0x7890 kernel/fork.c:2237
kernel_clone+0xfc/0x930 kernel/fork.c:2651
__do_sys_clone+0xd9/0x120 kernel/fork.c:2792
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xc9/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f4444bc3752
Code: 89 e7 e8 f1 8b f7 ff 45 31 c0 31 d2 31 f6 64 48 8b 04 25 10 00 00 00 bf 11 00 20 01 4c 8d 90 d0 02 00 00 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 66 89 c5 85 c0 75 3b 64 48 8b 04 25 10 00 00
RSP: 002b:00007fff82aca520 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 00007fff82aca520 RCX: 00007f4444bc3752
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
RBP: 00007fff82aca6ac R08: 0000000000000000 R09: 0000000000000001
R10: 000055558ae827d0 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000000927c0 R14: 00000000000556f7 R15: 00007fff82aca700
Allocated by task 2226:
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:957 [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:1751
fc_mount fs/namespace.c:1199 [inline]
do_new_mount_fc fs/namespace.c:3636 [inline]
do_new_mount fs/namespace.c:3712 [inline]
path_mount+0x7d0/0x23c0 fs/namespace.c:4022
do_mount fs/namespace.c:4035 [inline]
__do_sys_mount fs/namespace.c:4224 [inline]
__se_sys_mount fs/namespace.c:4201 [inline]
__x64_sys_mount+0x293/0x310 fs/namespace.c:4201
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xc9/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 2226:
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:2540 [inline]
slab_free mm/slub.c:6674 [inline]
kfree+0x1c7/0x690 mm/slub.c:6882
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:1751
fc_mount fs/namespace.c:1199 [inline]
do_new_mount_fc fs/namespace.c:3636 [inline]
do_new_mount fs/namespace.c:3712 [inline]
path_mount+0x7d0/0x23c0 fs/namespace.c:4022
do_mount fs/namespace.c:4035 [inline]
__do_sys_mount fs/namespace.c:4224 [inline]
__se_sys_mount fs/namespace.c:4201 [inline]
__x64_sys_mount+0x293/0x310 fs/namespace.c:4201
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xc9/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88803fc02400
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 24 bytes inside of
freed 512-byte region [ffff88803fc02400, ffff88803fc02600)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3fc00
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88801b842c80 0000000000000000 dead000000000001
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88801b842c80 0000000000000000 dead000000000001
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea0000ff0001 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 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5938, tgid 5938 (syz-executor), ts 63881347815, free_ts 57721612636
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1e1/0x250 mm/page_alloc.c:1884
prep_new_page mm/page_alloc.c:1892 [inline]
get_page_from_freelist+0xe3d/0x2e10 mm/page_alloc.c:3945
__alloc_frozen_pages_noprof+0x26c/0x2410 mm/page_alloc.c:5240
alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2486
alloc_slab_page mm/slub.c:3075 [inline]
allocate_slab mm/slub.c:3248 [inline]
new_slab+0x2c4/0x440 mm/slub.c:3302
___slab_alloc+0xda3/0x1ca0 mm/slub.c:4656
__slab_alloc.isra.0+0x63/0x110 mm/slub.c:4779
__slab_alloc_node mm/slub.c:4855 [inline]
slab_alloc_node mm/slub.c:5251 [inline]
__do_kmalloc_node mm/slub.c:5656 [inline]
__kmalloc_noprof+0x618/0x9c0 mm/slub.c:5669
kmalloc_noprof include/linux/slab.h:961 [inline]
kzalloc_noprof include/linux/slab.h:1094 [inline]
fib6_info_alloc+0x40/0x160 net/ipv6/ip6_fib.c:155
ip6_route_info_create+0x14c/0xad0 net/ipv6/route.c:3820
ip6_route_add+0x4b/0x1d0 net/ipv6/route.c:3949
addrconf_prefix_route+0x2fb/0x510 net/ipv6/addrconf.c:2488
addrconf_add_linklocal+0x329/0x500 net/ipv6/addrconf.c:3313
addrconf_addr_gen+0x364/0x3b0 net/ipv6/addrconf.c:3442
addrconf_dev_config net/ipv6/addrconf.c:3489 [inline]
addrconf_init_auto_addrs+0x1cb/0x780 net/ipv6/addrconf.c:3567
addrconf_notify+0x10a6/0x19c0 net/ipv6/addrconf.c:3740
page last free pid 5922 tgid 5922 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1433 [inline]
__free_frozen_pages+0x822/0x1130 mm/page_alloc.c:2973
vfree.part.0+0x12b/0x9d0 mm/vmalloc.c:3466
vfree+0x55/0x80 mm/vmalloc.c:3443
kcov_put kernel/kcov.c:439 [inline]
kcov_put kernel/kcov.c:435 [inline]
kcov_close+0x34/0x60 kernel/kcov.c:535
__fput+0x3ff/0xb40 fs/file_table.c:468
fput_close_sync+0x118/0x250 fs/file_table.c:573
__do_sys_close fs/open.c:1573 [inline]
__se_sys_close fs/open.c:1558 [inline]
__x64_sys_close+0x8b/0x120 fs/open.c:1558
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xc9/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88803fc02300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88803fc02380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88803fc02400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88803fc02480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88803fc02500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 85 c9 test %ecx,%ecx
2: 74 0c je 0x10
4: 41 80 7c 24 30 01 cmpb $0x1,0x30(%r12)
a: 74 04 je 0x10
c: 90 nop
d: 0f 0b ud2
f: 90 nop
10: 41 c6 44 24 30 00 movb $0x0,0x30(%r12)
16: 80 e7 02 and $0x2,%bh
19: 0f 85 66 02 00 00 jne 0x285
1f: 9c pushf
20: 58 pop %rax
21: f6 c4 02 test $0x2,%ah
24: 0f 85 83 0a 00 00 jne 0xaad
* 2a: 48 8b 45 c8 mov -0x38(%rbp),%rax <-- trapping instruction
2e: 65 48 2b 05 05 f9 7e sub %gs:0x117ef905(%rip),%rax # 0x117ef93b
35: 11
36: 0f 85 cb 12 00 00 jne 0x1307
3c: 48 8d 65 d0 lea -0x30(%rbp),%rsp