================================================================== BUG: KASAN: use-after-free in hlist_add_head include/linux/list.h:787 [inline] BUG: KASAN: use-after-free in qdisc_class_hash_insert+0x106/0x1d0 net/sched/sch_api.c:720 Write of size 8 at addr ffff888098884e10 by task syz-executor061/8104 CPU: 1 PID: 8104 Comm: syz-executor061 Not tainted 5.4.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+0x1fb/0x318 lib/dump_stack.c:118 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_store8_noabort+0x17/0x20 mm/kasan/generic_report.c:137 hlist_add_head include/linux/list.h:787 [inline] qdisc_class_hash_insert+0x106/0x1d0 net/sched/sch_api.c:720 qfq_change_class+0x8ba/0x1c50 net/sched/sch_qfq.c:489 tc_ctl_tclass+0x7f1/0xea0 net/sched/sch_api.c:2080 rtnetlink_rcv_msg+0x889/0xd40 net/core/rtnetlink.c:5245 netlink_rcv_skb+0x19e/0x3d0 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5263 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x787/0x8f0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x994/0xc50 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:638 [inline] sock_sendmsg net/socket.c:658 [inline] ___sys_sendmsg+0x60d/0x910 net/socket.c:2312 __sys_sendmmsg+0x239/0x470 net/socket.c:2414 __do_sys_sendmmsg net/socket.c:2443 [inline] __se_sys_sendmmsg net/socket.c:2440 [inline] __x64_sys_sendmmsg+0xa0/0xb0 net/socket.c:2440 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x447589 Code: e8 0c e8 ff ff 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 8b cd fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffcec769358 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000447589 RDX: 0000000004924b68 RSI: 0000000020000140 RDI: 0000000000000006 RBP: 0000000000012fba R08: 0000000000000001 R09: 0000000000400037 R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffff R13: 0000000000000007 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 8091: 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 kmem_cache_alloc_trace+0x221/0x2f0 mm/slab.c:3550 kmalloc include/linux/slab.h:556 [inline] kzalloc include/linux/slab.h:690 [inline] qfq_change_class+0x4d4/0x1c50 net/sched/sch_qfq.c:464 tc_ctl_tclass+0x7f1/0xea0 net/sched/sch_api.c:2080 rtnetlink_rcv_msg+0x889/0xd40 net/core/rtnetlink.c:5245 netlink_rcv_skb+0x19e/0x3d0 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5263 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x787/0x8f0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x994/0xc50 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:638 [inline] sock_sendmsg net/socket.c:658 [inline] ___sys_sendmsg+0x60d/0x910 net/socket.c:2312 __sys_sendmmsg+0x239/0x470 net/socket.c:2414 __do_sys_sendmmsg net/socket.c:2443 [inline] __se_sys_sendmmsg net/socket.c:2440 [inline] __x64_sys_sendmmsg+0xa0/0xb0 net/socket.c:2440 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8091: 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 qfq_change_class+0xc53/0x1c50 net/sched/sch_qfq.c:518 tc_ctl_tclass+0x7f1/0xea0 net/sched/sch_api.c:2080 rtnetlink_rcv_msg+0x889/0xd40 net/core/rtnetlink.c:5245 netlink_rcv_skb+0x19e/0x3d0 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5263 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x787/0x8f0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x994/0xc50 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:638 [inline] sock_sendmsg net/socket.c:658 [inline] ___sys_sendmsg+0x60d/0x910 net/socket.c:2312 __sys_sendmmsg+0x239/0x470 net/socket.c:2414 __do_sys_sendmmsg net/socket.c:2443 [inline] __se_sys_sendmmsg net/socket.c:2440 [inline] __x64_sys_sendmmsg+0xa0/0xb0 net/socket.c:2440 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 ffff888098884e00 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 16 bytes inside of 128-byte region [ffff888098884e00, ffff888098884e80) The buggy address belongs to the page: page:ffffea0002622100 refcount:1 mapcount:0 mapping:ffff8880aa400700 index:0x0 raw: 01fffc0000000200 ffffea00029df388 ffffea00023302c8 ffff8880aa400700 raw: 0000000000000000 ffff888098884000 0000000100000010 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888098884d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc ffff888098884d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888098884e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888098884e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888098884f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc ==================================================================