netlink: 32 bytes leftover after parsing attributes in process `syz-executor.4'. ================================================================== BUG: KASAN: use-after-free in tcf_action_destroy+0x188/0x1b0 net/sched/act_api.c:724 Read of size 8 at addr ffff88808fa40c00 by task syz-executor.4/2275 CPU: 0 PID: 2275 Comm: syz-executor.4 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+0x29c/0x3d0 net/sched/act_api.c:1059 tcf_action_add+0xd9/0x360 net/sched/act_api.c:1452 tc_ctl_action+0x33a/0x439 net/sched/act_api.c:1505 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: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:00007f57fd3c2c78 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: 00007fff8adabb4f R14: 00007f57fd3c39c0 R15: 000000000118cf4c Allocated by task 2275: 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/0x360 mm/slab.c:3664 kmalloc include/linux/slab.h:559 [inline] kzalloc include/linux/slab.h:666 [inline] tcf_idr_create+0x5b/0x800 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+0x260/0x3d0 net/sched/act_api.c:1044 tcf_action_add+0xd9/0x360 net/sched/act_api.c:1452 tc_ctl_action+0x33a/0x439 net/sched/act_api.c:1505 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 2278: 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:1279 tca_action_gd+0x8c9/0xe20 net/sched/act_api.c:1386 tc_ctl_action+0x280/0x439 net/sched/act_api.c:1513 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 ffff88808fa40c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of 512-byte region [ffff88808fa40c00, ffff88808fa40e00) The buggy address belongs to the page: page:00000000725df33a refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x8fa40 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea0002596c88 ffffea00024e3248 ffff8880aa040600 raw: 0000000000000000 ffff88808fa40000 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808fa40b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808fa40b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88808fa40c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88808fa40c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808fa40d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================