==================================================================
BUG: KASAN: use-after-free in smc_fback_error_report+0x96/0xa0 net/smc/af_smc.c:782
Read of size 8 at addr ffff888025efb1e8 by task udevd/11337
CPU: 1 PID: 11337 Comm: udevd Not tainted 5.18.0-rc4-syzkaller-00036-gcf424ef014ac #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
print_address_description.constprop.0.cold+0xeb/0x467 mm/kasan/report.c:313
print_report mm/kasan/report.c:429 [inline]
kasan_report.cold+0xf4/0x1c6 mm/kasan/report.c:491
smc_fback_error_report+0x96/0xa0 net/smc/af_smc.c:782
sk_error_report+0x35/0x310 net/core/sock.c:340
tcp_write_err net/ipv4/tcp_timer.c:71 [inline]
tcp_probe_timer net/ipv4/tcp_timer.c:395 [inline]
tcp_write_timer_handler+0x437/0xbc0 net/ipv4/tcp_timer.c:626
tcp_write_timer+0xa2/0x2b0 net/ipv4/tcp_timer.c:642
call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421
expire_timers kernel/time/timer.c:1466 [inline]
__run_timers.part.0+0x679/0xa80 kernel/time/timer.c:1737
__run_timers kernel/time/timer.c:1715 [inline]
run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1750
__do_softirq+0x29b/0x9c2 kernel/softirq.c:558
invoke_softirq kernel/softirq.c:432 [inline]
__irq_exit_rcu+0x123/0x180 kernel/softirq.c:637
irq_exit_rcu+0x5/0x20 kernel/softirq.c:649
sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1097
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:avtab_search_node+0x2a9/0x4b0 security/selinux/ss/avtab.c:231
Code: 85 e4 0f 84 25 01 00 00 e8 c4 ef b8 fd 4c 89 e0 48 c1 e8 03 42 0f b6 04 28 84 c0 74 08 3c 01 0f 8e 6f 01 00 00 41 0f b7 1c 24 <89> ee 89 df e8 3e f1 b8 fd 66 39 eb 75 8f e8 94 ef b8 fd 49 8d 7c
RSP: 0018:ffffc90005007998 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 0000000000000045 RCX: 0000000000000000
RDX: ffff88802c2a4000 RSI: ffffffff83bf752c RDI: ffffc90005007b36
RBP: 0000000000000211 R08: 0000000000000000 R09: 0000000000000211
R10: ffffffff83bf7304 R11: 0000000000000349 R12: ffff8880248df398
R13: dffffc0000000000 R14: 0000000000000222 R15: 0000000000000009
security_compute_sid.part.0+0x129d/0x15f0 security/selinux/ss/services.c:1852
security_compute_sid security/selinux/ss/services.c:1934 [inline]
security_transition_sid+0xbc/0x190 security/selinux/ss/services.c:1934
selinux_determine_inode_label+0x256/0x340 security/selinux/hooks.c:1752
may_create+0x24f/0x370 security/selinux/hooks.c:1787
security_inode_symlink+0x9a/0x100 security/security.c:1267
vfs_symlink fs/namei.c:4293 [inline]
vfs_symlink+0xa5/0x2c0 fs/namei.c:4282
do_symlinkat+0x261/0x2e0 fs/namei.c:4326
__do_sys_symlink fs/namei.c:4348 [inline]
__se_sys_symlink fs/namei.c:4346 [inline]
__x64_sys_symlink+0x75/0x90 fs/namei.c:4346
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f4c63327217
Code: f0 ff ff 73 01 c3 48 8b 0d 5e dc 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 b8 58 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 31 dc 0c 00 f7 d8 64 89 01 48
RSP: 002b:00007fff6a95ae78 EFLAGS: 00000206 ORIG_RAX: 0000000000000058
RAX: ffffffffffffffda RBX: 00007fff6a95ae88 RCX: 00007f4c63327217
RDX: 0000000000000000 RSI: 00007fff6a95ae88 RDI: 0000558fce31ccd0
RBP: 0000558fce2bce00 R08: 00000000001fffff R09: 00007fff6a95ad20
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000c4e
R13: 0000558fce2ca4e0 R14: 0000000000000008 R15: 0000558fce28a2c0
The buggy address belongs to the physical page:
page:ffffea000097bec0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x25efb
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 ffffffff00000101 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 1, migratetype Unmovable, gfp_mask 0x3c2220(__GFP_HIGH|__GFP_ATOMIC|__GFP_NOWARN|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_THISNODE), pid 26, tgid 26 (kworker/1:1), ts 584274829088, free_ts 606665595193
prep_new_page mm/page_alloc.c:2441 [inline]
get_page_from_freelist+0xba2/0x3e00 mm/page_alloc.c:4182
__alloc_pages+0x1b2/0x500 mm/page_alloc.c:5408
__alloc_pages_node include/linux/gfp.h:587 [inline]
kmem_getpages mm/slab.c:1378 [inline]
cache_grow_begin+0x75/0x350 mm/slab.c:2584
cache_alloc_refill+0x27f/0x380 mm/slab.c:2957
____cache_alloc mm/slab.c:3040 [inline]
____cache_alloc mm/slab.c:3023 [inline]
slab_alloc_node mm/slab.c:3241 [inline]
kmem_cache_alloc_node_trace+0x518/0x5b0 mm/slab.c:3625
__do_kmalloc_node mm/slab.c:3647 [inline]
__kmalloc_node_track_caller+0x38/0x60 mm/slab.c:3662
kmalloc_reserve net/core/skbuff.c:354 [inline]
__alloc_skb+0xde/0x340 net/core/skbuff.c:426
alloc_skb include/linux/skbuff.h:1300 [inline]
nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:742 [inline]
nsim_dev_trap_report drivers/net/netdevsim/dev.c:799 [inline]
nsim_dev_trap_report_work+0x291/0xba0 drivers/net/netdevsim/dev.c:840
process_one_work+0x996/0x1610 kernel/workqueue.c:2289
worker_thread+0x665/0x1080 kernel/workqueue.c:2436
kthread+0x2e9/0x3a0 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1356 [inline]
free_pcp_prepare+0x549/0xd20 mm/page_alloc.c:1406
free_unref_page_prepare mm/page_alloc.c:3328 [inline]
free_unref_page+0x19/0x6a0 mm/page_alloc.c:3423
slab_destroy mm/slab.c:1630 [inline]
slabs_destroy+0x89/0xc0 mm/slab.c:1650
cache_flusharray mm/slab.c:3411 [inline]
___cache_free+0x34e/0x670 mm/slab.c:3474
qlink_free mm/kasan/quarantine.c:157 [inline]
qlist_free_all+0x4f/0x1b0 mm/kasan/quarantine.c:176
kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:283
__kasan_slab_alloc+0x97/0xb0 mm/kasan/common.c:446
kasan_slab_alloc include/linux/kasan.h:224 [inline]
slab_post_alloc_hook mm/slab.h:749 [inline]
slab_alloc mm/slab.c:3316 [inline]
__kmem_cache_alloc_lru mm/slab.c:3493 [inline]
kmem_cache_alloc+0x265/0x560 mm/slab.c:3513
getname_flags.part.0+0x50/0x4f0 fs/namei.c:138
getname_flags include/linux/audit.h:323 [inline]
getname+0x8e/0xd0 fs/namei.c:217
do_sys_openat2+0xf5/0x4c0 fs/open.c:1207
do_sys_open fs/open.c:1229 [inline]
__do_sys_openat fs/open.c:1245 [inline]
__se_sys_openat fs/open.c:1240 [inline]
__x64_sys_openat+0x13f/0x1f0 fs/open.c:1240
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
Memory state around the buggy address:
ffff888025efb080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff888025efb100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff888025efb180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff888025efb200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff888025efb280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
----------------
Code disassembly (best guess):
0: 85 e4 test %esp,%esp
2: 0f 84 25 01 00 00 je 0x12d
8: e8 c4 ef b8 fd callq 0xfdb8efd1
d: 4c 89 e0 mov %r12,%rax
10: 48 c1 e8 03 shr $0x3,%rax
14: 42 0f b6 04 28 movzbl (%rax,%r13,1),%eax
19: 84 c0 test %al,%al
1b: 74 08 je 0x25
1d: 3c 01 cmp $0x1,%al
1f: 0f 8e 6f 01 00 00 jle 0x194
25: 41 0f b7 1c 24 movzwl (%r12),%ebx
* 2a: 89 ee mov %ebp,%esi <-- trapping instruction
2c: 89 df mov %ebx,%edi
2e: e8 3e f1 b8 fd callq 0xfdb8f171
33: 66 39 eb cmp %bp,%bx
36: 75 8f jne 0xffffffc7
38: e8 94 ef b8 fd callq 0xfdb8efd1
3d: 49 rex.WB
3e: 8d .byte 0x8d
3f: 7c .byte 0x7c