================================================================== 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 ffff8880968b29d0 by task kworker/u4:11/16542 CPU: 0 PID: 16542 Comm: kworker/u4:11 Not tainted 5.2.0+ #97 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: netns cleanup_net 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:should_resched arch/x86/include/asm/preempt.h:102 [inline] RIP: 0010:__local_bh_enable_ip+0x18e/0x270 kernel/softirq.c:196 Code: 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 0f 85 df 00 00 00 48 83 3d ff 65 8d 07 00 0f 84 8f 00 00 00 fb 66 0f 1f 44 00 00 <65> 8b 05 53 73 bc 7e 85 c0 74 7f 5b 41 5c 41 5d 5d c3 80 3d 74 96 RSP: 0018:ffff88809017f728 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff11a5e04 RBX: 0000000000000201 RCX: 0000000000000006 RDX: dffffc0000000000 RSI: 0000000000000008 RDI: ffff888062f2aecc RBP: ffff88809017f740 R08: 1ffffffff14a7743 R09: fffffbfff14a7744 R10: fffffbfff14a7743 R11: ffffffff8a53ba1f R12: ffffffff86375f84 R13: ffff888062f2a640 R14: ffff88809595ed80 R15: 0000000000000000 __raw_spin_unlock_bh include/linux/spinlock_api_smp.h:176 [inline] _raw_spin_unlock_bh+0x31/0x40 kernel/locking/spinlock.c:207 spin_unlock_bh include/linux/spinlock.h:383 [inline] addrconf_ifdown+0x444/0x1220 net/ipv6/addrconf.c:3761 addrconf_notify+0x5db/0x2370 net/ipv6/addrconf.c:3632 notifier_call_chain+0xc2/0x230 kernel/notifier.c:95 __raw_notifier_call_chain kernel/notifier.c:396 [inline] raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:403 call_netdevice_notifiers_info+0x3f/0x90 net/core/dev.c:1749 call_netdevice_notifiers_extack net/core/dev.c:1761 [inline] call_netdevice_notifiers net/core/dev.c:1775 [inline] rollback_registered_many+0x8d5/0xdf0 net/core/dev.c:8196 unregister_netdevice_many.part.0+0x1b/0x1f0 net/core/dev.c:9304 unregister_netdevice_many+0x3b/0x50 net/core/dev.c:9303 ip_tunnel_delete_nets+0x41e/0x5f0 net/ipv4/ip_tunnel.c:1113 erspan_exit_batch_net+0x23/0x30 net/ipv4/ip_gre.c:1595 ops_exit_list.isra.0+0xfc/0x150 net/core/net_namespace.c:175 cleanup_net+0x4e2/0xa70 net/core/net_namespace.c:594 process_one_work+0x9af/0x1740 kernel/workqueue.c:2269 worker_thread+0x98/0xe40 kernel/workqueue.c:2415 kthread+0x361/0x430 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Allocated by task 4871: 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 kmem_cache_alloc_trace+0x158/0x790 mm/slab.c:3550 kmalloc include/linux/slab.h:552 [inline] kzalloc include/linux/slab.h:748 [inline] uevent_show+0x165/0x370 drivers/base/core.c:1222 dev_attr_show+0x50/0xa0 drivers/base/core.c:931 sysfs_kf_seq_show+0x1fc/0x410 fs/sysfs/file.c:60 kernfs_seq_show+0x14f/0x1b0 fs/kernfs/file.c:167 seq_read+0x4ca/0x1110 fs/seq_file.c:229 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 4871: 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 uevent_show+0x2ca/0x370 drivers/base/core.c:1235 dev_attr_show+0x50/0xa0 drivers/base/core.c:931 sysfs_kf_seq_show+0x1fc/0x410 fs/sysfs/file.c:60 kernfs_seq_show+0x14f/0x1b0 fs/kernfs/file.c:167 seq_read+0x4ca/0x1110 fs/seq_file.c:229 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 The buggy address belongs to the object at ffff8880968b2b80 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 432 bytes to the left of 4096-byte region [ffff8880968b2b80, ffff8880968b3b80) The buggy address belongs to the page: page:ffffea00025a2c80 refcount:1 mapcount:0 mapping:ffff8880aa402000 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea000281ea08 ffffea000188d388 ffff8880aa402000 raw: 0000000000000000 ffff8880968b2b80 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880968b2880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880968b2900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880968b2980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880968b2a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880968b2a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================