==================================================================
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 ffff88801bc88418 by task syz.0.1117/10578
CPU: 0 UID: 0 PID: 10578 Comm: syz.0.1117 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+0x13d/0x4b0 mm/kasan/report.c:482
kasan_report+0xdf/0x1c0 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+0x132/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/0x660 drivers/virtio/virtio_ring.c:3297
__handle_irq_event_percpu+0x232/0x880 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+0x34c/0x950 kernel/irq/chip.c:859
generic_handle_irq_desc include/linux/irqdesc.h:188 [inline]
handle_irq arch/x86/kernel/irq.c:209 [inline]
call_irq_handler arch/x86/kernel/irq.c:265 [inline]
__common_interrupt+0xd8/0x2f0 arch/x86/kernel/irq.c:280
common_interrupt+0x60/0xe0 arch/x86/kernel/irq.c:273
asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:665
RIP: 0010:handle_softirqs+0x1ad/0x9b0 kernel/softirq.c:608
Code: 20 44 88 74 24 1e 45 89 ee 48 c7 c7 c0 7a cd 8b e8 58 47 f1 09 31 d2 65 66 89 15 b6 eb 9a 12 e8 e9 79 49 00 fb bb ff ff ff ff <49> c7 c4 c0 a0 80 8e 41 0f bc de 83 c3 01 0f 85 a4 00 00 00 e9 1b
RSP: 0018:ffffc90000007f28 EFLAGS: 00000212
RAX: 0000000000001f20 RBX: 00000000ffffffff RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8e1a6b0d RDI: ffffffff8c3fe580
RBP: 000000010000251a R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 000000000000000a
R13: 0000000000000100 R14: 0000000000000100 R15: 1ffff92000000fec
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0x162/0x210 kernel/softirq.c:735
irq_exit_rcu+0x9/0x30 kernel/softirq.c:752
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
sysvec_apic_timer_interrupt+0xa3/0xc0 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:179 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x31/0x80 kernel/locking/spinlock.c:198
Code: f5 53 48 8b 74 24 10 48 89 fb 48 83 c7 18 e8 96 b9 28 f6 48 89 df e8 1e 09 29 f6 f7 c5 00 02 00 00 75 23 9c 58 f6 c4 02 75 37 01 00 00 00 e8 95 16 18 f6 65 8b 05 ee c6 a6 08 85 c0 74 16 5b
RSP: 0018:ffffc90004c1fac0 EFLAGS: 00000246
RAX: 0000000000000006 RBX: ffff888060710a78 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8e1a6b0d RDI: ffffffff8c3fe580
RBP: 0000000000000202 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffffffff94654600
R13: ffff888096de7000 R14: ffff888060710a78 R15: ffff888060710000
class_raw_spinlock_irqsave_destructor include/linux/spinlock.h:571 [inline]
try_to_wake_up+0xd8d/0x1c90 kernel/sched/core.c:4292
wake_up_process kernel/sched/core.c:4547 [inline]
wake_up_q+0xa1/0x130 kernel/sched/core.c:1173
futex_wake+0x4f4/0x5e0 kernel/futex/waitwake.c:225
do_futex+0x2b2/0x440 kernel/futex/syscalls.c:138
__do_sys_futex_time32 kernel/futex/syscalls.c:524 [inline]
__se_sys_futex_time32 kernel/futex/syscalls.c:507 [inline]
__ia32_sys_futex_time32+0x2f4/0x470 kernel/futex/syscalls.c:507
do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
__do_fast_syscall_32+0xe7/0x970 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
RIP: 0023:0xf6ffefec
Code: Unable to access opcode bytes at 0xf6ffefc2.
RSP: 002b:00000000ffdd60bc EFLAGS: 00000246 ORIG_RAX: 00000000000000f0
RAX: ffffffffffffffda RBX: 00000000f73f4f88 RCX: 0000000000000081
RDX: 00000000000f4240 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Allocated by task 10579:
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
kasan_kmalloc include/linux/kasan.h:263 [inline]
__kmalloc_cache_noprof+0x2e5/0x6c0 mm/slub.c:5489
_kmalloc_noprof include/linux/slab.h:988 [inline]
p9_client_create+0xaf/0xd40 net/9p/client.c:864
v9fs_session_init+0x3c/0xdd0 fs/9p/v9fs.c:471
v9fs_get_tree+0xb8/0xb50 fs/9p/vfs_super.c:97
vfs_get_tree+0x92/0x320 fs/super.c:1700
fc_mount fs/namespace.c:1198 [inline]
do_new_mount_fc fs/namespace.c:3765 [inline]
do_new_mount fs/namespace.c:3841 [inline]
path_mount+0x7d0/0x23d0 fs/namespace.c:4161
do_mount fs/namespace.c:4174 [inline]
__do_sys_mount fs/namespace.c:4390 [inline]
__se_sys_mount fs/namespace.c:4367 [inline]
__ia32_sys_mount+0x292/0x310 fs/namespace.c:4367
do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
__do_fast_syscall_32+0xe7/0x970 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 10579:
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:2677 [inline]
slab_free mm/slub.c:6377 [inline]
kfree+0x22b/0x6c0 mm/slub.c:6692
p9_client_create+0x72d/0xd40 net/9p/client.c:943
v9fs_session_init+0x3c/0xdd0 fs/9p/v9fs.c:471
v9fs_get_tree+0xb8/0xb50 fs/9p/vfs_super.c:97
vfs_get_tree+0x92/0x320 fs/super.c:1700
fc_mount fs/namespace.c:1198 [inline]
do_new_mount_fc fs/namespace.c:3765 [inline]
do_new_mount fs/namespace.c:3841 [inline]
path_mount+0x7d0/0x23d0 fs/namespace.c:4161
do_mount fs/namespace.c:4174 [inline]
__do_sys_mount fs/namespace.c:4390 [inline]
__se_sys_mount fs/namespace.c:4367 [inline]
__ia32_sys_mount+0x292/0x310 fs/namespace.c:4367
do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
__do_fast_syscall_32+0xe7/0x970 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 ffff88801bc88400
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 24 bytes inside of
freed 512-byte region [ffff88801bc88400, ffff88801bc88600)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1bc88
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 ffff88801bc42c80 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88801bc42c80 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 0, migratetype Unmovable, gfp_mask 0x0(), pid 0, tgid 0 (swapper), ts 994946172, free_ts 0
create_dummy_stack mm/page_owner.c:103 [inline]
register_early_stack+0x74/0xaf mm/page_owner.c:119
init_page_owner+0x4c/0xa10 mm/page_owner.c:129
invoke_init_callbacks mm/page_ext.c:152 [inline]
page_ext_init+0x71d/0x780 mm/page_ext.c:490
mm_core_init+0x229/0x270 mm/mm_init.c:2748
page_owner free stack trace missing
Memory state around the buggy address:
ffff88801bc88300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88801bc88380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88801bc88400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88801bc88480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88801bc88500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 20 44 88 74 and %al,0x74(%rax,%rcx,4)
4: 24 1e and $0x1e,%al
6: 45 89 ee mov %r13d,%r14d
9: 48 c7 c7 c0 7a cd 8b mov $0xffffffff8bcd7ac0,%rdi
10: e8 58 47 f1 09 call 0x9f1476d
15: 31 d2 xor %edx,%edx
17: 65 66 89 15 b6 eb 9a mov %dx,%gs:0x129aebb6(%rip) # 0x129aebd5
1e: 12
1f: e8 e9 79 49 00 call 0x497a0d
24: fb sti
25: bb ff ff ff ff mov $0xffffffff,%ebx
* 2a: 49 c7 c4 c0 a0 80 8e mov $0xffffffff8e80a0c0,%r12 <-- trapping instruction
31: 41 0f bc de bsf %r14d,%ebx
35: 83 c3 01 add $0x1,%ebx
38: 0f 85 a4 00 00 00 jne 0xe2
3e: e9 .byte 0xe9
3f: 1b .byte 0x1b