md: could not open unknown-block(8,2). md: md_import_device returned -6 ================================================================== BUG: KASAN: use-after-free in hlist_add_head include/linux/list.h:704 [inline] BUG: KASAN: use-after-free in qdisc_class_hash_insert+0x269/0x280 net/sched/sch_api.c:694 Write of size 8 at addr ffff8880974113d0 by task syz-executor.4/12735 CPU: 1 PID: 12735 Comm: syz-executor.4 Not tainted 4.14.154 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x142/0x197 lib/dump_stack.c:58 print_address_description.cold+0x7c/0x1dc mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0xa9/0x2af mm/kasan/report.c:393 __asan_report_store8_noabort+0x17/0x20 mm/kasan/report.c:435 hlist_add_head include/linux/list.h:704 [inline] qdisc_class_hash_insert+0x269/0x280 net/sched/sch_api.c:694 qfq_change_class+0x8f4/0x115f net/sched/sch_qfq.c:500 tc_ctl_tclass+0x419/0xa70 net/sched/sch_api.c:1848 rtnetlink_rcv_msg+0x3eb/0xb70 net/core/rtnetlink.c:4285 netlink_rcv_skb+0x14f/0x3c0 net/netlink/af_netlink.c:2432 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:4297 netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline] netlink_unicast+0x45d/0x640 net/netlink/af_netlink.c:1312 netlink_sendmsg+0x7c4/0xc60 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xce/0x110 net/socket.c:656 ___sys_sendmsg+0x70a/0x840 net/socket.c:2062 __sys_sendmsg+0xb9/0x140 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2103 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x45a639 RSP: 002b:00007f74df34cc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f74df34cc90 RCX: 000000000045a639 RDX: 0000000000000000 RSI: 0000000020000140 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 md: could not open unknown-block(3,0). R10: 0000000000000000 R11: 0000000000000246 R12: 00007f74df34d6d4 R13: 00000000004c8b9b R14: 00000000004df1b0 R15: 0000000000000004 Allocated by task 12702: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:529 kmem_cache_alloc_trace+0x152/0x790 mm/slab.c:3618 md: md_import_device returned -6 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] qfq_change_class+0x6aa/0x115f net/sched/sch_qfq.c:475 tc_ctl_tclass+0x419/0xa70 net/sched/sch_api.c:1848 rtnetlink_rcv_msg+0x3eb/0xb70 net/core/rtnetlink.c:4285 netlink_rcv_skb+0x14f/0x3c0 net/netlink/af_netlink.c:2432 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:4297 netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline] netlink_unicast+0x45d/0x640 net/netlink/af_netlink.c:1312 netlink_sendmsg+0x7c4/0xc60 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xce/0x110 net/socket.c:656 ___sys_sendmsg+0x70a/0x840 net/socket.c:2062 __sys_sendmsg+0xb9/0x140 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2103 md: could not open unknown-block(3,0). do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 md: md_import_device returned -6 Freed by task 12702: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 qfq_change_class+0xe11/0x115f net/sched/sch_qfq.c:529 tc_ctl_tclass+0x419/0xa70 net/sched/sch_api.c:1848 rtnetlink_rcv_msg+0x3eb/0xb70 net/core/rtnetlink.c:4285 netlink_rcv_skb+0x14f/0x3c0 net/netlink/af_netlink.c:2432 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:4297 netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline] netlink_unicast+0x45d/0x640 net/netlink/af_netlink.c:1312 netlink_sendmsg+0x7c4/0xc60 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xce/0x110 net/socket.c:656 ___sys_sendmsg+0x70a/0x840 net/socket.c:2062 __sys_sendmsg+0xb9/0x140 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2103 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff8880974113c0 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 16 bytes inside of 128-byte region [ffff8880974113c0, ffff888097411440) The buggy address belongs to the page: page:ffffea00025d0440 count:1 mapcount:0 mapping:ffff888097411000 index:0x0 flags: 0x1fffc0000000100(slab) raw: 01fffc0000000100 ffff888097411000 0000000000000000 0000000100000015 raw: ffffea0001699920 ffffea0002121820 ffff8880aa800640 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888097411280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888097411300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc >ffff888097411380: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff888097411400: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888097411480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================