================================================================== BUG: KASAN: use-after-free in atomic_read include/asm-generic/atomic-instrumented.h:21 [inline] BUG: KASAN: use-after-free in refcount_read include/linux/refcount.h:43 [inline] BUG: KASAN: use-after-free in skb_unref include/linux/skbuff.h:969 [inline] BUG: KASAN: use-after-free in kfree_skb+0xb7/0x580 net/core/skbuff.c:655 Read of size 4 at addr ffff8881d360c9a4 by task syz-executor0/24728 CPU: 1 PID: 24728 Comm: syz-executor0 Not tainted 4.20.0-rc6+ #225 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+0x244/0x39d lib/dump_stack.c:113 print_address_description.cold.7+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.8+0x242/0x309 mm/kasan/report.c:412 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267 kasan_check_read+0x11/0x20 mm/kasan/kasan.c:272 atomic_read include/asm-generic/atomic-instrumented.h:21 [inline] refcount_read include/linux/refcount.h:43 [inline] skb_unref include/linux/skbuff.h:969 [inline] kfree_skb+0xb7/0x580 net/core/skbuff.c:655 tipc_udp_send_msg+0x5a6/0x670 net/tipc/udp_media.c:249 tipc_bearer_xmit_skb+0x171/0x350 net/tipc/bearer.c:502 tipc_disc_timeout+0xb2b/0xfc0 net/tipc/discover.c:332 call_timer_fn+0x272/0x920 kernel/time/timer.c:1326 expire_timers kernel/time/timer.c:1363 [inline] __run_timers+0x7e5/0xc70 kernel/time/timer.c:1682 run_timer_softirq+0x52/0xb0 kernel/time/timer.c:1695 __do_softirq+0x308/0xb7e kernel/softirq.c:292 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1027 do_softirq.part.14+0x126/0x160 kernel/softirq.c:337 do_softirq kernel/softirq.c:329 [inline] __local_bh_enable_ip+0x21d/0x260 kernel/softirq.c:189 local_bh_enable include/linux/bottom_half.h:32 [inline] get_next_corpse net/netfilter/nf_conntrack_core.c:1892 [inline] nf_ct_iterate_cleanup+0x295/0x5e0 net/netfilter/nf_conntrack_core.c:1915 nf_ct_iterate_cleanup_net+0x237/0x2d0 net/netfilter/nf_conntrack_core.c:2000 masq_device_event+0xcf/0x100 net/ipv4/netfilter/nf_nat_masquerade_ipv4.c:100 notifier_call_chain+0x17e/0x380 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x2d/0x40 kernel/notifier.c:401 call_netdevice_notifiers_info+0x3f/0x90 net/core/dev.c:1733 call_netdevice_notifiers net/core/dev.c:1751 [inline] __dev_notify_flags+0x29b/0x480 net/core/dev.c:7547 dev_change_flags+0xfd/0x150 net/core/dev.c:7581 devinet_ioctl+0xe6a/0x1d80 net/ipv4/devinet.c:1103 inet_ioctl+0x18b/0x360 net/ipv4/af_inet.c:954 sock_do_ioctl+0xeb/0x420 net/socket.c:950 sock_ioctl+0x313/0x690 net/socket.c:1074 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0x1de/0x1790 fs/ioctl.c:696 ksys_ioctl+0xa9/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+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457679 Code: fd b3 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 b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f0de2247c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457679 RDX: 0000000020000000 RSI: 0000000000008914 RDI: 0000000000000004 RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f0de22486d4 R13: 00000000004c2765 R14: 00000000004d4708 R15: 00000000ffffffff Allocated by task 24728: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:490 kmem_cache_alloc_node+0x144/0x730 mm/slab.c:3644 __alloc_skb+0x119/0x770 net/core/skbuff.c:193 __pskb_copy_fclone+0x16b/0xeb0 net/core/skbuff.c:1385 __pskb_copy include/linux/skbuff.h:1053 [inline] pskb_copy include/linux/skbuff.h:2915 [inline] tipc_udp_send_msg+0x44e/0x670 net/tipc/udp_media.c:241 tipc_bearer_xmit_skb+0x171/0x350 net/tipc/bearer.c:502 tipc_disc_timeout+0xb2b/0xfc0 net/tipc/discover.c:332 call_timer_fn+0x272/0x920 kernel/time/timer.c:1326 expire_timers kernel/time/timer.c:1363 [inline] __run_timers+0x7e5/0xc70 kernel/time/timer.c:1682 run_timer_softirq+0x52/0xb0 kernel/time/timer.c:1695 __do_softirq+0x308/0xb7e kernel/softirq.c:292 Freed by task 24728: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kmem_cache_free+0x83/0x290 mm/slab.c:3760 kfree_skbmem+0x154/0x230 net/core/skbuff.c:582 __kfree_skb net/core/skbuff.c:642 [inline] kfree_skb+0x1c3/0x580 net/core/skbuff.c:659 tipc_udp_xmit.isra.14+0x420/0xef0 net/tipc/udp_media.c:207 tipc_udp_send_msg+0x398/0x670 net/tipc/udp_media.c:247 tipc_bearer_xmit_skb+0x171/0x350 net/tipc/bearer.c:502 tipc_disc_timeout+0xb2b/0xfc0 net/tipc/discover.c:332 call_timer_fn+0x272/0x920 kernel/time/timer.c:1326 expire_timers kernel/time/timer.c:1363 [inline] __run_timers+0x7e5/0xc70 kernel/time/timer.c:1682 run_timer_softirq+0x52/0xb0 kernel/time/timer.c:1695 __do_softirq+0x308/0xb7e kernel/softirq.c:292 The buggy address belongs to the object at ffff8881d360c8c0 which belongs to the cache skbuff_head_cache of size 232 The buggy address is located 228 bytes inside of 232-byte region [ffff8881d360c8c0, ffff8881d360c9a8) The buggy address belongs to the page: page:ffffea00074d8300 count:1 mapcount:0 mapping:ffff8881d9bee600 index:0x0 flags: 0x2fffc0000000200(slab) raw: 02fffc0000000200 ffffea00070fe8c8 ffffea00074b3648 ffff8881d9bee600 raw: 0000000000000000 ffff8881d360c000 000000010000000c 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881d360c880: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8881d360c900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881d360c980: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc ^ ffff8881d360ca00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881d360ca80: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc ==================================================================