netlink: 32 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 32 bytes leftover after parsing attributes in process `syz-executor.5'. netlink: 32 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 32 bytes leftover after parsing attributes in process `syz-executor.1'. ================================================================== BUG: KASAN: use-after-free in tcf_action_destroy+0x139/0x160 net/sched/act_api.c:614 Read of size 8 at addr ffff8800958c1410 by task syz-executor.2/10957 CPU: 1 PID: 10957 Comm: syz-executor.2 Not tainted 4.18.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x15a/0x20d lib/dump_stack.c:113 print_address_description.cold.6+0x9/0x211 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x307 mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 tcf_action_destroy+0x139/0x160 net/sched/act_api.c:614 tcf_action_init+0x42d/0x5c0 net/sched/act_api.c:885 tcf_action_add net/sched/act_api.c:1250 [inline] tc_ctl_action+0x375/0x63d net/sched/act_api.c:1299 rtnetlink_rcv_msg+0x34f/0x950 net/core/rtnetlink.c:4665 netlink_rcv_skb+0x142/0x390 net/netlink/af_netlink.c:2448 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4683 netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline] netlink_unicast+0x443/0x660 net/netlink/af_netlink.c:1336 netlink_sendmsg+0x666/0xc50 net/netlink/af_netlink.c:1901 sock_sendmsg_nosec net/socket.c:641 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:651 ___sys_sendmsg+0x647/0x950 net/socket.c:2125 __sys_sendmsg+0xd9/0x180 net/socket.c:2163 __do_sys_sendmsg net/socket.c:2172 [inline] __se_sys_sendmsg net/socket.c:2170 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2170 do_syscall_64+0xd0/0x4d0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45d5f9 Code: 5d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 2b b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f9abceb5c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000002cf40 RCX: 000000000045d5f9 RDX: 0000000000000000 RSI: 0000000020002980 RDI: 0000000000000003 RBP: 000000000118cf80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118cf4c R13: 00007ffd28470f8f R14: 00007f9abceb69c0 R15: 000000000118cf4c Allocated by task 10957: save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc.part.1+0x62/0xf0 mm/kasan/kasan.c:553 kasan_kmalloc+0xaf/0xc0 mm/kasan/kasan.c:538 __do_kmalloc mm/slab.c:3718 [inline] __kmalloc+0x151/0x400 mm/slab.c:3727 kmalloc include/linux/slab.h:518 [inline] kzalloc include/linux/slab.h:707 [inline] tcf_idr_create+0xaf/0x720 net/sched/act_api.c:372 tcf_connmark_init+0x3db/0x6e0 net/sched/act_connmark.c:122 tcf_action_init_1+0x657/0xb30 net/sched/act_api.c:796 tcf_action_init+0x189/0x5c0 net/sched/act_api.c:865 tcf_action_add net/sched/act_api.c:1250 [inline] tc_ctl_action+0x375/0x63d net/sched/act_api.c:1299 rtnetlink_rcv_msg+0x34f/0x950 net/core/rtnetlink.c:4665 netlink_rcv_skb+0x142/0x390 net/netlink/af_netlink.c:2448 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4683 netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline] netlink_unicast+0x443/0x660 net/netlink/af_netlink.c:1336 netlink_sendmsg+0x666/0xc50 net/netlink/af_netlink.c:1901 sock_sendmsg_nosec net/socket.c:641 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:651 ___sys_sendmsg+0x647/0x950 net/socket.c:2125 __sys_sendmsg+0xd9/0x180 net/socket.c:2163 __do_sys_sendmsg net/socket.c:2172 [inline] __se_sys_sendmsg net/socket.c:2170 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2170 do_syscall_64+0xd0/0x4d0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 10969: save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x13c/0x220 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xcf/0x280 mm/slab.c:3813 free_tcf net/sched/act_api.c:90 [inline] tcf_action_cleanup+0x110/0x150 net/sched/act_api.c:99 __tcf_action_put+0xbe/0x100 net/sched/act_api.c:112 __tcf_idr_release+0x6a/0x90 net/sched/act_api.c:142 tcf_del_walker net/sched/act_api.c:261 [inline] tcf_generic_walker+0x588/0x950 net/sched/act_api.c:287 tcf_connmark_walker+0x113/0x1d0 net/sched/act_connmark.c:186 tca_action_flush.isra.11+0x424/0xaf0 net/sched/act_api.c:1078 tca_action_gd+0x5aa/0xe70 net/sched/act_api.c:1184 tc_ctl_action+0x4cf/0x63d net/sched/act_api.c:1309 rtnetlink_rcv_msg+0x34f/0x950 net/core/rtnetlink.c:4665 netlink_rcv_skb+0x142/0x390 net/netlink/af_netlink.c:2448 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4683 netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline] netlink_unicast+0x443/0x660 net/netlink/af_netlink.c:1336 netlink_sendmsg+0x666/0xc50 net/netlink/af_netlink.c:1901 sock_sendmsg_nosec net/socket.c:641 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:651 ___sys_sendmsg+0x647/0x950 net/socket.c:2125 __sys_sendmsg+0xd9/0x180 net/socket.c:2163 __do_sys_sendmsg net/socket.c:2172 [inline] __se_sys_sendmsg net/socket.c:2170 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2170 do_syscall_64+0xd0/0x4d0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8800958c1400 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 16 bytes inside of 256-byte region [ffff8800958c1400, ffff8800958c1500) The buggy address belongs to the page: page:ffffea0002563040 count:1 mapcount:0 mapping:ffff8800aa8007c0 index:0xffff8800958c1e00 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffffea0002540b08 ffffea000250b308 ffff8800aa8007c0 raw: ffff8800958c1e00 ffff8800958c1040 0000000100000007 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8800958c1300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8800958c1380: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8800958c1400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8800958c1480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8800958c1500: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ==================================================================