netlink: 'syz-executor626': attribute type 2 has an invalid length. netlink: 'syz-executor626': attribute type 2 has an invalid length. ================================================================== BUG: KASAN: slab-out-of-bounds in tcf_exts_destroy+0x39/0xb0 net/sched/cls_api.c:2897 Read of size 8 at addr ffff888095066790 by task syz-executor626/7958 CPU: 1 PID: 7958 Comm: syz-executor626 Not tainted 5.4.0-rc2+ #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+0x1d8/0x2f8 lib/dump_stack.c:113 print_address_description+0x75/0x5c0 mm/kasan/report.c:374 __kasan_report+0x14b/0x1c0 mm/kasan/report.c:506 kasan_report+0x26/0x50 mm/kasan/common.c:634 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 tcf_exts_destroy+0x39/0xb0 net/sched/cls_api.c:2897 tcindex_free_perfect_hash net/sched/cls_tcindex.c:273 [inline] tcindex_set_parms net/sched/cls_tcindex.c:484 [inline] tcindex_change+0x1121/0x2680 net/sched/cls_tcindex.c:519 tc_new_tfilter+0x151c/0x27b0 net/sched/cls_api.c:2019 rtnetlink_rcv_msg+0x8fb/0xd40 net/core/rtnetlink.c:5214 netlink_rcv_skb+0x19e/0x3d0 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5241 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x787/0x8f0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x993/0xc50 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg net/socket.c:657 [inline] ___sys_sendmsg+0x60d/0x910 net/socket.c:2311 __sys_sendmmsg+0x239/0x470 net/socket.c:2413 __do_sys_sendmmsg net/socket.c:2442 [inline] __se_sys_sendmmsg net/socket.c:2439 [inline] __x64_sys_sendmmsg+0xa0/0xb0 net/socket.c:2439 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x443299 Code: e8 9c 07 03 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 3b 0a fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffcc2da8fd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000443299 RDX: 0000000000000332 RSI: 0000000020000140 RDI: 0000000000000008 RBP: 000000000000000c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0030766461746162 R13: 00000000004041f0 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 7958: save_stack mm/kasan/common.c:69 [inline] set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc+0x11c/0x1b0 mm/kasan/common.c:510 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:524 __do_kmalloc mm/slab.c:3655 [inline] __kmalloc+0x254/0x340 mm/slab.c:3664 kmalloc_array include/linux/slab.h:618 [inline] kcalloc+0x2f/0x50 include/linux/slab.h:629 tcindex_alloc_perfect_hash net/sched/cls_tcindex.c:281 [inline] tcindex_set_parms net/sched/cls_tcindex.c:339 [inline] tcindex_change+0x525/0x2680 net/sched/cls_tcindex.c:519 tc_new_tfilter+0x151c/0x27b0 net/sched/cls_api.c:2019 rtnetlink_rcv_msg+0x8fb/0xd40 net/core/rtnetlink.c:5214 netlink_rcv_skb+0x19e/0x3d0 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5241 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x787/0x8f0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x993/0xc50 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg net/socket.c:657 [inline] ___sys_sendmsg+0x60d/0x910 net/socket.c:2311 __sys_sendmmsg+0x239/0x470 net/socket.c:2413 __do_sys_sendmmsg net/socket.c:2442 [inline] __se_sys_sendmmsg net/socket.c:2439 [inline] __x64_sys_sendmmsg+0xa0/0xb0 net/socket.c:2439 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 7705: save_stack mm/kasan/common.c:69 [inline] set_track mm/kasan/common.c:77 [inline] kasan_set_free_info mm/kasan/common.c:332 [inline] __kasan_slab_free+0x12a/0x1e0 mm/kasan/common.c:471 kasan_slab_free+0xe/0x10 mm/kasan/common.c:480 __cache_free mm/slab.c:3425 [inline] kfree+0x115/0x200 mm/slab.c:3756 security_cred_free+0xcd/0x100 security/security.c:1548 put_cred_rcu+0xcf/0x360 kernel/cred.c:114 __put_cred+0x154/0x210 kernel/cred.c:148 put_cred include/linux/cred.h:287 [inline] do_faccessat+0x604/0x770 fs/open.c:439 __do_sys_access fs/open.c:450 [inline] __se_sys_access fs/open.c:448 [inline] __x64_sys_access+0x5f/0x70 fs/open.c:448 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888095066700 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 144 bytes inside of 192-byte region [ffff888095066700, ffff8880950667c0) The buggy address belongs to the page: page:ffffea0002541980 refcount:1 mapcount:0 mapping:ffff8880aa400000 index:0xffff888095066a00 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea00027e3388 ffffea00025939c8 ffff8880aa400000 raw: ffff888095066a00 ffff888095066000 0000000100000008 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888095066680: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff888095066700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888095066780: 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888095066800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888095066880: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================