==================================================================
BUG: KASAN: slab-use-after-free in __lock_acquire+0x2da1/0x3b40 kernel/locking/lockdep.c:5005
Read of size 8 at addr ffff88802f622818 by task syz-executor.1/7286
CPU: 3 PID: 7286 Comm: syz-executor.1 Not tainted 6.8.0-rc2-syzkaller-00055-g6764c317b6bb #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:377 [inline]
print_report+0xc4/0x620 mm/kasan/report.c:488
kasan_report+0xda/0x110 mm/kasan/report.c:601
__lock_acquire+0x2da1/0x3b40 kernel/locking/lockdep.c:5005
lock_acquire kernel/locking/lockdep.c:5754 [inline]
lock_acquire+0x1ae/0x520 kernel/locking/lockdep.c:5719
__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:394 [inline]
p9_req_put net/9p/client.c:402 [inline]
p9_req_put+0xca/0x250 net/9p/client.c:399
req_done+0x1e7/0x2f0 net/9p/trans_virtio.c:147
vring_interrupt drivers/virtio/virtio_ring.c:2595 [inline]
vring_interrupt+0x31b/0x400 drivers/virtio/virtio_ring.c:2570
__handle_irq_event_percpu+0x22a/0x750 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+0x263/0xd10 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+0xde/0x250 arch/x86/kernel/irq.c:257
common_interrupt+0xab/0xd0 arch/x86/kernel/irq.c:247
asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:640
RIP: 0010:__sanitizer_cov_trace_const_cmp8+0x0/0x20 kernel/kcov.c:310
Code: 0c 24 89 f2 89 fe bf 05 00 00 00 e9 2a fe ff ff 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1e fa 48 8b 0c 24 48 89 f2 48 89 fe bf 07 00 00 00 e9 f8 fd
RSP: 0018:ffffc90003d97768 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffea0000752e80 RCX: ffffffff81bf6c04
RDX: ffff888035924800 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00000000000001af R08: 0000000000000004 R09: 00000000000001fe
R10: 00000000000001af R11: 0000000000000001 R12: ffff88802db8ad88
R13: 0000000000000000 R14: ffffea0000752e80 R15: dffffc0000000000
_compound_head include/linux/page-flags.h:249 [inline]
release_pages+0x16e/0x14f0 mm/swap.c:973
tlb_batch_pages_flush+0x9a/0x190 mm/mmu_gather.c:98
zap_pte_range mm/memory.c:1558 [inline]
zap_pmd_range mm/memory.c:1597 [inline]
zap_pud_range mm/memory.c:1626 [inline]
zap_p4d_range mm/memory.c:1647 [inline]
unmap_page_range+0x18d6/0x2af0 mm/memory.c:1668
unmap_single_vma+0x194/0x2b0 mm/memory.c:1714
unmap_vmas+0x22f/0x490 mm/memory.c:1758
exit_mmap+0x1c1/0xb50 mm/mmap.c:3279
__mmput+0x12a/0x4d0 kernel/fork.c:1343
mmput+0x62/0x70 kernel/fork.c:1365
exit_mm kernel/exit.c:569 [inline]
do_exit+0x9a5/0x2ad0 kernel/exit.c:858
do_group_exit+0xd4/0x2a0 kernel/exit.c:1020
__do_sys_exit_group kernel/exit.c:1031 [inline]
__se_sys_exit_group kernel/exit.c:1029 [inline]
__x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1029
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xd5/0x270 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x6f/0x77
RIP: 0033:0x7fbf2ec7dda9
Code: Unable to access opcode bytes at 0x7fbf2ec7dd7f.
RSP: 002b:00007ffffe5b7468 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 000000000000001e RCX: 00007fbf2ec7dda9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000001 R08: 0000000000000011 R09: 0000000000000000
R10: 0000001b31820000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000001
Allocated by task 7288:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:372 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:389
kmalloc include/linux/slab.h:590 [inline]
p9_client_create+0xcf/0x1220 net/9p/client.c:980
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:662
vfs_get_tree+0x8f/0x380 fs/super.c:1784
do_new_mount fs/namespace.c:3352 [inline]
path_mount+0x14ea/0x1f20 fs/namespace.c:3679
do_mount fs/namespace.c:3692 [inline]
__do_sys_mount fs/namespace.c:3898 [inline]
__se_sys_mount fs/namespace.c:3875 [inline]
__x64_sys_mount+0x297/0x320 fs/namespace.c:3875
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xd5/0x270 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x6f/0x77
Freed by task 7288:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3f/0x60 mm/kasan/generic.c:640
poison_slab_object mm/kasan/common.c:241 [inline]
__kasan_slab_free+0x121/0x1c0 mm/kasan/common.c:257
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2121 [inline]
slab_free mm/slub.c:4299 [inline]
kfree+0x124/0x370 mm/slub.c:4409
p9_client_create+0xa1f/0x1220 net/9p/client.c:1051
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:662
vfs_get_tree+0x8f/0x380 fs/super.c:1784
do_new_mount fs/namespace.c:3352 [inline]
path_mount+0x14ea/0x1f20 fs/namespace.c:3679
do_mount fs/namespace.c:3692 [inline]
__do_sys_mount fs/namespace.c:3898 [inline]
__se_sys_mount fs/namespace.c:3875 [inline]
__x64_sys_mount+0x297/0x320 fs/namespace.c:3875
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xd5/0x270 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x6f/0x77
The buggy address belongs to the object at ffff88802f622800
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 24 bytes inside of
freed 512-byte region [ffff88802f622800, ffff88802f622a00)
The buggy address belongs to the physical page:
page:ffffea0000bd8800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2f620
head:ffffea0000bd8800 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888014c42c80 ffffea00006e2c00 dead000000000002
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 546, tgid 546 (kworker/1:2), ts 177813323853, free_ts 177277814406
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x2d4/0x350 mm/page_alloc.c:1533
prep_new_page mm/page_alloc.c:1540 [inline]
get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3311
__alloc_pages+0x22f/0x2440 mm/page_alloc.c:4567
__alloc_pages_node include/linux/gfp.h:238 [inline]
alloc_pages_node include/linux/gfp.h:261 [inline]
alloc_slab_page mm/slub.c:2190 [inline]
allocate_slab mm/slub.c:2354 [inline]
new_slab+0xcc/0x3a0 mm/slub.c:2407
___slab_alloc+0x4af/0x19a0 mm/slub.c:3540
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3625
__slab_alloc_node mm/slub.c:3678 [inline]
slab_alloc_node mm/slub.c:3850 [inline]
__do_kmalloc_node mm/slub.c:3980 [inline]
__kmalloc+0x3b8/0x440 mm/slub.c:3994
kmalloc include/linux/slab.h:594 [inline]
kzalloc include/linux/slab.h:711 [inline]
fib6_info_alloc+0x40/0x100 net/ipv6/ip6_fib.c:155
ip6_route_info_create+0x337/0x1b70 net/ipv6/route.c:3749
ip6_route_add+0x26/0x150 net/ipv6/route.c:3843
addrconf_add_mroute+0x1de/0x350 net/ipv6/addrconf.c:2501
addrconf_add_dev+0x14e/0x1c0 net/ipv6/addrconf.c:2519
addrconf_dev_config net/ipv6/addrconf.c:3423 [inline]
addrconf_init_auto_addrs+0x380/0x820 net/ipv6/addrconf.c:3510
addrconf_notify+0x6e6/0x18f0 net/ipv6/addrconf.c:3683
notifier_call_chain+0xb9/0x3c0 kernel/notifier.c:93
call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:1966
page last free pid 5211 tgid 5211 stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1140 [inline]
free_unref_page_prepare+0x527/0xb10 mm/page_alloc.c:2346
free_unref_page+0x33/0x3c0 mm/page_alloc.c:2486
qlink_free mm/kasan/quarantine.c:160 [inline]
qlist_free_all+0x58/0x150 mm/kasan/quarantine.c:176
kasan_quarantine_reduce+0x192/0x1e0 mm/kasan/quarantine.c:283
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:324
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3813 [inline]
slab_alloc_node mm/slub.c:3860 [inline]
kmem_cache_alloc_node+0x177/0x350 mm/slub.c:3903
__alloc_skb+0x28b/0x330 net/core/skbuff.c:641
alloc_skb include/linux/skbuff.h:1296 [inline]
netlink_alloc_large_skb+0x4d/0xf0 net/netlink/af_netlink.c:1213
netlink_sendmsg+0x68c/0xd70 net/netlink/af_netlink.c:1883
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg net/socket.c:745 [inline]
__sys_sendto+0x47f/0x4e0 net/socket.c:2191
__do_sys_sendto net/socket.c:2203 [inline]
__se_sys_sendto net/socket.c:2199 [inline]
__x64_sys_sendto+0xe0/0x1c0 net/socket.c:2199
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xd5/0x270 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x6f/0x77
Memory state around the buggy address:
ffff88802f622700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88802f622780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88802f622800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88802f622880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88802f622900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 0c 24 or $0x24,%al
2: 89 f2 mov %esi,%edx
4: 89 fe mov %edi,%esi
6: bf 05 00 00 00 mov $0x5,%edi
b: e9 2a fe ff ff jmp 0xfffffe3a
10: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1)
17: 00 00 00
1a: 90 nop
1b: 90 nop
1c: 90 nop
1d: 90 nop
1e: 90 nop
1f: 90 nop
20: 90 nop
21: 90 nop
22: 90 nop
23: 90 nop
24: 90 nop
25: 90 nop
26: 90 nop
27: 90 nop
28: 90 nop
29: 90 nop
* 2a: f3 0f 1e fa endbr64 <-- trapping instruction
2e: 48 8b 0c 24 mov (%rsp),%rcx
32: 48 89 f2 mov %rsi,%rdx
35: 48 89 fe mov %rdi,%rsi
38: bf 07 00 00 00 mov $0x7,%edi
3d: e9 .byte 0xe9
3e: f8 clc
3f: fd std