netlink: 8 bytes leftover after parsing attributes in process `syz-executor5'. ================================================================== BUG: KASAN: use-after-free in ____bpf_clone_redirect net/core/filter.c:1767 [inline] BUG: KASAN: use-after-free in bpf_clone_redirect+0x29a/0x2b0 net/core/filter.c:1758 Read of size 8 at addr ffff8801c5fa7590 by task syz-executor0/7237 CPU: 1 PID: 7237 Comm: syz-executor0 Not tainted 4.14.73+ #12 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 Allocated by task 7229: 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 __build_skb+0x30/0x2c0 net/core/skbuff.c:281 netlink_alloc_large_skb net/netlink/af_netlink.c:1167 [inline] netlink_sendmsg+0x457/0xbe0 net/netlink/af_netlink.c:1852 sock_sendmsg_nosec net/socket.c:645 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:655 sock_no_sendpage+0x131/0x1a0 net/core/sock.c:2566 kernel_sendpage+0x80/0xd0 net/socket.c:3409 sock_sendpage+0x82/0xa0 net/socket.c:870 pipe_to_sendpage+0x244/0x300 fs/splice.c:451 splice_from_pipe_feed fs/splice.c:502 [inline] __splice_from_pipe+0x324/0x740 fs/splice.c:626 splice_from_pipe+0xcf/0x130 fs/splice.c:661 do_splice_from fs/splice.c:851 [inline] direct_splice_actor+0x116/0x160 fs/splice.c:1018 splice_direct_to_actor+0x28c/0x750 fs/splice.c:973 do_splice_direct+0x17b/0x220 fs/splice.c:1061 do_sendfile+0x4a1/0xb50 fs/read_write.c:1438 SYSC_sendfile64 fs/read_write.c:1493 [inline] SyS_sendfile64+0xab/0x140 fs/read_write.c:1485 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 7229: 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 netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline] netlink_unicast+0x475/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 sock_no_sendpage+0x131/0x1a0 net/core/sock.c:2566 kernel_sendpage+0x80/0xd0 net/socket.c:3409 sock_sendpage+0x82/0xa0 net/socket.c:870 pipe_to_sendpage+0x244/0x300 fs/splice.c:451 splice_from_pipe_feed fs/splice.c:502 [inline] __splice_from_pipe+0x324/0x740 fs/splice.c:626 splice_from_pipe+0xcf/0x130 fs/splice.c:661 do_splice_from fs/splice.c:851 [inline] direct_splice_actor+0x116/0x160 fs/splice.c:1018 splice_direct_to_actor+0x28c/0x750 fs/splice.c:973 do_splice_direct+0x17b/0x220 fs/splice.c:1061 do_sendfile+0x4a1/0xb50 fs/read_write.c:1438 SYSC_sendfile64 fs/read_write.c:1493 [inline] SyS_sendfile64+0xab/0x140 fs/read_write.c:1485 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 ffff8801c5fa7500 which belongs to the cache skbuff_head_cache of size 224 The buggy address is located 144 bytes inside of 224-byte region [ffff8801c5fa7500, ffff8801c5fa75e0) The buggy address belongs to the page: page:ffffea000717e9c0 count:1 mapcount:0 mapping: (null) index:0x0 flags: 0x4000000000000100(slab) raw: 4000000000000100 0000000000000000 0000000000000000 00000001800c000c raw: ffffea00071f4bc0 0000000800000008 ffff8801dab70200 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c5fa7480: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ffff8801c5fa7500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801c5fa7580: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ^ ffff8801c5fa7600: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8801c5fa7680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================