audit: type=1400 audit(1565388000.554:8): avc: denied { prog_load } for pid=1776 comm="syz-executor919" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=bpf permissive=1 ================================================================== audit: type=1400 audit(1565388000.604:9): avc: denied { prog_run } for pid=1776 comm="syz-executor919" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=bpf permissive=1 BUG: KASAN: slab-out-of-bounds in bpf_skb_proto_xlat net/core/filter.c:2151 [inline] BUG: KASAN: slab-out-of-bounds in ____bpf_skb_change_proto net/core/filter.c:2189 [inline] BUG: KASAN: slab-out-of-bounds in bpf_skb_change_proto+0xcc2/0x1080 net/core/filter.c:2164 Read of size 2 at addr ffff8881d7236638 by task syz-executor919/1776 CPU: 0 PID: 1776 Comm: syz-executor919 Not tainted 4.14.138+ #30 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xca/0x134 lib/dump_stack.c:53 print_address_description+0x60/0x226 mm/kasan/report.c:187 __kasan_report.cold+0x1a/0x41 mm/kasan/report.c:316 bpf_skb_proto_xlat net/core/filter.c:2151 [inline] ____bpf_skb_change_proto net/core/filter.c:2189 [inline] bpf_skb_change_proto+0xcc2/0x1080 net/core/filter.c:2164 ___bpf_prog_run+0x2478/0x5510 kernel/bpf/core.c:1033 Allocated by task 1774: save_stack mm/kasan/common.c:76 [inline] set_track mm/kasan/common.c:85 [inline] __kasan_kmalloc.part.0+0x53/0xc0 mm/kasan/common.c:495 slab_post_alloc_hook mm/slab.h:439 [inline] slab_alloc_node mm/slub.c:2758 [inline] slab_alloc mm/slub.c:2766 [inline] kmem_cache_alloc+0xd2/0x2e0 mm/slub.c:2771 skb_clone+0x124/0x370 net/core/skbuff.c:1282 dev_queue_xmit_nit+0x2f3/0x970 net/core/dev.c:1943 xmit_one net/core/dev.c:3005 [inline] dev_hard_start_xmit+0xa3/0x8c0 net/core/dev.c:3025 sch_direct_xmit+0x27a/0x520 net/sched/sch_generic.c:186 __dev_xmit_skb net/core/dev.c:3218 [inline] __dev_queue_xmit+0x1594/0x1d00 net/core/dev.c:3493 neigh_hh_output include/net/neighbour.h:490 [inline] neigh_output include/net/neighbour.h:498 [inline] ip_finish_output2+0x9fe/0x12f0 net/ipv4/ip_output.c:229 ip_finish_output+0x3be/0xc80 net/ipv4/ip_output.c:317 NF_HOOK_COND include/linux/netfilter.h:239 [inline] ip_output+0x1cf/0x520 net/ipv4/ip_output.c:405 dst_output include/net/dst.h:462 [inline] ip_local_out+0x98/0x170 net/ipv4/ip_output.c:124 ip_queue_xmit+0x7ca/0x1a70 net/ipv4/ip_output.c:504 __tcp_transmit_skb+0x18bc/0x2e20 net/ipv4/tcp_output.c:1130 tcp_transmit_skb net/ipv4/tcp_output.c:1146 [inline] tcp_write_xmit+0x510/0x4680 net/ipv4/tcp_output.c:2381 __tcp_push_pending_frames+0xa0/0x230 net/ipv4/tcp_output.c:2562 tcp_push+0x402/0x600 net/ipv4/tcp.c:715 tcp_sendmsg_locked+0x2684/0x31e0 net/ipv4/tcp.c:1409 tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1446 inet_sendmsg+0x15b/0x520 net/ipv4/af_inet.c:760 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb7/0x100 net/socket.c:656 sock_write_iter+0x20f/0x360 net/socket.c:925 call_write_iter include/linux/fs.h:1788 [inline] new_sync_write fs/read_write.c:471 [inline] __vfs_write+0x401/0x5a0 fs/read_write.c:484 vfs_write+0x17f/0x4d0 fs/read_write.c:546 SYSC_write fs/read_write.c:594 [inline] SyS_write+0x102/0x250 fs/read_write.c:586 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 0xffffffffffffffff Freed by task 1774: save_stack mm/kasan/common.c:76 [inline] set_track mm/kasan/common.c:85 [inline] __kasan_slab_free+0x164/0x210 mm/kasan/common.c:457 slab_free_hook mm/slub.c:1403 [inline] slab_free_freelist_hook mm/slub.c:1430 [inline] slab_free mm/slub.c:3005 [inline] kmem_cache_free+0xcb/0x340 mm/slub.c:3021 kfree_skbmem net/core/skbuff.c:586 [inline] kfree_skbmem+0xa0/0x110 net/core/skbuff.c:580 __kfree_skb net/core/skbuff.c:646 [inline] kfree_skb+0xeb/0x370 net/core/skbuff.c:663 packet_rcv_spkt+0xd5/0x4d0 net/packet/af_packet.c:1888 dev_queue_xmit_nit+0x6e1/0x970 net/core/dev.c:1975 xmit_one net/core/dev.c:3005 [inline] dev_hard_start_xmit+0xa3/0x8c0 net/core/dev.c:3025 sch_direct_xmit+0x27a/0x520 net/sched/sch_generic.c:186 __dev_xmit_skb net/core/dev.c:3218 [inline] __dev_queue_xmit+0x1594/0x1d00 net/core/dev.c:3493 neigh_hh_output include/net/neighbour.h:490 [inline] neigh_output include/net/neighbour.h:498 [inline] ip_finish_output2+0x9fe/0x12f0 net/ipv4/ip_output.c:229 ip_finish_output+0x3be/0xc80 net/ipv4/ip_output.c:317 NF_HOOK_COND include/linux/netfilter.h:239 [inline] ip_output+0x1cf/0x520 net/ipv4/ip_output.c:405 dst_output include/net/dst.h:462 [inline] ip_local_out+0x98/0x170 net/ipv4/ip_output.c:124 ip_queue_xmit+0x7ca/0x1a70 net/ipv4/ip_output.c:504 __tcp_transmit_skb+0x18bc/0x2e20 net/ipv4/tcp_output.c:1130 tcp_transmit_skb net/ipv4/tcp_output.c:1146 [inline] tcp_write_xmit+0x510/0x4680 net/ipv4/tcp_output.c:2381 __tcp_push_pending_frames+0xa0/0x230 net/ipv4/tcp_output.c:2562 tcp_push+0x402/0x600 net/ipv4/tcp.c:715 tcp_sendmsg_locked+0x2684/0x31e0 net/ipv4/tcp.c:1409 tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1446 inet_sendmsg+0x15b/0x520 net/ipv4/af_inet.c:760 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb7/0x100 net/socket.c:656 sock_write_iter+0x20f/0x360 net/socket.c:925 call_write_iter include/linux/fs.h:1788 [inline] new_sync_write fs/read_write.c:471 [inline] __vfs_write+0x401/0x5a0 fs/read_write.c:484 vfs_write+0x17f/0x4d0 fs/read_write.c:546 SYSC_write fs/read_write.c:594 [inline] SyS_write+0x102/0x250 fs/read_write.c:586 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 0xffffffffffffffff The buggy address belongs to the object at ffff8881d7236500 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 [ffff8881d7236500, ffff8881d72365e0) The buggy address belongs to the page: page:ffffea00075c8d80 count:1 mapcount:0 mapping: (null) index:0x0 flags: 0x4000000000000200(slab) raw: 4000000000000200 0000000000000000 0000000000000000 00000001800c000c raw: dead000000000100 dead000000000200 ffff8881dab70200 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881d7236500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881d7236580: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc >ffff8881d7236600: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff8881d7236680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881d7236700: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================