================================================================== BUG: KASAN: slab-out-of-bounds in tcp_probe_timer net/ipv4/tcp_timer.c:360 [inline] BUG: KASAN: slab-out-of-bounds in tcp_write_timer_handler+0x8c6/0x8d0 net/ipv4/tcp_timer.c:596 Read of size 4 at addr ffff8880708706d0 by task udevd/22647 CPU: 0 PID: 22647 Comm: udevd Not tainted 5.3.0-rc2+ #110 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:612 __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:1095 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:828 RIP: 0010:__read_once_size include/linux/compiler.h:199 [inline] RIP: 0010:tomoyo_domain_quota_is_ok+0xe4/0x540 security/tomoyo/util.c:1031 Code: 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 fc 03 00 00 48 8b 45 c8 45 31 f6 4c 8b 60 10 4c 3b 65 d0 75 33 e9 ca 00 00 00 d7 6d 6c fe 4c 89 e0 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 RSP: 0018:ffff88805f49f7e0 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: 0000000000000010 RCX: ffffffff830633e5 RDX: 0000000000000010 RSI: 0000000000000010 RDI: 0000000000000001 RBP: ffff88805f49f820 R08: ffff8880a0d2e040 R09: ffffed100be93f11 R10: ffffed100be93f10 R11: 0000000000000000 R12: ffff888090d02d80 R13: 0000000000000022 R14: 00000000000000dc R15: 0000000000000000 tomoyo_supervisor+0x2e8/0xef0 security/tomoyo/common.c:2087 tomoyo_audit_path2_log security/tomoyo/file.c:182 [inline] tomoyo_path2_perm+0x471/0x670 security/tomoyo/file.c:943 tomoyo_path_rename+0xee/0x150 security/tomoyo/tomoyo.c:285 security_path_rename+0x20c/0x300 security/security.c:1039 do_renameat2+0x7b8/0xc40 fs/namei.c:4623 __do_sys_rename fs/namei.c:4673 [inline] __se_sys_rename fs/namei.c:4671 [inline] __x64_sys_rename+0x61/0x80 fs/namei.c:4671 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f399aec3527 Code: 32 00 64 83 38 15 74 07 b8 ff ff ff ff 5b c3 48 89 df e8 1c c1 07 00 85 c0 75 ed 31 c0 eb d3 90 90 90 90 b8 52 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d e1 f8 32 00 31 d2 48 29 c2 64 RSP: 002b:00007ffea9842788 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f399aec3527 RDX: 00007f399b1f4e98 RSI: 00007ffea98427c0 RDI: 00007ffea9842bc0 RBP: 0000000000d352d0 R08: 00007f399b8367a0 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000d3a520 R13: 0000000000d35250 R14: 00007ffea98427c0 R15: 0000000000000001 Allocated by task 737: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc mm/kasan/common.c:487 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:460 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:501 __do_kmalloc_node mm/slab.c:3615 [inline] __kmalloc_node+0x4e/0x70 mm/slab.c:3622 kmalloc_node include/linux/slab.h:595 [inline] kvmalloc_node+0x68/0x100 mm/util.c:459 kvmalloc include/linux/mm.h:670 [inline] seq_buf_alloc fs/seq_file.c:32 [inline] seq_read+0x817/0x1110 fs/seq_file.c:204 kernfs_fop_read+0xed/0x560 fs/kernfs/file.c:251 __vfs_read+0x8a/0x110 fs/read_write.c:425 vfs_read+0x1f0/0x440 fs/read_write.c:461 ksys_read+0x14f/0x290 fs/read_write.c:587 __do_sys_read fs/read_write.c:597 [inline] __se_sys_read fs/read_write.c:595 [inline] __x64_sys_read+0x73/0xb0 fs/read_write.c:595 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 737: 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:449 kasan_slab_free+0xe/0x10 mm/kasan/common.c:457 __cache_free mm/slab.c:3425 [inline] kfree+0x10a/0x2c0 mm/slab.c:3756 kvfree+0x61/0x70 mm/util.c:488 seq_release+0x54/0x80 fs/seq_file.c:360 kernfs_fop_release+0xf7/0x1a0 fs/kernfs/file.c:780 __fput+0x2ff/0x890 fs/file_table.c:280 ____fput+0x16/0x20 fs/file_table.c:313 task_work_run+0x145/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x316/0x380 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:194 [inline] syscall_return_slowpath arch/x86/entry/common.c:274 [inline] do_syscall_64+0x5a9/0x6a0 arch/x86/entry/common.c:299 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888070870700 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 48 bytes to the left of 4096-byte region [ffff888070870700, ffff888070871700) The buggy address belongs to the page: page:ffffea0001c21c00 refcount:1 mapcount:0 mapping:ffff8880aa402000 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea0002a43a88 ffffea0002a6ab88 ffff8880aa402000 raw: 0000000000000000 ffff888070870700 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888070870580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888070870600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888070870680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888070870700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888070870780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================