netlink: 32 bytes leftover after parsing attributes in process `syz-executor793'. ================================================================== BUG: KASAN: use-after-free in tcf_action_destroy+0x188/0x1b0 net/sched/act_api.c:724 Read of size 8 at addr ffff8880a73a4800 by task syz-executor793/6828 CPU: 0 PID: 6828 Comm: syz-executor793 Not tainted 5.9.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+0x198/0x1fd lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x497 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 tcf_action_destroy+0x188/0x1b0 net/sched/act_api.c:724 tcf_action_init+0x285/0x380 net/sched/act_api.c:1058 tcf_action_add+0xd9/0x360 net/sched/act_api.c:1451 tc_ctl_action+0x33a/0x439 net/sched/act_api.c:1504 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5563 netlink_rcv_skb+0x15a/0x430 net/netlink/af_netlink.c:2470 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:671 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2353 ___sys_sendmsg+0xf3/0x170 net/socket.c:2407 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2440 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x445d79 Code: e8 bc b7 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 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 ab 11 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f152bcf3d98 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00000000006dac28 RCX: 0000000000445d79 RDX: 0000000000000000 RSI: 0000000020002980 RDI: 0000000000000003 RBP: 00000000006dac20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dac2c R13: 0001008400000000 R14: 0000000000000000 R15: 053b003000000098 Allocated by task 6828: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:461 __do_kmalloc mm/slab.c:3655 [inline] __kmalloc+0x1b0/0x310 mm/slab.c:3664 kmalloc include/linux/slab.h:559 [inline] kzalloc include/linux/slab.h:666 [inline] tcf_idr_create+0x5b/0x7b0 net/sched/act_api.c:408 tcf_connmark_init+0x535/0x960 net/sched/act_connmark.c:126 tcf_action_init_1+0x6a5/0xac0 net/sched/act_api.c:984 tcf_action_init+0x249/0x380 net/sched/act_api.c:1043 tcf_action_add+0xd9/0x360 net/sched/act_api.c:1451 tc_ctl_action+0x33a/0x439 net/sched/act_api.c:1504 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5563 netlink_rcv_skb+0x15a/0x430 net/netlink/af_netlink.c:2470 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:671 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2353 ___sys_sendmsg+0xf3/0x170 net/socket.c:2407 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2440 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 6830: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track+0x1c/0x30 mm/kasan/common.c:56 kasan_set_free_info+0x1b/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0xd8/0x120 mm/kasan/common.c:422 __cache_free mm/slab.c:3418 [inline] kfree+0x10e/0x2b0 mm/slab.c:3756 tcf_idr_release_unsafe net/sched/act_api.c:284 [inline] tcf_del_walker net/sched/act_api.c:310 [inline] tcf_generic_walker+0x959/0xb60 net/sched/act_api.c:339 tca_action_flush+0x42b/0x920 net/sched/act_api.c:1278 tca_action_gd+0x8ac/0xda0 net/sched/act_api.c:1385 tc_ctl_action+0x280/0x439 net/sched/act_api.c:1512 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5563 netlink_rcv_skb+0x15a/0x430 net/netlink/af_netlink.c:2470 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:671 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2353 ___sys_sendmsg+0xf3/0x170 net/socket.c:2407 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2440 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff8880a73a4800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of 512-byte region [ffff8880a73a4800, ffff8880a73a4a00) The buggy address belongs to the page: page:00000000b3316a5a refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880a73a4000 pfn:0xa73a4 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea0002506248 ffffea0002a386c8 ffff8880aa040600 raw: ffff8880a73a4000 ffff8880a73a4000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a73a4700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a73a4780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a73a4800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a73a4880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a73a4900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================