================================================================== 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 ffff8880949fa690 by task blkid/11999 CPU: 1 PID: 11999 Comm: blkid Not tainted 5.2.0+ #67 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:__sanitizer_cov_trace_const_cmp4+0x1/0x20 kernel/kcov.c:189 Code: fe ff ff 5d c3 0f 1f 40 00 55 0f b7 d6 0f b7 f7 bf 03 00 00 00 48 89 e5 48 8b 4d 08 e8 d8 fe ff ff 5d c3 66 0f 1f 44 00 00 55 <89> f2 89 fe bf 05 00 00 00 48 89 e5 48 8b 4d 08 e8 ba fe ff ff 5d RSP: 0000:ffff88805360f9e8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: ffff88809d5c4300 RBX: 0000000000000001 RCX: ffffffff833de5a1 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: ffff88805360fa18 R08: ffff88809d5c4300 R09: fffff9400047bd0f R10: fffff9400047bd0e R11: ffffea00023de873 R12: ffffffff8793c040 R13: 0000000000000001 R14: 0000000000039218 R15: ffff88812fffc000 __mod_node_page_state+0x6e/0x100 mm/vmstat.c:346 __mod_lruvec_state+0x53/0x300 mm/memcontrol.c:744 __mod_lruvec_page_state include/linux/memcontrol.h:695 [inline] page_add_file_rmap+0x561/0xd60 mm/rmap.c:1208 alloc_set_pte+0x62b/0x17f0 mm/memory.c:3298 filemap_map_pages+0x1089/0x1360 mm/filemap.c:2700 do_fault_around mm/memory.c:3441 [inline] do_read_fault mm/memory.c:3475 [inline] do_fault mm/memory.c:3609 [inline] handle_pte_fault mm/memory.c:3840 [inline] __handle_mm_fault+0x3247/0x3f20 mm/memory.c:3964 handle_mm_fault+0x1b5/0x6b0 mm/memory.c:4001 do_user_addr_fault arch/x86/mm/fault.c:1444 [inline] __do_page_fault+0x536/0xdd0 arch/x86/mm/fault.c:1510 do_page_fault+0x71/0x5e1 arch/x86/mm/fault.c:1541 page_fault+0x1e/0x30 arch/x86/entry/entry_64.S:1182 RIP: 0033:0x7efc5788f786 Code: 02 0f 84 bc 01 00 00 83 fa 03 0f 84 47 01 00 00 83 fa 01 90 0f 84 d8 00 00 00 48 83 c0 38 48 39 c8 0f 1f 00 0f 83 a9 01 00 00 <8b> 10 83 fa 06 0f 84 ae 00 00 00 76 c7 81 fa 51 e5 74 64 0f 84 92 RSP: 002b:00007fff710154e0 EFLAGS: 00010293 RAX: 0000000000400040 RBX: 00007efc57aae1c8 RCX: 0000000000400238 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00007efc57aad970 RBP: 00007fff71015630 R08: 0000000000000009 R09: 0000000000000000 R10: 0000000000000064 R11: 0000000000000000 R12: 0000000000400040 R13: 0000000000000000 R14: 00007fff71015648 R15: 0000000000000000 Allocated by task 9748: 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 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_inode_getattr+0x1d/0x30 security/tomoyo/tomoyo.c:129 security_inode_getattr+0xf2/0x150 security/security.c:1182 vfs_getattr+0x25/0x70 fs/stat.c:115 vfs_statx+0x157/0x200 fs/stat.c:191 vfs_lstat include/linux/fs.h:3187 [inline] __do_sys_newlstat+0xa4/0x130 fs/stat.c:354 __se_sys_newlstat fs/stat.c:348 [inline] __x64_sys_newlstat+0x54/0x80 fs/stat.c:348 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 9748: 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 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_inode_getattr+0x1d/0x30 security/tomoyo/tomoyo.c:129 security_inode_getattr+0xf2/0x150 security/security.c:1182 vfs_getattr+0x25/0x70 fs/stat.c:115 vfs_statx+0x157/0x200 fs/stat.c:191 vfs_lstat include/linux/fs.h:3187 [inline] __do_sys_newlstat+0xa4/0x130 fs/stat.c:354 __se_sys_newlstat fs/stat.c:348 [inline] __x64_sys_newlstat+0x54/0x80 fs/stat.c:348 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 ffff8880949fac40 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 1456 bytes to the left of 4096-byte region [ffff8880949fac40, ffff8880949fbc40) The buggy address belongs to the page: page:ffffea0002527e80 refcount:1 mapcount:0 mapping:ffff8880aa402000 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea000182b288 ffffea00021a6d88 ffff8880aa402000 raw: 0000000000000000 ffff8880949fac40 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880949fa580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880949fa600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880949fa680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880949fa700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880949fa780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================