==================================================================
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 ffff88802d809418 by task swapper/3/0
CPU: 3 UID: 0 PID: 0 Comm: swapper/3 Not tainted syzkaller #0 PREEMPT(full)
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+0x60/0xe0 arch/x86/kernel/irq.c:319
asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:688
RIP: 0010:lock_acquire+0x5e/0x330 kernel/locking/lockdep.c:5872
Code: 05 bb 1c 01 12 83 f8 07 0f 87 a4 02 00 00 48 0f a3 05 46 14 d4 0e 0f 82 6f 02 00 00 8b 35 de 44 d4 0e 85 f6 0f 85 8a 00 00 00 <48> 8b 44 24 30 65 48 2b 05 5d 1c 01 12 0f 85 b8 02 00 00 48 83 c4
RSP: 0018:ffffc900006f8978 EFLAGS: 00000206
RAX: 0000000000000046 RBX: 0000000000000000 RCX: 0000000000000001
RDX: 0000000000000000 RSI: ffffffff8dc1f455 RDI: ffffffff8bfa35a0
RBP: ffffffff8e5e3360 R08: 00000000cabd98c0 R09: 0000000000000007
R10: 0000000000000200 R11: 0000000000000000 R12: 0000000000000002
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
rcu_lock_acquire include/linux/rcupdate.h:331 [inline]
rcu_read_lock include/linux/rcupdate.h:867 [inline]
class_rcu_constructor include/linux/rcupdate.h:1195 [inline]
unwind_next_frame+0xd1/0x1ea0 arch/x86/kernel/unwind_orc.c:495
arch_stack_walk+0x94/0xf0 arch/x86/kernel/stacktrace.c:25
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:2540 [inline]
slab_free_after_rcu_debug+0xe5/0x1c0 mm/slub.c:6733
rcu_do_batch kernel/rcu/tree.c:2605 [inline]
rcu_core+0x7c0/0x15c0 kernel/rcu/tree.c:2857
handle_softirqs+0x1ea/0x910 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xef/0x150 kernel/softirq.c:723
irq_exit_rcu+0x9/0x30 kernel/softirq.c:739
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline]
sysvec_apic_timer_interrupt+0xa3/0xc0 arch/x86/kernel/apic/apic.c:1056
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:pv_native_safe_halt+0xf/0x20 arch/x86/kernel/paravirt.c:82
Code: 76 78 02 c3 cc cc cc cc 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa eb 07 0f 00 2d 83 cc 14 00 fb f4 fc 31 03 00 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90
RSP: 0018:ffffc90000197df0 EFLAGS: 00000202
RAX: 00000000000458cb RBX: ffff88801e2f8000 RCX: ffffffff8b76b4b5
RDX: 0000000000000000 RSI: ffffffff8dc45440 RDI: ffffffff8bfa35a0
RBP: 0000000000000003 R08: 0000000000000001 R09: ffffed100d4e673d
R10: ffff88806a7339eb R11: 0000000000000000 R12: ffffed1003c5f000
R13: 0000000000000003 R14: ffffffff90b737d0 R15: 0000000000000000
arch_safe_halt arch/x86/include/asm/paravirt.h:107 [inline]
default_idle+0x9/0x10 arch/x86/kernel/process.c:767
default_idle_call+0x6c/0xb0 kernel/sched/idle.c:122
cpuidle_idle_call kernel/sched/idle.c:191 [inline]
do_idle+0x35b/0x4b0 kernel/sched/idle.c:332
cpu_startup_entry+0x4f/0x60 kernel/sched/idle.c:430
start_secondary+0x21d/0x2d0 arch/x86/kernel/smpboot.c:312
common_startup_64+0x13e/0x148
Allocated by task 6121:
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 6121:
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 ffff88802d809400
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 24 bytes inside of
freed 512-byte region [ffff88802d809400, ffff88802d809600)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2d808
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 0000000000000001
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88801b842c80 0000000000000000 0000000000000001
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea0000b60201 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 5933, tgid 5933 (syz-executor), ts 64884911799, free_ts 64872911462
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
addrconf_f6i_alloc+0x2d9/0x670 net/ipv6/route.c:4689
fixup_permanent_addr net/ipv6/addrconf.c:3583 [inline]
addrconf_permanent_addr net/ipv6/addrconf.c:3622 [inline]
addrconf_notify+0x10cd/0x19c0 net/ipv6/addrconf.c:3694
notifier_call_chain+0x99/0x3b0 kernel/notifier.c:85
call_netdevice_notifiers_info+0xbe/0x110 net/core/dev.c:2243
call_netdevice_notifiers_extack net/core/dev.c:2281 [inline]
call_netdevice_notifiers net/core/dev.c:2295 [inline]
__dev_notify_flags+0x12c/0x2e0 net/core/dev.c:9788
netif_change_flags+0x108/0x160 net/core/dev.c:9817
page last free pid 6023 tgid 6023 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
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:4953 [inline]
slab_alloc_node mm/slub.c:5263 [inline]
kmem_cache_alloc_lru_noprof+0x2c7/0x7d0 mm/slub.c:5282
__d_alloc+0x34/0xa80 fs/dcache.c:1730
d_alloc+0x4a/0x1e0 fs/dcache.c:1809
lookup_one_qstr_excl+0x175/0x250 fs/namei.c:1751
__start_dirop fs/namei.c:2875 [inline]
start_dirop fs/namei.c:2884 [inline]
filename_create+0x1cf/0x400 fs/namei.c:4888
do_symlinkat+0xda/0x510 fs/namei.c:5543
__do_sys_symlinkat fs/namei.c:5571 [inline]
__se_sys_symlinkat fs/namei.c:5568 [inline]
__x64_sys_symlinkat+0x199/0x240 fs/namei.c:5568
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:
ffff88802d809300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88802d809380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88802d809400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88802d809480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88802d809500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 05 bb 1c 01 12 add $0x12011cbb,%eax
5: 83 f8 07 cmp $0x7,%eax
8: 0f 87 a4 02 00 00 ja 0x2b2
e: 48 0f a3 05 46 14 d4 bt %rax,0xed41446(%rip) # 0xed4145c
15: 0e
16: 0f 82 6f 02 00 00 jb 0x28b
1c: 8b 35 de 44 d4 0e mov 0xed444de(%rip),%esi # 0xed44500
22: 85 f6 test %esi,%esi
24: 0f 85 8a 00 00 00 jne 0xb4
* 2a: 48 8b 44 24 30 mov 0x30(%rsp),%rax <-- trapping instruction
2f: 65 48 2b 05 5d 1c 01 sub %gs:0x12011c5d(%rip),%rax # 0x12011c94
36: 12
37: 0f 85 b8 02 00 00 jne 0x2f5
3d: 48 rex.W
3e: 83 .byte 0x83
3f: c4 .byte 0xc4