================================================================== 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 ffff8881c96c4c78 by task syz-executor.1/9541 CPU: 0 PID: 9541 Comm: syz-executor.1 Not tainted 4.14.142+ #0 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:1086 Allocated by task 8065: 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:2792 [inline] slab_alloc mm/slub.c:2800 [inline] kmem_cache_alloc+0xee/0x360 mm/slub.c:2805 kmem_cache_alloc_node include/linux/slab.h:361 [inline] __alloc_skb+0xea/0x5c0 net/core/skbuff.c:193 alloc_skb include/linux/skbuff.h:980 [inline] nlmsg_new include/net/netlink.h:511 [inline] netlink_ack+0x228/0x980 net/netlink/af_netlink.c:2359 netlink_rcv_skb+0x2c4/0x3a0 net/netlink/af_netlink.c:2438 genl_rcv+0x24/0x40 net/netlink/genetlink.c:636 netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline] netlink_unicast+0x478/0x650 net/netlink/af_netlink.c:1312 netlink_sendmsg+0x66a/0xbe0 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb7/0x100 net/socket.c:656 ___sys_sendmsg+0x752/0x890 net/socket.c:2062 __sys_sendmsg+0xb6/0x150 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 0xffffffffffffffff Freed by task 8077: 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:1407 [inline] slab_free_freelist_hook mm/slub.c:1458 [inline] slab_free mm/slub.c:3039 [inline] kmem_cache_free+0xd7/0x3b0 mm/slub.c:3055 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 skb_queue_purge+0x14/0x30 net/core/skbuff.c:2855 netlink_sock_destruct+0xf9/0x280 net/netlink/af_netlink.c:371 __sk_destruct+0x4c/0x5f0 net/core/sock.c:1556 sk_destruct+0x5d/0x70 net/core/sock.c:1591 __sk_free+0x4c/0x220 net/core/sock.c:1599 sk_free+0x2c/0x40 net/core/sock.c:1610 deferred_put_nlk_sk+0xee/0x260 net/netlink/af_netlink.c:711 __rcu_reclaim kernel/rcu/rcu.h:195 [inline] rcu_do_batch kernel/rcu/tree.c:2699 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2962 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2929 [inline] rcu_process_callbacks+0x59f/0xf60 kernel/rcu/tree.c:2946 __do_softirq+0x234/0x9ec kernel/softirq.c:288 The buggy address belongs to the object at ffff8881c96c4b40 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 [ffff8881c96c4b40, ffff8881c96c4c20) The buggy address belongs to the page: page:ffffea000725b100 count:1 mapcount:0 mapping: (null) index:0xffff8881c96c4b40 flags: 0x4000000000000200(slab) raw: 4000000000000200 0000000000000000 ffff8881c96c4b40 00000001800c000a raw: ffffea00074e4280 0000000200000002 ffff8881dab70200 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881c96c4b00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8881c96c4b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881c96c4c00: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8881c96c4c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881c96c4d00: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ==================================================================