==================================================================
BUG: KASAN: use-after-free in tcp_probe_timer net/ipv4/tcp_timer.c:378 [inline]
BUG: KASAN: use-after-free in tcp_write_timer_handler net/ipv4/tcp_timer.c:624 [inline]
BUG: KASAN: use-after-free in tcp_write_timer_handler+0x998/0x9f0 net/ipv4/tcp_timer.c:594
Read of size 1 at addr ffff88801f1da6e5 by task udevd/3132
CPU: 3 PID: 3132 Comm: udevd Not tainted 6.0.0-rc2-syzkaller-00248-ge022620b5d05 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:317 [inline]
print_report.cold+0x2ba/0x6e9 mm/kasan/report.c:433
kasan_report+0xb1/0x1e0 mm/kasan/report.c:495
tcp_probe_timer net/ipv4/tcp_timer.c:378 [inline]
tcp_write_timer_handler net/ipv4/tcp_timer.c:624 [inline]
tcp_write_timer_handler+0x998/0x9f0 net/ipv4/tcp_timer.c:594
tcp_write_timer+0xa2/0x2b0 net/ipv4/tcp_timer.c:637
call_timer_fn+0x1a0/0x6b0 kernel/time/timer.c:1474
expire_timers kernel/time/timer.c:1519 [inline]
__run_timers.part.0+0x674/0xa80 kernel/time/timer.c:1790
__run_timers kernel/time/timer.c:1768 [inline]
run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1803
__do_softirq+0x1d3/0x9c6 kernel/softirq.c:571
invoke_softirq kernel/softirq.c:445 [inline]
__irq_exit_rcu+0x123/0x180 kernel/softirq.c:650
irq_exit_rcu+0x5/0x20 kernel/softirq.c:662
sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1106
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:649
RIP: 0010:lock_is_held_type+0x104/0x140 kernel/locking/lockdep.c:5714
Code: ff ff 65 0f c1 05 04 49 83 76 83 f8 01 75 29 9c 58 f6 c4 02 75 3d 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 c3 45 31 ed eb b9 0f 0b 48 c7 c7 20 91 ec
RSP: 0018:ffffc90002e1f6b0 EFLAGS: 00000296
RAX: 0000000000000000 RBX: 0000000000000003 RCX: 0000000000000001
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 1ffff920005c3edf R08: 0000000000000000 R09: ffffffff8dddf4d7
R10: fffffbfff1bbbe9a R11: 0000000000000000 R12: ffff88801b736200
R13: 0000000000000000 R14: 00000000ffffffff R15: ffff88801b736ca0
lock_is_held include/linux/lockdep.h:283 [inline]
rcu_read_lock_sched_held+0x3a/0x70 kernel/rcu/update.c:125
trace_lock_release include/trace/events/lock.h:69 [inline]
lock_release+0x560/0x780 kernel/locking/lockdep.c:5677
might_alloc include/linux/sched/mm.h:271 [inline]
prepare_alloc_pages+0x159/0x570 mm/page_alloc.c:5285
__alloc_pages+0x145/0x510 mm/page_alloc.c:5504
__alloc_pages_node include/linux/gfp.h:243 [inline]
kmem_getpages mm/slab.c:1363 [inline]
cache_grow_begin+0x75/0x360 mm/slab.c:2569
fallback_alloc+0x1e2/0x2d0 mm/slab.c:3112
__do_cache_alloc mm/slab.c:3253 [inline]
slab_alloc mm/slab.c:3287 [inline]
__do_kmalloc mm/slab.c:3684 [inline]
__kmalloc+0x2da/0x4a0 mm/slab.c:3695
kmalloc include/linux/slab.h:605 [inline]
tomoyo_realpath_from_path+0xc3/0x620 security/tomoyo/realpath.c:254
tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
tomoyo_path_perm+0x21b/0x400 security/tomoyo/file.c:822
security_inode_getattr+0xcf/0x140 security/security.c:1345
vfs_getattr fs/stat.c:157 [inline]
vfs_statx+0x16a/0x390 fs/stat.c:232
vfs_fstatat+0x8c/0xb0 fs/stat.c:255
__do_sys_newfstatat+0x91/0x110 fs/stat.c:425
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+0x63/0xcd
RIP: 0033:0x7fd3337251da
Code: 48 89 f2 b9 00 01 00 00 48 89 fe bf 9c ff ff ff e9 0b 00 00 00 66 2e 0f 1f 84 00 00 00 00 00 90 41 89 ca b8 06 01 00 00 0f 05 <3d> 00 f0 ff ff 77 07 31 c0 c3 0f 1f 40 00 48 8b 15 69 fc 0c 00 f7
RSP: 002b:00007fffb90cc5b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000106
RAX: ffffffffffffffda RBX: 00007fffb90cd178 RCX: 00007fd3337251da
RDX: 00007fffb90cc5c8 RSI: 00007fffb90cca58 RDI: 00000000ffffff9c
RBP: 00007fffb90cc658 R08: 0000000000000000 R09: 000055b8d834a050
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fffb90cca58
R13: 00007fffb90cc5c8 R14: 000055b8d83132c0 R15: 0000000000000000
The buggy address belongs to the physical page:
page:ffffea00007c7680 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1f1da
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea0000990188 ffffea00007a3b88 0000000000000000
raw: 0000000000000000 ffff88801f1da000 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 0x242040(__GFP_IO|__GFP_NOWARN|__GFP_COMP|__GFP_THISNODE), pid 3132, tgid 3132 (udevd), ts 741678149646, free_ts 747558886130
prep_new_page mm/page_alloc.c:2532 [inline]
get_page_from_freelist+0x109b/0x2ce0 mm/page_alloc.c:4283
__alloc_pages_slowpath.constprop.0+0x2d7/0x2240 mm/page_alloc.c:5058
__alloc_pages+0x43d/0x510 mm/page_alloc.c:5528
__alloc_pages_node include/linux/gfp.h:243 [inline]
kmem_getpages mm/slab.c:1363 [inline]
cache_grow_begin+0x75/0x360 mm/slab.c:2569
cache_alloc_refill+0x27f/0x380 mm/slab.c:2942
____cache_alloc mm/slab.c:3018 [inline]
____cache_alloc mm/slab.c:3001 [inline]
__do_cache_alloc mm/slab.c:3246 [inline]
slab_alloc mm/slab.c:3287 [inline]
__do_kmalloc mm/slab.c:3684 [inline]
__kmalloc+0x3a1/0x4a0 mm/slab.c:3695
kmalloc include/linux/slab.h:605 [inline]
tomoyo_realpath_from_path+0xc3/0x620 security/tomoyo/realpath.c:254
tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
tomoyo_check_open_permission+0x272/0x380 security/tomoyo/file.c:771
tomoyo_file_open security/tomoyo/tomoyo.c:320 [inline]
tomoyo_file_open+0x9d/0xc0 security/tomoyo/tomoyo.c:315
security_file_open+0x45/0xb0 security/security.c:1646
do_dentry_open+0x349/0x13a0 fs/open.c:865
do_open fs/namei.c:3557 [inline]
path_openat+0x1c92/0x28f0 fs/namei.c:3691
do_filp_open+0x1b6/0x400 fs/namei.c:3718
do_sys_openat2+0x16d/0x4c0 fs/open.c:1311
do_sys_open fs/open.c:1327 [inline]
__do_sys_openat fs/open.c:1343 [inline]
__se_sys_openat fs/open.c:1338 [inline]
__x64_sys_openat+0x13f/0x1f0 fs/open.c:1338
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1449 [inline]
free_pcp_prepare+0x5e4/0xd20 mm/page_alloc.c:1499
free_unref_page_prepare mm/page_alloc.c:3380 [inline]
free_unref_page+0x19/0x4d0 mm/page_alloc.c:3476
slab_destroy mm/slab.c:1615 [inline]
slabs_destroy+0x89/0xc0 mm/slab.c:1635
cache_flusharray mm/slab.c:3389 [inline]
___cache_free+0x2a8/0x3d0 mm/slab.c:3452
qlink_free mm/kasan/quarantine.c:168 [inline]
qlist_free_all+0x4f/0x1b0 mm/kasan/quarantine.c:187
kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:294
__kasan_slab_alloc+0x97/0xb0 mm/kasan/common.c:447
kasan_slab_alloc include/linux/kasan.h:224 [inline]
slab_post_alloc_hook mm/slab.h:727 [inline]
slab_alloc mm/slab.c:3294 [inline]
__do_kmalloc mm/slab.c:3684 [inline]
__kmalloc+0x315/0x4a0 mm/slab.c:3695
kmalloc include/linux/slab.h:605 [inline]
tomoyo_realpath_from_path+0xc3/0x620 security/tomoyo/realpath.c:254
tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
tomoyo_path_perm+0x21b/0x400 security/tomoyo/file.c:822
security_inode_getattr+0xcf/0x140 security/security.c:1345
vfs_getattr fs/stat.c:157 [inline]
vfs_statx+0x16a/0x390 fs/stat.c:232
vfs_fstatat+0x8c/0xb0 fs/stat.c:255
__do_sys_newfstatat+0x91/0x110 fs/stat.c:425
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+0x63/0xcd
Memory state around the buggy address:
ffff88801f1da580: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88801f1da600: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88801f1da680: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88801f1da700: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88801f1da780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
----------------
Code disassembly (best guess), 1 bytes skipped:
0: ff 65 0f jmpq *0xf(%rbp)
3: c1 05 04 49 83 76 83 roll $0x83,0x76834904(%rip) # 0x7683490e
a: f8 clc
b: 01 75 29 add %esi,0x29(%rbp)
e: 9c pushfq
f: 58 pop %rax
10: f6 c4 02 test $0x2,%ah
13: 75 3d jne 0x52
15: 48 f7 04 24 00 02 00 testq $0x200,(%rsp)
1c: 00
1d: 74 01 je 0x20
1f: fb sti
20: 48 83 c4 08 add $0x8,%rsp
24: 44 89 e8 mov %r13d,%eax
27: 5b pop %rbx
28: 5d pop %rbp
* 29: 41 5c pop %r12 <-- trapping instruction
2b: 41 5d pop %r13
2d: 41 5e pop %r14
2f: 41 5f pop %r15
31: c3 retq
32: 45 31 ed xor %r13d,%r13d
35: eb b9 jmp 0xfffffff0
37: 0f 0b ud2
39: 48 rex.W
3a: c7 .byte 0xc7
3b: c7 (bad)
3c: 20 .byte 0x20
3d: 91 xchg %eax,%ecx
3e: ec in (%dx),%al