netlink: 'syz-executor909': attribute type 2 has an invalid length. netlink: 'syz-executor909': attribute type 2 has an invalid length. ================================================================== BUG: KASAN: slab-out-of-bounds in tcf_exts_destroy+0xb3/0xd0 net/sched/cls_api.c:2927 Read of size 8 at addr ffff8880a1c9a990 by task syz-executor909/8863 CPU: 0 PID: 8863 Comm: syz-executor909 Not tainted 5.4.0-rc3-next-20191017 #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+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:634 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 tcf_exts_destroy+0xb3/0xd0 net/sched/cls_api.c:2927 tcindex_free_perfect_hash.isra.0+0xb3/0x150 net/sched/cls_tcindex.c:273 tcindex_set_parms+0x1107/0x1e50 net/sched/cls_tcindex.c:484 tcindex_change+0x230/0x320 net/sched/cls_tcindex.c:519 tc_new_tfilter+0xbc4/0x1ee0 net/sched/cls_api.c:2037 rtnetlink_rcv_msg+0x824/0xaf0 net/core/rtnetlink.c:5377 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5404 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x531/0x710 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x8cf/0xd90 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:638 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:658 ___sys_sendmsg+0x3e2/0x920 net/socket.c:2312 __sys_sendmmsg+0x1bf/0x4d0 net/socket.c:2414 __do_sys_sendmmsg net/socket.c:2443 [inline] __se_sys_sendmmsg net/socket.c:2440 [inline] __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2440 do_syscall_64+0xfa/0x760 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:00007fff3fc006e8 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 8863: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc mm/kasan/common.c:510 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:483 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:524 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc+0x163/0x770 mm/slab.c:3665 kmalloc_array include/linux/slab.h:598 [inline] kcalloc include/linux/slab.h:609 [inline] tcindex_alloc_perfect_hash+0x5a/0x320 net/sched/cls_tcindex.c:281 tcindex_set_parms+0x454/0x1e50 net/sched/cls_tcindex.c:339 tcindex_change+0x230/0x320 net/sched/cls_tcindex.c:519 tc_new_tfilter+0xbc4/0x1ee0 net/sched/cls_api.c:2037 rtnetlink_rcv_msg+0x824/0xaf0 net/core/rtnetlink.c:5377 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5404 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x531/0x710 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x8cf/0xd90 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:638 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:658 ___sys_sendmsg+0x3e2/0x920 net/socket.c:2312 __sys_sendmmsg+0x1bf/0x4d0 net/socket.c:2414 __do_sys_sendmmsg net/socket.c:2443 [inline] __se_sys_sendmmsg net/socket.c:2440 [inline] __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2440 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 0: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] kasan_set_free_info mm/kasan/common.c:332 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:471 kasan_slab_free+0xe/0x10 mm/kasan/common.c:480 __cache_free mm/slab.c:3426 [inline] kfree+0x10a/0x2c0 mm/slab.c:3757 bio_free+0x2f1/0x420 block/bio.c:258 bio_put+0xda/0x110 block/bio.c:549 bio_map_kern_endio+0x16/0x20 block/bio.c:1450 bio_endio+0x609/0xaf0 block/bio.c:1818 req_bio_endio block/blk-core.c:271 [inline] blk_update_request+0x49e/0x10d0 block/blk-core.c:1491 scsi_end_request+0x7f/0x830 drivers/scsi/scsi_lib.c:579 scsi_io_completion+0x20a/0x1420 drivers/scsi/scsi_lib.c:963 scsi_finish_command+0x3b7/0x670 drivers/scsi/scsi.c:228 scsi_softirq_done+0x326/0x3b0 drivers/scsi/scsi_lib.c:1477 blk_done_softirq+0x2fe/0x4d0 block/blk-softirq.c:37 __do_softirq+0x262/0x98c kernel/softirq.c:292 The buggy address belongs to the object at ffff8880a1c9a900 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 144 bytes inside of 192-byte region [ffff8880a1c9a900, ffff8880a1c9a9c0) The buggy address belongs to the page: page:ffffea0002872680 refcount:1 mapcount:0 mapping:ffff8880aa400000 index:0x0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea0002876dc8 ffffea0002877948 ffff8880aa400000 raw: 0000000000000000 ffff8880a1c9a000 0000000100000010 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a1c9a880: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a1c9a900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880a1c9a980: 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880a1c9aa00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a1c9aa80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================