================================================================== BUG: KASAN: use-after-free in report_sock_error+0x286/0x300 net/sched/sch_etf.c:141 Read of size 1 at addr ffff88809dc61245 by task syz-executor.2/2280 CPU: 0 PID: 2280 Comm: syz-executor.2 Not tainted 5.7.0-rc1-syzkaller #0 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+0x188/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd3/0x315 mm/kasan/report.c:382 __kasan_report.cold+0x35/0x4d mm/kasan/report.c:511 kasan_report+0x33/0x50 mm/kasan/common.c:625 report_sock_error+0x286/0x300 net/sched/sch_etf.c:141 etf_enqueue_timesortedlist+0x389/0x740 net/sched/sch_etf.c:170 __dev_xmit_skb net/core/dev.c:3710 [inline] __dev_queue_xmit+0x154a/0x30a0 net/core/dev.c:4021 neigh_resolve_output net/core/neighbour.c:1489 [inline] neigh_resolve_output+0x566/0x930 net/core/neighbour.c:1469 neigh_output include/net/neighbour.h:510 [inline] ip6_finish_output2+0x1091/0x25b0 net/ipv6/ip6_output.c:117 __ip6_finish_output+0x442/0xab0 net/ipv6/ip6_output.c:143 ip6_finish_output+0x34/0x1f0 net/ipv6/ip6_output.c:153 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip6_output+0x239/0x810 net/ipv6/ip6_output.c:176 dst_output include/net/dst.h:435 [inline] NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ip6_xmit+0xe1a/0x2090 net/ipv6/ip6_output.c:280 tcp_v6_send_synack+0x4e7/0x960 net/ipv6/tcp_ipv6.c:521 tcp_conn_request+0x257f/0x34f0 net/ipv4/tcp_input.c:6719 tcp_v6_conn_request net/ipv6/tcp_ipv6.c:1151 [inline] tcp_v6_conn_request+0x100/0x2b0 net/ipv6/tcp_ipv6.c:1143 tcp_rcv_state_process+0xa19/0x4c80 net/ipv4/tcp_input.c:6190 tcp_v6_do_rcv+0x7d2/0x1290 net/ipv6/tcp_ipv6.c:1463 tcp_v6_rcv+0x2e66/0x3640 net/ipv6/tcp_ipv6.c:1659 ip6_protocol_deliver_rcu+0x2e6/0x1660 net/ipv6/ip6_input.c:433 ip6_input_finish+0x7f/0x160 net/ipv6/ip6_input.c:474 NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ip6_input+0xcf/0x3d0 net/ipv6/ip6_input.c:483 dst_input include/net/dst.h:441 [inline] ip6_rcv_finish+0x1d9/0x310 net/ipv6/ip6_input.c:76 NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ipv6_rcv+0xf8/0x3f0 net/ipv6/ip6_input.c:307 __netif_receive_skb_one_core+0xf5/0x160 net/core/dev.c:5188 __netif_receive_skb+0x27/0x1c0 net/core/dev.c:5302 netif_receive_skb_internal net/core/dev.c:5392 [inline] netif_receive_skb+0x16e/0x960 net/core/dev.c:5451 tun_rx_batched.isra.0+0x47b/0x7d0 drivers/net/tun.c:1516 tun_get_user+0x13c6/0x3c70 drivers/net/tun.c:1963 tun_chr_write_iter+0xba/0x151 drivers/net/tun.c:1992 call_write_iter include/linux/fs.h:1907 [inline] new_sync_write+0x4a2/0x700 fs/read_write.c:484 __vfs_write+0xc9/0x100 fs/read_write.c:497 vfs_write+0x268/0x5d0 fs/read_write.c:559 ksys_write+0x12d/0x250 fs/read_write.c:612 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 RIP: 0033:0x416361 Code: 75 14 b8 01 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 c4 1b 00 00 c3 48 83 ec 08 e8 ca fc ff ff 48 89 04 24 b8 01 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 13 fd ff ff 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00007f1ad8ad2c60 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000507740 RCX: 0000000000416361 RDX: 000000000000004e RSI: 00000000200001c0 RDI: 00000000000000f0 RBP: 000000000078bfa0 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffffffffffff R11: 0000000000000293 R12: 00000000ffffffff R13: 0000000000000bb2 R14: 00000000004cdd84 R15: 00007f1ad8ad36d4 Allocated by task 2273: save_stack+0x1b/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] __kasan_kmalloc mm/kasan/common.c:495 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:468 slab_post_alloc_hook mm/slab.h:586 [inline] slab_alloc mm/slab.c:3320 [inline] kmem_cache_alloc+0x11b/0x740 mm/slab.c:3484 skb_clone+0x14d/0x3c0 net/core/skbuff.c:1447 ip_mc_output+0x6e1/0xed0 net/ipv4/ip_output.c:408 dst_output include/net/dst.h:435 [inline] ip_local_out+0xaf/0x1a0 net/ipv4/ip_output.c:125 ip_send_skb+0x3e/0xe0 net/ipv4/ip_output.c:1560 udp_send_skb.isra.0+0x6cb/0x11c0 net/ipv4/udp.c:891 udp_sendmsg+0x1ea8/0x2820 net/ipv4/udp.c:1178 inet_sendmsg+0x99/0xe0 net/ipv4/af_inet.c:807 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 ____sys_sendmsg+0x308/0x7e0 net/socket.c:2362 ___sys_sendmsg+0x100/0x170 net/socket.c:2416 __sys_sendmmsg+0x195/0x480 net/socket.c:2506 __do_sys_sendmmsg net/socket.c:2535 [inline] __se_sys_sendmmsg net/socket.c:2532 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2532 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 Freed by task 2273: save_stack+0x1b/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] kasan_set_free_info mm/kasan/common.c:317 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/common.c:456 __cache_free mm/slab.c:3426 [inline] kmem_cache_free+0x7f/0x320 mm/slab.c:3694 kfree_skbmem net/core/skbuff.c:622 [inline] kfree_skbmem+0xef/0x1b0 net/core/skbuff.c:616 __kfree_skb net/core/skbuff.c:679 [inline] kfree_skb net/core/skbuff.c:696 [inline] kfree_skb+0x102/0x410 net/core/skbuff.c:690 __udp4_lib_mcast_deliver net/ipv4/udp.c:2203 [inline] __udp4_lib_rcv+0x24dd/0x2ea0 net/ipv4/udp.c:2332 ip_protocol_deliver_rcu+0x57/0x880 net/ipv4/ip_input.c:204 ip_local_deliver_finish+0x220/0x360 net/ipv4/ip_input.c:231 NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ip_local_deliver+0x1c8/0x4e0 net/ipv4/ip_input.c:252 dst_input include/net/dst.h:441 [inline] ip_rcv_finish+0x1da/0x2f0 net/ipv4/ip_input.c:428 NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ip_rcv+0xd0/0x3c0 net/ipv4/ip_input.c:539 __netif_receive_skb_one_core+0xf5/0x160 net/core/dev.c:5188 __netif_receive_skb+0x27/0x1c0 net/core/dev.c:5302 process_backlog+0x21e/0x7a0 net/core/dev.c:6134 napi_poll net/core/dev.c:6579 [inline] net_rx_action+0x4c2/0x1070 net/core/dev.c:6647 __do_softirq+0x26c/0x9f7 kernel/softirq.c:292 The buggy address belongs to the object at ffff88809dc61200 which belongs to the cache skbuff_head_cache of size 224 The buggy address is located 69 bytes inside of 224-byte region [ffff88809dc61200, ffff88809dc612e0) The buggy address belongs to the page: page:ffffea0002771840 refcount:1 mapcount:0 mapping:00000000cecbcd8e index:0x0 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea0001473448 ffffea00014283c8 ffff88821b777700 raw: 0000000000000000 ffff88809dc610c0 000000010000000c 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809dc61100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88809dc61180: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc >ffff88809dc61200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809dc61280: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff88809dc61300: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ==================================================================