================================================================== BUG: KASAN: use-after-free in tcindex_set_parms+0x1690/0x1b90 net/sched/cls_tcindex.c:455 Write of size 16 at addr ffff888096f7dc30 by task syz-executor.1/8580 CPU: 0 PID: 8580 Comm: syz-executor.1 Not tainted 5.5.0-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+0x128/0x182 lib/dump_stack.c:118 print_address_description.constprop.8.cold.10+0x9/0x317 mm/kasan/report.c:374 __kasan_report.cold.11+0x1c/0x34 mm/kasan/report.c:506 kasan_report+0xe/0x20 mm/kasan/common.c:639 tcindex_set_parms+0x1690/0x1b90 net/sched/cls_tcindex.c:455 tcindex_change+0x1c2/0x280 net/sched/cls_tcindex.c:519 tc_new_tfilter+0xffa/0x1da0 net/sched/cls_api.c:2103 rtnetlink_rcv_msg+0x60c/0x8c0 net/core/rtnetlink.c:5429 netlink_rcv_skb+0x119/0x340 net/netlink/af_netlink.c:2477 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x434/0x630 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x714/0xc60 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xac/0xe0 net/socket.c:672 ____sys_sendmsg+0x54e/0x750 net/socket.c:2343 ___sys_sendmsg+0xe4/0x160 net/socket.c:2397 __sys_sendmsg+0xce/0x170 net/socket.c:2430 do_syscall_64+0xc6/0x5e0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45c849 Code: ad b6 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f2e88624c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f2e886256d4 RCX: 000000000045c849 RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000003 RBP: 000000000076c040 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000009fa R14: 00000000004ccb28 R15: 000000000076c04c Allocated by task 8446: save_stack+0x19/0x80 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc.constprop.17+0xc1/0xd0 mm/kasan/common.c:513 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc+0x164/0x7b0 mm/slab.c:3665 kmalloc include/linux/slab.h:561 [inline] kzalloc include/linux/slab.h:670 [inline] lsm_cred_alloc security/security.c:532 [inline] security_prepare_creds+0xbf/0x140 security/security.c:1586 prepare_kernel_cred+0x3a2/0x630 kernel/cred.c:718 call_usermodehelper_exec_async+0xa5/0x680 kernel/umh.c:85 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Freed by task 8458: save_stack+0x19/0x80 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:335 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/common.c:474 __cache_free mm/slab.c:3426 [inline] kfree+0x107/0x2b0 mm/slab.c:3757 security_cred_free+0xa2/0x100 security/security.c:1580 put_cred_rcu+0xe6/0x430 kernel/cred.c:114 rcu_do_batch kernel/rcu/tree.c:2186 [inline] rcu_core+0x584/0x1290 kernel/rcu/tree.c:2410 __do_softirq+0x26e/0x9b2 kernel/softirq.c:292 The buggy address belongs to the object at ffff888096f7dc00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 48 bytes inside of 192-byte region [ffff888096f7dc00, ffff888096f7dcc0) The buggy address belongs to the page: page:ffffea00025bdf40 refcount:1 mapcount:0 mapping:ffff8880aa400000 index:0xffff888096f7dd00 raw: 00fffe0000000200 ffffea000280b948 ffffea00026706c8 ffff8880aa400000 raw: ffff888096f7dd00 ffff888096f7d000 000000010000000b 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888096f7db00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888096f7db80: 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888096f7dc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888096f7dc80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888096f7dd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================