================================================================== 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 ffff8880a997a650 by task syz-executor.2/22401 CPU: 0 PID: 22401 Comm: syz-executor.2 Not tainted 5.2.0+ #95 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 do_softirq_own_stack+0x2a/0x40 /arch/x86/entry/entry_64.S:1062 do_softirq.part.0+0x11a/0x170 /kernel/softirq.c:337 do_softirq /kernel/softirq.c:329 [inline] __local_bh_enable_ip+0x211/0x270 /kernel/softirq.c:189 local_bh_enable /./include/linux/bottom_half.h:32 [inline] get_next_corpse /net/netfilter/nf_conntrack_core.c:2014 [inline] nf_ct_iterate_cleanup+0x217/0x4e0 /net/netfilter/nf_conntrack_core.c:2037 nf_ct_iterate_cleanup_net /net/netfilter/nf_conntrack_core.c:2122 [inline] nf_ct_iterate_cleanup_net+0x133/0x190 /net/netfilter/nf_conntrack_core.c:2107 masq_device_event+0xb5/0xe0 /net/netfilter/nf_nat_masquerade.c:88 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] __dev_notify_flags+0x1e9/0x2c0 /net/core/dev.c:7608 dev_change_flags+0x10d/0x170 /net/core/dev.c:7644 dev_ifsioc+0x2aa/0xa00 /net/core/dev_ioctl.c:237 dev_ioctl+0x1b8/0xc74 /net/core/dev_ioctl.c:489 sock_do_ioctl+0x1b7/0x2f0 /net/socket.c:1061 sock_ioctl+0x3ed/0x790 /net/socket.c:1189 vfs_ioctl /fs/ioctl.c:46 [inline] file_ioctl /fs/ioctl.c:509 [inline] do_vfs_ioctl+0xdb6/0x13e0 /fs/ioctl.c:696 ksys_ioctl+0xab/0xd0 /fs/ioctl.c:713 __do_sys_ioctl /fs/ioctl.c:720 [inline] __se_sys_ioctl /fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x73/0xb0 /fs/ioctl.c:718 do_syscall_64+0xfd/0x6a0 /arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459819 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:00007f125dacec78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459819 RDX: 0000000020000000 RSI: 0000000000008914 RDI: 0000000000000006 RBP: 000000000075bfc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f125dacf6d4 R13: 00000000004c54d3 R14: 00000000004d9940 R15: 00000000ffffffff Allocated by task 22451: 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_slab_alloc+0xf/0x20 /mm/kasan/common.c:495 slab_post_alloc_hook /mm/slab.h:520 [inline] slab_alloc /mm/slab.c:3319 [inline] kmem_cache_alloc+0x121/0x710 /mm/slab.c:3483 getname_flags /fs/namei.c:138 [inline] getname_flags+0xd6/0x5b0 /fs/namei.c:128 getname+0x1a/0x20 /fs/namei.c:209 do_sys_open+0x2c9/0x5d0 /fs/open.c:1064 __do_sys_open /fs/open.c:1088 [inline] __se_sys_open /fs/open.c:1083 [inline] __x64_sys_open+0x7e/0xc0 /fs/open.c:1083 do_syscall_64+0xfd/0x6a0 /arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 22451: 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] kmem_cache_free+0x86/0x320 /mm/slab.c:3693 putname+0xef/0x130 /fs/namei.c:259 do_sys_open+0x318/0x5d0 /fs/open.c:1079 __do_sys_open /fs/open.c:1088 [inline] __se_sys_open /fs/open.c:1083 [inline] __x64_sys_open+0x7e/0xc0 /fs/open.c:1083 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 ffff8880a997a000 which belongs to the cache names_cache of size 4096 The buggy address is located 1616 bytes inside of 4096-byte region [ffff8880a997a000, ffff8880a997b000) The buggy address belongs to the page: page:ffffea0002a65e80 refcount:1 mapcount:0 mapping:ffff88821bc46380 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea0002a5ef08 ffffea00025c5108 ffff88821bc46380 raw: 0000000000000000 ffff8880a997a000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a997a500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a997a580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880a997a600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a997a680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a997a700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================