==================================================================
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 ffff88802af4c818 by task dhcpcd-run-hook/15570
CPU: 0 UID: 0 PID: 15570 Comm: dhcpcd-run-hook 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+0xb9/0xe0 arch/x86/kernel/irq.c:273
asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:665
RIP: 0010:memcpy+0xe/0x30 arch/x86/lib/memcpy_64.S:39
Code: 1f 84 00 00 00 00 00 0f 1f 44 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 66 90 48 89 f8 48 89 d1 f3 a4 cd 1e 03 00 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90
RSP: 0018:ffffc90004f3f840 EFLAGS: 00000202
RAX: ffff88805892f4b0 RBX: ffff88805892f400 RCX: 0000000000000000
RDX: 0000000000000020 RSI: ffff888013b38fd0 RDI: ffff88805892f4d0
RBP: ffff888013b38f00 R08: 0000000000000001 R09: ffffed100b125e99
R10: ffff88805892f4cf R11: ffff88801d2e6780 R12: 0000000008100073
R13: 0000000000000001 R14: dffffc0000000000 R15: ffff888013b38f00
vm_area_init_from mm/vma_init.c:59 [inline]
vm_area_dup+0x2cf/0x8e0 mm/vma_init.c:130
dup_mmap+0x6f6/0x21b0 mm/mmap.c:1786
dup_mm kernel/fork.c:1538 [inline]
copy_mm kernel/fork.c:1590 [inline]
copy_process+0x4588/0x8030 kernel/fork.c:2288
kernel_clone+0x176/0x9d0 kernel/fork.c:2747
__do_sys_clone+0xd9/0x120 kernel/fork.c:2888
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x115/0x840 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ff629e90636
Code: 89 df e8 6d e8 f6 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 52 89 c5 85 c0 75 31 64 48 8b 04 25 10 00 00
RSP: 002b:00007fffb77df080 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 00007fffb77df088 RCX: 00007ff629e90636
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
RBP: 00005584abb6fe60 R08: 0000000000000000 R09: 3c00000040001201
R10: 00007ff629cf6f50 R11: 0000000000000246 R12: 00005584abb733a8
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Allocated by task 15571:
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:5515
_kmalloc_noprof include/linux/slab.h:969 [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:1694
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 15571:
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:2705 [inline]
slab_free mm/slub.c:6405 [inline]
kfree+0x22b/0x6c0 mm/slub.c:6720
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:1694
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 ffff88802af4c800
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 24 bytes inside of
freed 512-byte region [ffff88802af4c800, ffff88802af4ca00)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2af4c
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 ffff88801b842c80 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88801b842c80 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 2, migratetype Unmovable, gfp_mask 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 837, tgid 837 (kworker/u33:6), ts 57210489211, free_ts 55906552156
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1859
prep_new_page mm/page_alloc.c:1867 [inline]
get_page_from_freelist+0xf48/0x3530 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x299/0x2dc0 mm/page_alloc.c:5304
alloc_slab_page mm/slub.c:3294 [inline]
allocate_slab mm/slub.c:3408 [inline]
new_slab+0xa2/0x650 mm/slub.c:3454
refill_objects+0xe3/0x410 mm/slub.c:7338
refill_sheaf mm/slub.c:2832 [inline]
__pcs_replace_empty_main+0x376/0x680 mm/slub.c:4703
alloc_from_pcs mm/slub.c:4801 [inline]
slab_alloc_node mm/slub.c:4933 [inline]
__do_kmalloc_node mm/slub.c:5361 [inline]
__kmalloc_noprof+0x66d/0x820 mm/slub.c:5387
_kmalloc_noprof include/linux/slab.h:973 [inline]
_kzalloc_noprof include/linux/slab.h:1290 [inline]
fib6_info_alloc+0x40/0x160 net/ipv6/ip6_fib.c:155
ip6_route_info_create+0x14c/0xad0 net/ipv6/route.c:3833
ip6_route_add+0x4b/0x1d0 net/ipv6/route.c:3962
addrconf_prefix_route+0x2fb/0x510 net/ipv6/addrconf.c:2504
addrconf_add_linklocal+0x329/0x500 net/ipv6/addrconf.c:3336
addrconf_addr_gen+0x364/0x3b0 net/ipv6/addrconf.c:3470
addrconf_dev_config net/ipv6/addrconf.c:3517 [inline]
addrconf_init_auto_addrs+0x1cb/0x780 net/ipv6/addrconf.c:3595
addrconf_notify+0xa10/0x1ba0 net/ipv6/addrconf.c:3775
notifier_call_chain+0x99/0x3f0 kernel/notifier.c:85
page last free pid 5737 tgid 5737 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1406 [inline]
__free_frozen_pages+0x79f/0x1090 mm/page_alloc.c:2950
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x47/0xf0 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:4612 [inline]
slab_alloc_node mm/slub.c:4945 [inline]
kmem_cache_alloc_node_noprof+0x27d/0x6b0 mm/slub.c:5017
__alloc_skb+0x140/0x710 net/core/skbuff.c:704
alloc_skb include/linux/skbuff.h:1384 [inline]
nlmsg_new include/net/netlink.h:1055 [inline]
rtmsg_ifinfo_build_skb+0x81/0x260 net/core/rtnetlink.c:4524
rtmsg_ifinfo_event net/core/rtnetlink.c:4566 [inline]
rtmsg_ifinfo_event net/core/rtnetlink.c:4556 [inline]
rtnetlink_event+0x137/0x1f0 net/core/rtnetlink.c:7136
notifier_call_chain+0x99/0x3f0 kernel/notifier.c:85
call_netdevice_notifiers_info+0xbe/0x110 net/core/dev.c:2250
call_netdevice_notifiers_extack net/core/dev.c:2288 [inline]
call_netdevice_notifiers net/core/dev.c:2302 [inline]
netdev_features_change net/core/dev.c:1590 [inline]
netdev_change_features net/core/dev.c:11119 [inline]
netdev_compute_master_upper_features+0x7d4/0xa50 net/core/dev.c:12887
br_add_if+0x126a/0x1c80 net/bridge/br_if.c:686
do_set_master+0x40f/0x730 net/core/rtnetlink.c:3020
do_setlink.isra.0+0xb2b/0x3e60 net/core/rtnetlink.c:3222
rtnl_changelink net/core/rtnetlink.c:3849 [inline]
__rtnl_newlink net/core/rtnetlink.c:4022 [inline]
rtnl_newlink+0x11c2/0x2380 net/core/rtnetlink.c:4159
rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:7076
Memory state around the buggy address:
ffff88802af4c700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88802af4c780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88802af4c800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88802af4c880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88802af4c900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess), 1 bytes skipped:
0: 84 00 test %al,(%rax)
2: 00 00 add %al,(%rax)
4: 00 00 add %al,(%rax)
6: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
b: 90 nop
c: 90 nop
d: 90 nop
e: 90 nop
f: 90 nop
10: 90 nop
11: 90 nop
12: 90 nop
13: 90 nop
14: 90 nop
15: 90 nop
16: 90 nop
17: 90 nop
18: 90 nop
19: 90 nop
1a: 90 nop
1b: f3 0f 1e fa endbr64
1f: 66 90 xchg %ax,%ax
21: 48 89 f8 mov %rdi,%rax
24: 48 89 d1 mov %rdx,%rcx
27: f3 a4 rep movsb %ds:(%rsi),%es:(%rdi)
* 29: e9 cd 1e 03 00 jmp 0x31efb <-- trapping instruction
2e: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1)
35: 00 00 00 00
39: 66 90 xchg %ax,%ax
3b: 90 nop
3c: 90 nop
3d: 90 nop
3e: 90 nop