================================================================== BUG: KASAN: slab-out-of-bounds in ____bpf_clone_redirect net/core/filter.c:1767 [inline] BUG: KASAN: slab-out-of-bounds in bpf_clone_redirect+0x29a/0x2b0 net/core/filter.c:1758 Read of size 8 at addr ffff8801c4ebb9d0 by task syz-executor4/22874 CPU: 0 PID: 22874 Comm: syz-executor4 Not tainted 4.14.78+ #26 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_clone_redirect net/core/filter.c:1767 [inline] bpf_clone_redirect+0x29a/0x2b0 net/core/filter.c:1758 ___bpf_prog_run+0x248e/0x5c70 kernel/bpf/core.c:1012 netlink: 17 bytes leftover after parsing attributes in process `syz-executor0'. Allocated by task 22869: 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 kmem_cache_alloc_node include/linux/slab.h:361 [inline] __alloc_skb+0xd8/0x550 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+0x2b4/0x390 net/netlink/af_netlink.c:2438 genl_rcv+0x24/0x40 net/netlink/genetlink.c:635 netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline] netlink_unicast+0x46d/0x620 net/netlink/af_netlink.c:1312 netlink_sendmsg+0x664/0xbe0 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:645 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:655 ___sys_sendmsg+0x741/0x890 net/socket.c:2061 __sys_sendmsg+0xca/0x170 net/socket.c:2095 SYSC_sendmsg net/socket.c:2106 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2102 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 7: 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 skb_queue_purge+0x14/0x30 net/core/skbuff.c:2849 netlink_sock_destruct+0xf9/0x250 net/netlink/af_netlink.c:371 __sk_destruct+0x4f/0x5a0 net/core/sock.c:1558 sk_destruct+0x5d/0x70 net/core/sock.c:1593 __sk_free+0x4a/0x220 net/core/sock.c:1601 sk_free+0x2c/0x40 net/core/sock.c:1612 deferred_put_nlk_sk+0xf1/0x260 net/netlink/af_netlink.c:711 __rcu_reclaim kernel/rcu/rcu.h:195 [inline] rcu_do_batch kernel/rcu/tree.c:2691 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2945 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2912 [inline] rcu_process_callbacks+0x54d/0xee0 kernel/rcu/tree.c:2929 __do_softirq+0x215/0x997 kernel/softirq.c:288 The buggy address belongs to the object at ffff8801c4ebb8c0 which belongs to the cache skbuff_head_cache of size 224 The buggy address is located 48 bytes to the right of 224-byte region [ffff8801c4ebb8c0, ffff8801c4ebb9a0) The buggy address belongs to the page: page:ffffea000713aec0 count:1 mapcount:0 mapping: (null) index:0xffff8801c4ebb280 flags: 0x4000000000000100(slab) raw: 4000000000000100 0000000000000000 ffff8801c4ebb280 00000001800c0009 raw: ffffea00071d8680 0000000a0000000a ffff8801dab70200 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c4ebb880: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8801c4ebb900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801c4ebb980: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8801c4ebba00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801c4ebba80: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ==================================================================