================================================================== BUG: KASAN: use-after-free in tcp_probe_timer net/ipv4/tcp_timer.c:360 [inline] BUG: KASAN: use-after-free in tcp_write_timer_handler+0x8c6/0x8d0 net/ipv4/tcp_timer.c:596 Read of size 4 at addr ffff8880674d4790 by task syz-executor.0/17028 CPU: 1 PID: 17028 Comm: syz-executor.0 Not tainted 5.3.0-rc6+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0xd4/0x306 mm/kasan/report.c:351 __kasan_report.cold+0x1b/0x36 mm/kasan/report.c:482 kasan_report+0x12/0x17 mm/kasan/common.c:618 __asan_report_load4_noabort+0x14/0x20 mm/kasan/generic_report.c:131 tcp_probe_timer net/ipv4/tcp_timer.c:360 [inline] tcp_write_timer_handler+0x8c6/0x8d0 net/ipv4/tcp_timer.c:596 tcp_write_timer+0xa8/0x1e0 net/ipv4/tcp_timer.c:612 call_timer_fn+0x1ac/0x780 kernel/time/timer.c:1322 expire_timers kernel/time/timer.c:1366 [inline] __run_timers kernel/time/timer.c:1685 [inline] __run_timers kernel/time/timer.c:1653 [inline] run_timer_softirq+0x697/0x17a0 kernel/time/timer.c:1698 __do_softirq+0x262/0x98c kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x19b/0x1e0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:537 [inline] smp_apic_timer_interrupt+0x1a3/0x610 arch/x86/kernel/apic/apic.c:1133 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:768 [inline] RIP: 0010:seqcount_lockdep_reader_access include/linux/seqlock.h:83 [inline] RIP: 0010:read_seqcount_begin include/linux/seqlock.h:164 [inline] RIP: 0010:ktime_get+0x133/0x2f0 kernel/time/timekeeping.c:757 Code: f4 d2 88 48 c1 e8 03 42 80 3c 28 00 0f 85 b6 01 00 00 48 83 3d 4d 90 6f 07 00 0f 84 55 01 00 00 e8 d2 0f 0f 00 48 89 df 57 9d <0f> 1f 44 00 00 e8 c3 0f 0f 00 44 8b 3d 1c 4e 78 07 31 ff 44 89 fb RSP: 0018:ffff88806936f4e0 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000040000 RBX: 0000000000000246 RCX: ffffc9000613e000 RDX: 0000000000040000 RSI: ffffffff8163640e RDI: 0000000000000246 RBP: ffff88806936f528 R08: ffff88808f9c8100 R09: fffffbfff134af70 R10: fffffbfff134af6f R11: ffffffff89a57b7f R12: fffffbfff11a5e89 R13: dffffc0000000000 R14: 1ffffffff11a5e8b R15: 0000000000000200 sctp_assoc_bh_rcv+0x30f/0x680 net/sctp/associola.c:1054 sctp_inq_push+0x1e4/0x280 net/sctp/inqueue.c:80 sctp_backlog_rcv+0x196/0xbc0 net/sctp/input.c:339 sk_backlog_rcv include/net/sock.h:945 [inline] __release_sock+0x129/0x390 net/core/sock.c:2427 release_sock+0x59/0x1c0 net/core/sock.c:2943 sctp_sendmsg+0x10c0/0x17d0 net/sctp/socket.c:2107 inet_sendmsg+0x9e/0xe0 net/ipv4/af_inet.c:807 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:657 kernel_sendmsg+0x44/0x50 net/socket.c:677 sock_no_sendpage+0x116/0x150 net/core/sock.c:2730 kernel_sendpage+0xc5/0xf0 net/socket.c:3684 sock_sendpage+0x8b/0xc0 net/socket.c:935 pipe_to_sendpage+0x296/0x360 fs/splice.c:449 splice_from_pipe_feed fs/splice.c:500 [inline] __splice_from_pipe+0x397/0x7d0 fs/splice.c:624 splice_from_pipe+0x108/0x170 fs/splice.c:659 generic_splice_sendpage+0x3c/0x50 fs/splice.c:829 do_splice_from fs/splice.c:848 [inline] do_splice+0x708/0x1410 fs/splice.c:1155 __do_sys_splice fs/splice.c:1425 [inline] __se_sys_splice fs/splice.c:1405 [inline] __x64_sys_splice+0x2c6/0x330 fs/splice.c:1405 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459879 Code: fd b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f7248ec8c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 0000000000459879 RDX: 0000000000000005 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 000000000075bfc8 R08: 0000000080000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f7248ec96d4 R13: 00000000004c907b R14: 00000000004df4f0 R15: 00000000ffffffff Allocated by task 17025: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc mm/kasan/common.c:493 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:466 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:507 __do_kmalloc mm/slab.c:3655 [inline] __kmalloc+0x163/0x770 mm/slab.c:3664 kmalloc include/linux/slab.h:557 [inline] tomoyo_realpath_from_path+0xcd/0x7b0 security/tomoyo/realpath.c:277 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x230/0x430 security/tomoyo/file.c:822 tomoyo_path_symlink+0xaa/0xf0 security/tomoyo/tomoyo.c:206 security_path_symlink+0x10a/0x170 security/security.c:1013 do_symlinkat+0x137/0x290 fs/namei.c:4152 __do_sys_symlink fs/namei.c:4173 [inline] __se_sys_symlink fs/namei.c:4171 [inline] __x64_sys_symlink+0x59/0x80 fs/namei.c:4171 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 17025: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:455 kasan_slab_free+0xe/0x10 mm/kasan/common.c:463 __cache_free mm/slab.c:3425 [inline] kfree+0x10a/0x2c0 mm/slab.c:3756 tomoyo_realpath_from_path+0x1de/0x7b0 security/tomoyo/realpath.c:319 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x230/0x430 security/tomoyo/file.c:822 tomoyo_path_symlink+0xaa/0xf0 security/tomoyo/tomoyo.c:206 security_path_symlink+0x10a/0x170 security/security.c:1013 do_symlinkat+0x137/0x290 fs/namei.c:4152 __do_sys_symlink fs/namei.c:4173 [inline] __se_sys_symlink fs/namei.c:4171 [inline] __x64_sys_symlink+0x59/0x80 fs/namei.c:4171 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880674d41c0 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 1488 bytes inside of 4096-byte region [ffff8880674d41c0, ffff8880674d51c0) The buggy address belongs to the page: page:ffffea00019d3500 refcount:1 mapcount:0 mapping:ffff8880aa402000 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea0001b6db88 ffffea0001a04608 ffff8880aa402000 raw: 0000000000000000 ffff8880674d41c0 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880674d4680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880674d4700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880674d4780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880674d4800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880674d4880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================