================================================================== BUG: KASAN: slab-out-of-bounds in ____bpf_skb_change_head net/core/filter.c:2422 [inline] BUG: KASAN: slab-out-of-bounds in bpf_skb_change_head+0x461/0x530 net/core/filter.c:2418 Read of size 4 at addr ffff8801d4d779b8 by task syz-executor1/21844 CPU: 1 PID: 21844 Comm: syz-executor1 Not tainted 4.14.72+ #9 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xb9/0x11b lib/dump_stack.c:53 print_address_description+0x60/0x22b mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.6+0x11b/0x2dd mm/kasan/report.c:409 ____bpf_skb_change_head net/core/filter.c:2422 [inline] bpf_skb_change_head+0x461/0x530 net/core/filter.c:2418 ___bpf_prog_run+0x248e/0x5c70 kernel/bpf/core.c:1012 Allocated by task 21784: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.1+0x4f/0xd0 mm/kasan/kasan.c:551 slab_post_alloc_hook mm/slab.h:442 [inline] slab_alloc_node mm/slub.c:2723 [inline] slab_alloc mm/slub.c:2731 [inline] kmem_cache_alloc+0xe4/0x2b0 mm/slub.c:2736 skb_clone+0x120/0x300 net/core/skbuff.c:1278 dev_queue_xmit_nit+0x2f8/0x960 net/core/dev.c:1921 xmit_one net/core/dev.c:2983 [inline] dev_hard_start_xmit+0xa2/0x890 net/core/dev.c:3003 __dev_queue_xmit+0x13d9/0x1f40 net/core/dev.c:3503 neigh_output include/net/neighbour.h:482 [inline] ip6_finish_output2+0xbd0/0x1e70 net/ipv6/ip6_output.c:120 ip6_finish_output+0x62e/0xb10 net/ipv6/ip6_output.c:154 NF_HOOK_COND include/linux/netfilter.h:239 [inline] ip6_output+0x1dd/0x680 net/ipv6/ip6_output.c:171 dst_output include/net/dst.h:459 [inline] ip6_local_out+0x94/0x170 net/ipv6/output_core.c:176 ip6_send_skb+0x98/0x2e0 net/ipv6/ip6_output.c:1688 udp_v6_send_skb+0x5ac/0xe70 net/ipv6/udp.c:1074 udpv6_sendmsg+0x1f07/0x2510 net/ipv6/udp.c:1346 inet_sendmsg+0x168/0x540 net/ipv4/af_inet.c:781 sock_sendmsg_nosec net/socket.c:645 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:655 ___sys_sendmsg+0x41d/0x890 net/socket.c:2061 __sys_sendmmsg+0x13d/0x360 net/socket.c:2151 SYSC_sendmmsg net/socket.c:2182 [inline] SyS_sendmmsg+0x2f/0x50 net/socket.c:2177 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 21784: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xac/0x190 mm/kasan/kasan.c:524 slab_free_hook mm/slub.c:1389 [inline] slab_free_freelist_hook mm/slub.c:1410 [inline] slab_free mm/slub.c:2966 [inline] kmem_cache_free+0x12d/0x350 mm/slub.c:2988 kfree_skbmem+0x9e/0x100 net/core/skbuff.c:582 __kfree_skb net/core/skbuff.c:642 [inline] consume_skb+0xc9/0x330 net/core/skbuff.c:701 packet_rcv+0xdd/0x11f0 net/packet/af_packet.c:2178 dev_queue_xmit_nit+0x6e6/0x960 net/core/dev.c:1953 xmit_one net/core/dev.c:2983 [inline] dev_hard_start_xmit+0xa2/0x890 net/core/dev.c:3003 __dev_queue_xmit+0x13d9/0x1f40 net/core/dev.c:3503 neigh_output include/net/neighbour.h:482 [inline] ip6_finish_output2+0xbd0/0x1e70 net/ipv6/ip6_output.c:120 ip6_finish_output+0x62e/0xb10 net/ipv6/ip6_output.c:154 NF_HOOK_COND include/linux/netfilter.h:239 [inline] ip6_output+0x1dd/0x680 net/ipv6/ip6_output.c:171 dst_output include/net/dst.h:459 [inline] ip6_local_out+0x94/0x170 net/ipv6/output_core.c:176 ip6_send_skb+0x98/0x2e0 net/ipv6/ip6_output.c:1688 udp_v6_send_skb+0x5ac/0xe70 net/ipv6/udp.c:1074 udpv6_sendmsg+0x1f07/0x2510 net/ipv6/udp.c:1346 inet_sendmsg+0x168/0x540 net/ipv4/af_inet.c:781 sock_sendmsg_nosec net/socket.c:645 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:655 ___sys_sendmsg+0x41d/0x890 net/socket.c:2061 __sys_sendmmsg+0x13d/0x360 net/socket.c:2151 SYSC_sendmmsg net/socket.c:2182 [inline] SyS_sendmmsg+0x2f/0x50 net/socket.c:2177 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff8801d4d778c0 which belongs to the cache skbuff_head_cache of size 224 The buggy address is located 24 bytes to the right of 224-byte region [ffff8801d4d778c0, ffff8801d4d779a0) The buggy address belongs to the page: page:ffffea0007535dc0 count:1 mapcount:0 mapping: (null) index:0x0 flags: 0x4000000000000100(slab) raw: 4000000000000100 0000000000000000 0000000000000000 00000001800c000c raw: ffffea0007253b00 0000000800000002 ffff8801d6770200 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801d4d77880: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8801d4d77900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801d4d77980: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8801d4d77a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801d4d77a80: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ==================================================================