================================================================== BUG: KASAN: slab-out-of-bounds in bpf_skb_proto_xlat net/core/filter.c:2150 [inline] BUG: KASAN: slab-out-of-bounds in ____bpf_skb_change_proto net/core/filter.c:2188 [inline] BUG: KASAN: slab-out-of-bounds in bpf_skb_change_proto+0xd7d/0x1100 net/core/filter.c:2163 Read of size 2 at addr ffff8801c521a278 by task syz-executor4/22691 CPU: 1 PID: 22691 Comm: syz-executor4 Not tainted 4.14.78+ #23 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_proto_xlat net/core/filter.c:2150 [inline] ____bpf_skb_change_proto net/core/filter.c:2188 [inline] bpf_skb_change_proto+0xd7d/0x1100 net/core/filter.c:2163 ___bpf_prog_run+0x248e/0x5c70 kernel/bpf/core.c:1012 Allocated by task 1793: 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:1943 xmit_one net/core/dev.c:3005 [inline] dev_hard_start_xmit+0xa2/0x890 net/core/dev.c:3025 sch_direct_xmit+0x280/0x520 net/sched/sch_generic.c:186 __dev_xmit_skb net/core/dev.c:3218 [inline] __dev_queue_xmit+0x16fd/0x1f40 net/core/dev.c:3493 neigh_hh_output include/net/neighbour.h:472 [inline] neigh_output include/net/neighbour.h:480 [inline] ip_finish_output2+0xc56/0x1190 net/ipv4/ip_output.c:229 ip_finish_output+0x3a5/0xc40 net/ipv4/ip_output.c:317 NF_HOOK_COND include/linux/netfilter.h:239 [inline] ip_output+0x1c9/0x520 net/ipv4/ip_output.c:405 dst_output include/net/dst.h:459 [inline] ip_local_out+0x94/0x170 net/ipv4/ip_output.c:124 ip_queue_xmit+0x7fc/0x1a50 net/ipv4/ip_output.c:504 __tcp_transmit_skb+0x182e/0x2ce0 net/ipv4/tcp_output.c:1130 tcp_transmit_skb net/ipv4/tcp_output.c:1146 [inline] tcp_write_xmit+0x5e4/0x48e0 net/ipv4/tcp_output.c:2352 __tcp_push_pending_frames+0x9d/0x250 net/ipv4/tcp_output.c:2529 tcp_push+0x3f3/0x5d0 net/ipv4/tcp.c:715 tcp_sendmsg_locked+0x2631/0x3250 net/ipv4/tcp.c:1409 tcp_sendmsg+0x2a/0x40 net/ipv4/tcp.c:1446 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 sock_write_iter+0x209/0x350 net/socket.c:924 call_write_iter include/linux/fs.h:1782 [inline] new_sync_write fs/read_write.c:471 [inline] __vfs_write+0x417/0x5c0 fs/read_write.c:484 vfs_write+0x17f/0x4d0 fs/read_write.c:546 SYSC_write fs/read_write.c:593 [inline] SyS_write+0xc2/0x1a0 fs/read_write.c:585 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 1793: 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] kfree_skb+0xd0/0x340 net/core/skbuff.c:659 packet_rcv_spkt+0xd5/0x4b0 net/packet/af_packet.c:1888 dev_queue_xmit_nit+0x6e6/0x960 net/core/dev.c:1975 xmit_one net/core/dev.c:3005 [inline] dev_hard_start_xmit+0xa2/0x890 net/core/dev.c:3025 sch_direct_xmit+0x280/0x520 net/sched/sch_generic.c:186 __dev_xmit_skb net/core/dev.c:3218 [inline] __dev_queue_xmit+0x16fd/0x1f40 net/core/dev.c:3493 neigh_hh_output include/net/neighbour.h:472 [inline] neigh_output include/net/neighbour.h:480 [inline] ip_finish_output2+0xc56/0x1190 net/ipv4/ip_output.c:229 ip_finish_output+0x3a5/0xc40 net/ipv4/ip_output.c:317 NF_HOOK_COND include/linux/netfilter.h:239 [inline] ip_output+0x1c9/0x520 net/ipv4/ip_output.c:405 dst_output include/net/dst.h:459 [inline] ip_local_out+0x94/0x170 net/ipv4/ip_output.c:124 ip_queue_xmit+0x7fc/0x1a50 net/ipv4/ip_output.c:504 __tcp_transmit_skb+0x182e/0x2ce0 net/ipv4/tcp_output.c:1130 tcp_transmit_skb net/ipv4/tcp_output.c:1146 [inline] tcp_write_xmit+0x5e4/0x48e0 net/ipv4/tcp_output.c:2352 __tcp_push_pending_frames+0x9d/0x250 net/ipv4/tcp_output.c:2529 tcp_push+0x3f3/0x5d0 net/ipv4/tcp.c:715 tcp_sendmsg_locked+0x2631/0x3250 net/ipv4/tcp.c:1409 tcp_sendmsg+0x2a/0x40 net/ipv4/tcp.c:1446 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 sock_write_iter+0x209/0x350 net/socket.c:924 call_write_iter include/linux/fs.h:1782 [inline] new_sync_write fs/read_write.c:471 [inline] __vfs_write+0x417/0x5c0 fs/read_write.c:484 vfs_write+0x17f/0x4d0 fs/read_write.c:546 SYSC_write fs/read_write.c:593 [inline] SyS_write+0xc2/0x1a0 fs/read_write.c:585 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 ffff8801c521a140 which belongs to the cache skbuff_head_cache of size 224 The buggy address is located 88 bytes to the right of 224-byte region [ffff8801c521a140, ffff8801c521a220) The buggy address belongs to the page: page:ffffea0007148680 count:1 mapcount:0 mapping: (null) index:0x0 flags: 0x4000000000000100(slab) raw: 4000000000000100 0000000000000000 0000000000000000 00000001800c000c raw: dead000000000100 dead000000000200 ffff8801dab70200 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c521a100: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8801c521a180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801c521a200: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8801c521a280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801c521a300: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ==================================================================