RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000003 RBP: 000000000076bfc0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000007 R13: 00000000000009fa R14: 00000000004cc777 R15: 0000000000000007 ================================================================== 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+0x25e/0x270 net/sched/sch_api.c:694 Write of size 8 at addr ffff8880a9908010 by task syz-executor.0/13194 CPU: 0 PID: 13194 Comm: syz-executor.0 Not tainted 4.14.172-syzkaller #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+0x13e/0x194 lib/dump_stack.c:58 print_address_description.cold+0x7c/0x1e2 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/0x2ae mm/kasan/report.c:393 hlist_add_head include/linux/list.h:704 [inline] qdisc_class_hash_insert+0x25e/0x270 net/sched/sch_api.c:694 qfq_change_class+0x88f/0x1081 net/sched/sch_qfq.c:500 tc_ctl_tclass+0x3e2/0xa00 net/sched/sch_api.c:1848 rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4315 netlink_rcv_skb+0x127/0x370 net/netlink/af_netlink.c:2432 netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline] netlink_unicast+0x437/0x620 net/netlink/af_netlink.c:1312 netlink_sendmsg+0x733/0xbe0 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xc5/0x100 net/socket.c:656 ___sys_sendmsg+0x70a/0x840 net/socket.c:2062 __sys_sendmsg+0xa3/0x120 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x45c4a9 RSP: 002b:00007fa0715aac78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fa0715ab6d4 RCX: 000000000045c4a9 RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000003 RBP: 000000000076bfc0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000007 R13: 00000000000009fa R14: 00000000004cc777 R15: 0000000000000007 Allocated by task 13169: save_stack+0x32/0xa0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:529 kmem_cache_alloc_trace+0x14d/0x7b0 mm/slab.c:3618 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] qfq_change_class+0x64e/0x1081 net/sched/sch_qfq.c:475 tc_ctl_tclass+0x3e2/0xa00 net/sched/sch_api.c:1848 rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4315 netlink_rcv_skb+0x127/0x370 net/netlink/af_netlink.c:2432 netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline] netlink_unicast+0x437/0x620 net/netlink/af_netlink.c:1312 netlink_sendmsg+0x733/0xbe0 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xc5/0x100 net/socket.c:656 ___sys_sendmsg+0x70a/0x840 net/socket.c:2062 __sys_sendmsg+0xa3/0x120 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 13169: save_stack+0x32/0xa0 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+0xcb/0x260 mm/slab.c:3815 qfq_change_class+0xd82/0x1081 net/sched/sch_qfq.c:529 tc_ctl_tclass+0x3e2/0xa00 net/sched/sch_api.c:1848 rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4315 netlink_rcv_skb+0x127/0x370 net/netlink/af_netlink.c:2432 netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline] netlink_unicast+0x437/0x620 net/netlink/af_netlink.c:1312 netlink_sendmsg+0x733/0xbe0 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xc5/0x100 net/socket.c:656 ___sys_sendmsg+0x70a/0x840 net/socket.c:2062 __sys_sendmsg+0xa3/0x120 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff8880a9908000 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 16 bytes inside of 128-byte region [ffff8880a9908000, ffff8880a9908080) The buggy address belongs to the page: page:ffffea0002a64200 count:1 mapcount:0 mapping:ffff8880a9908000 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff8880a9908000 0000000000000000 0000000100000015 raw: ffffea0002a009a0 ffffea0001e362e0 ffff88812fe56640 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a9907f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a9907f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a9908000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a9908080: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8880a9908100: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================