==================================================================
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 ffff88806054a018 by task syz.3.4/6028
CPU: 0 UID: 0 PID: 6028 Comm: syz.3.4 Not tainted 6.16.0-rc3-syzkaller-00057-g92ca6c498a5e #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:408 [inline]
print_report+0xcd/0x680 mm/kasan/report.c:521
kasan_report+0xe0/0x110 mm/kasan/report.c:634
__kasan_check_byte+0x36/0x50 mm/kasan/common.c:557
kasan_check_byte include/linux/kasan.h:399 [inline]
lock_acquire kernel/locking/lockdep.c:5845 [inline]
lock_acquire+0xfc/0x350 kernel/locking/lockdep.c:5828
__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:397 [inline]
p9_req_put net/9p/client.c:405 [inline]
p9_req_put+0xaf/0x250 net/9p/client.c:402
req_done+0x1dc/0x2e0 net/9p/trans_virtio.c:147
vring_interrupt drivers/virtio/virtio_ring.c:2715 [inline]
vring_interrupt+0x31e/0x400 drivers/virtio/virtio_ring.c:2690
__handle_irq_event_percpu+0x229/0x7d0 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+0x28e/0xab0 kernel/irq/chip.c:797
generic_handle_irq_desc include/linux/irqdesc.h:173 [inline]
handle_irq arch/x86/kernel/irq.c:254 [inline]
call_irq_handler arch/x86/kernel/irq.c:266 [inline]
__common_interrupt+0xdf/0x250 arch/x86/kernel/irq.c:292
common_interrupt+0xba/0xe0 arch/x86/kernel/irq.c:285
asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693
RIP: 0010:lock_is_held_type+0x107/0x150 kernel/locking/lockdep.c:5948
Code: 00 00 b8 ff ff ff ff 65 0f c1 05 dc a0 4f 08 83 f8 01 75 2d 9c 58 f6 c4 02 75 43 48 f7 04 24 00 02 00 00 74 01 fb 48 83 c4 08 <44> 89 e8 5b 5d 41 5c 41 5d 41 5e 41 5f e9 87 f1 02 00 45 31 ed eb
RSP: 0018:ffffc90003c1f610 EFLAGS: 00000292
RAX: 0000000000000046 RBX: 1ffff92000783ecb RCX: 0000000000000001
RDX: 0000000000000000 RSI: ffffffff8ddee3f8 RDI: ffffffff8c1565a0
RBP: ffffffff8e5c4700 R08: ffffffff8a228dc0 R09: 0000000000000000
R10: ffffc90003c1f830 R11: 0000000000000001 R12: ffff8880231ea440
R13: 0000000000000000 R14: 00000000ffffffff R15: 0000000000000000
lock_is_held include/linux/lockdep.h:249 [inline]
__might_resched+0x4ca/0x5e0 kernel/sched/core.c:8762
__mutex_lock_common kernel/locking/mutex.c:579 [inline]
__mutex_lock+0x106/0xb90 kernel/locking/mutex.c:747
__unix_dgram_recvmsg+0x250/0xc50 net/unix/af_unix.c:2500
unix_dgram_recvmsg+0xd0/0x110 net/unix/af_unix.c:2605
sock_recvmsg_nosec net/socket.c:1017 [inline]
____sys_recvmsg+0x5f9/0x6b0 net/socket.c:2784
___sys_recvmsg+0x114/0x1a0 net/socket.c:2828
do_recvmmsg+0x55d/0x750 net/socket.c:2915
__sys_recvmmsg+0x21c/0x280 net/socket.c:2997
__do_compat_sys_recvmmsg_time32 net/compat.c:418 [inline]
__se_compat_sys_recvmmsg_time32 net/compat.c:414 [inline]
__ia32_compat_sys_recvmmsg_time32+0xc4/0x160 net/compat.c:414
do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
__do_fast_syscall_32+0x7c/0x3a0 arch/x86/entry/syscall_32.c:306
do_fast_syscall_32+0x32/0x80 arch/x86/entry/syscall_32.c:331
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
RIP: 0023:0xf708e579
Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00
RSP: 002b:00000000f505d55c EFLAGS: 00000296 ORIG_RAX: 0000000000000151
RAX: ffffffffffffffda RBX: 0000000000000007 RCX: 00000000800000c0
RDX: 0000000000010106 RSI: 0000000000000002 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Allocated by task 6030:
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:377 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394
kmalloc_noprof include/linux/slab.h:905 [inline]
p9_client_create+0xc7/0x11c0 net/9p/client.c:985
v9fs_session_init+0x1f7/0x1a80 fs/9p/v9fs.c:410
v9fs_mount+0xc5/0xa30 fs/9p/vfs_super.c:122
legacy_get_tree+0x10c/0x220 fs/fs_context.c:666
vfs_get_tree+0x8e/0x340 fs/super.c:1804
do_new_mount fs/namespace.c:3885 [inline]
path_mount+0x1414/0x2020 fs/namespace.c:4209
do_mount fs/namespace.c:4222 [inline]
__do_sys_mount fs/namespace.c:4433 [inline]
__se_sys_mount fs/namespace.c:4410 [inline]
__ia32_sys_mount+0x28b/0x310 fs/namespace.c:4410
do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
__do_fast_syscall_32+0x7c/0x3a0 arch/x86/entry/syscall_32.c:306
do_fast_syscall_32+0x32/0x80 arch/x86/entry/syscall_32.c:331
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
Freed by task 6030:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:576
poison_slab_object mm/kasan/common.c:247 [inline]
__kasan_slab_free+0x51/0x70 mm/kasan/common.c:264
kasan_slab_free include/linux/kasan.h:233 [inline]
slab_free_hook mm/slub.c:2381 [inline]
slab_free mm/slub.c:4643 [inline]
kfree+0x2b4/0x4d0 mm/slub.c:4842
p9_client_create+0xa28/0x11c0 net/9p/client.c:1064
v9fs_session_init+0x1f7/0x1a80 fs/9p/v9fs.c:410
v9fs_mount+0xc5/0xa30 fs/9p/vfs_super.c:122
legacy_get_tree+0x10c/0x220 fs/fs_context.c:666
vfs_get_tree+0x8e/0x340 fs/super.c:1804
do_new_mount fs/namespace.c:3885 [inline]
path_mount+0x1414/0x2020 fs/namespace.c:4209
do_mount fs/namespace.c:4222 [inline]
__do_sys_mount fs/namespace.c:4433 [inline]
__se_sys_mount fs/namespace.c:4410 [inline]
__ia32_sys_mount+0x28b/0x310 fs/namespace.c:4410
do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
__do_fast_syscall_32+0x7c/0x3a0 arch/x86/entry/syscall_32.c:306
do_fast_syscall_32+0x32/0x80 arch/x86/entry/syscall_32.c:331
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
The buggy address belongs to the object at ffff88806054a000
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 24 bytes inside of
freed 512-byte region [ffff88806054a000, ffff88806054a200)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x60548
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x4fff00000000040(head|node=1|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 04fff00000000040 ffff88801b842c80 ffffea0001805d00 0000000000000002
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 04fff00000000040 ffff88801b842c80 ffffea0001805d00 0000000000000002
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 04fff00000000002 ffffea0001815201 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 5955, tgid 5955 (syz-executor), ts 48329688140, free_ts 47066916671
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704
prep_new_page mm/page_alloc.c:1712 [inline]
get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669
__alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4959
alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2419
alloc_slab_page mm/slub.c:2451 [inline]
allocate_slab mm/slub.c:2619 [inline]
new_slab+0x23b/0x330 mm/slub.c:2673
___slab_alloc+0xd9c/0x1940 mm/slub.c:3859
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3949
__slab_alloc_node mm/slub.c:4024 [inline]
slab_alloc_node mm/slub.c:4185 [inline]
__do_kmalloc_node mm/slub.c:4327 [inline]
__kmalloc_noprof+0x2f2/0x510 mm/slub.c:4340
kmalloc_noprof include/linux/slab.h:909 [inline]
kzalloc_noprof include/linux/slab.h:1039 [inline]
fib6_info_alloc+0x40/0x160 net/ipv6/ip6_fib.c:155
ip6_route_info_create+0x14c/0x870 net/ipv6/route.c:3811
addrconf_f6i_alloc+0x2da/0x660 net/ipv6/route.c:4679
ipv6_add_addr+0x531/0x1fe0 net/ipv6/addrconf.c:1121
addrconf_add_linklocal+0x2a5/0x500 net/ipv6/addrconf.c:3310
addrconf_addr_gen+0x36d/0x3c0 net/ipv6/addrconf.c:3441
addrconf_dev_config net/ipv6/addrconf.c:3487 [inline]
addrconf_init_auto_addrs+0x4b9/0x8f0 net/ipv6/addrconf.c:3571
addrconf_notify+0xe93/0x19e0 net/ipv6/addrconf.c:3744
page last free pid 5951 tgid 5951 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1248 [inline]
__free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2706
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4d/0x120 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329
kasan_slab_alloc include/linux/kasan.h:250 [inline]
slab_post_alloc_hook mm/slub.c:4148 [inline]
slab_alloc_node mm/slub.c:4197 [inline]
__kmalloc_cache_noprof+0x1f1/0x3e0 mm/slub.c:4354
kmalloc_noprof include/linux/slab.h:905 [inline]
kzalloc_noprof include/linux/slab.h:1039 [inline]
ref_tracker_alloc+0x18e/0x5b0 lib/ref_tracker.c:203
__netdev_tracker_alloc include/linux/netdevice.h:4341 [inline]
netdev_hold include/linux/netdevice.h:4370 [inline]
netdev_hold include/linux/netdevice.h:4365 [inline]
netdev_queue_add_kobject net/core/net-sysfs.c:1973 [inline]
netdev_queue_update_kobjects+0x2db/0x720 net/core/net-sysfs.c:2035
register_queue_kobjects net/core/net-sysfs.c:2098 [inline]
netdev_register_kobject+0x28c/0x3a0 net/core/net-sysfs.c:2340
register_netdevice+0x13dc/0x2270 net/core/dev.c:11105
veth_newlink+0x446/0xa00 drivers/net/veth.c:1884
rtnl_newlink_create net/core/rtnetlink.c:3823 [inline]
__rtnl_newlink net/core/rtnetlink.c:3940 [inline]
rtnl_newlink+0xc42/0x2000 net/core/rtnetlink.c:4055
rtnetlink_rcv_msg+0x95b/0xe90 net/core/rtnetlink.c:6944
netlink_rcv_skb+0x158/0x420 net/netlink/af_netlink.c:2534
netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline]
netlink_unicast+0x53a/0x7f0 net/netlink/af_netlink.c:1339
netlink_sendmsg+0x8d1/0xdd0 net/netlink/af_netlink.c:1883
sock_sendmsg_nosec net/socket.c:712 [inline]
__sock_sendmsg net/socket.c:727 [inline]
__sys_sendto+0x4a0/0x520 net/socket.c:2180
Memory state around the buggy address:
ffff888060549f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888060549f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88806054a000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88806054a080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88806054a100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 00 00 add %al,(%rax)
2: b8 ff ff ff ff mov $0xffffffff,%eax
7: 65 0f c1 05 dc a0 4f xadd %eax,%gs:0x84fa0dc(%rip) # 0x84fa0eb
e: 08
f: 83 f8 01 cmp $0x1,%eax
12: 75 2d jne 0x41
14: 9c pushf
15: 58 pop %rax
16: f6 c4 02 test $0x2,%ah
19: 75 43 jne 0x5e
1b: 48 f7 04 24 00 02 00 testq $0x200,(%rsp)
22: 00
23: 74 01 je 0x26
25: fb sti
26: 48 83 c4 08 add $0x8,%rsp
* 2a: 44 89 e8 mov %r13d,%eax <-- trapping instruction
2d: 5b pop %rbx
2e: 5d pop %rbp
2f: 41 5c pop %r12
31: 41 5d pop %r13
33: 41 5e pop %r14
35: 41 5f pop %r15
37: e9 87 f1 02 00 jmp 0x2f1c3
3c: 45 31 ed xor %r13d,%r13d
3f: eb .byte 0xeb