syzbot


KASAN: use-after-free Read in qfq_reset_qdisc (3)

Status: auto-closed as invalid on 2021/04/05 19:15
Reported-by: syzbot+55ed1aef8f1264dc4217@syzkaller.appspotmail.com
First crash: 1235d, last: 1235d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in qfq_reset_qdisc net 5 620d 692d 0/26 auto-obsoleted due to no activity on 2022/11/11 06:00
linux-4.19 KASAN: use-after-free Read in qfq_reset_qdisc 2 1538d 1548d 0/1 auto-closed as invalid on 2020/06/06 11:35
upstream KASAN: use-after-free Read in qfq_reset_qdisc net 1 828d 828d 0/26 closed as invalid on 2022/02/17 02:00
linux-4.14 KASAN: use-after-free Read in qfq_reset_qdisc 6 1332d 1644d 0/1 auto-closed as invalid on 2020/12/30 04:03
linux-4.19 KASAN: use-after-free Read in qfq_reset_qdisc (2) 1 1366d 1366d 0/1 auto-closed as invalid on 2020/11/25 14:56

Sample crash report:
device veth0_vlan left promiscuous mode
Bluetooth: hci4: command 0x0409 tx timeout
Bluetooth: hci4: command 0x041b tx timeout
Bluetooth: hci4: command 0x040f tx timeout
==================================================================
BUG: KASAN: use-after-free in qfq_reset_qdisc+0x3b2/0x4d0 net/sched/sch_qfq.c:1468
Read of size 8 at addr ffff8880367b5d08 by task kworker/u4:2/54

CPU: 0 PID: 54 Comm: kworker/u4:2 Not tainted 4.19.161-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: netns cleanup_net
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2fe lib/dump_stack.c:118
 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256
 kasan_report_error.cold+0x8a/0x1c7 mm/kasan/report.c:354
 kasan_report mm/kasan/report.c:412 [inline]
 __asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433
 qfq_reset_qdisc+0x3b2/0x4d0 net/sched/sch_qfq.c:1468
 qdisc_destroy+0x148/0x790 net/sched/sch_generic.c:981
 dev_shutdown+0x2b2/0x48b net/sched/sch_generic.c:1321
 rollback_registered_many+0x6a4/0xe70 net/core/dev.c:8181
 unregister_netdevice_many.part.0+0x1a/0x300 net/core/dev.c:9311
 unregister_netdevice_many net/core/dev.c:9310 [inline]
 default_device_exit_batch+0x2fa/0x3c0 net/core/dev.c:9782
 ops_exit_list+0xf9/0x150 net/core/net_namespace.c:156
 cleanup_net+0x3b4/0x8b0 net/core/net_namespace.c:553
 process_one_work+0x864/0x1570 kernel/workqueue.c:2155
 worker_thread+0x64c/0x1130 kernel/workqueue.c:2298
 kthread+0x33f/0x460 kernel/kthread.c:259
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415

Allocated by task 11062:
 kmem_cache_alloc_trace+0x12f/0x380 mm/slab.c:3625
 kmalloc include/linux/slab.h:515 [inline]
 kzalloc include/linux/slab.h:709 [inline]
 qfq_change_class+0x73b/0x1790 net/sched/sch_qfq.c:476
 tc_ctl_tclass+0x501/0xcd0 net/sched/sch_api.c:1992
 rtnetlink_rcv_msg+0x453/0xb80 net/core/rtnetlink.c:4778
 netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2455
 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
 netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1344
 netlink_sendmsg+0x6bb/0xc40 net/netlink/af_netlink.c:1909
 sock_sendmsg_nosec net/socket.c:622 [inline]
 sock_sendmsg+0xc3/0x120 net/socket.c:632
 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2115
 __sys_sendmsg net/socket.c:2153 [inline]
 __do_sys_sendmsg net/socket.c:2162 [inline]
 __se_sys_sendmsg net/socket.c:2160 [inline]
 __x64_sys_sendmsg+0x132/0x220 net/socket.c:2160
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 54:
 __cache_free mm/slab.c:3503 [inline]
 kfree+0xcc/0x210 mm/slab.c:3822
 qfq_destroy_class net/sched/sch_qfq.c:541 [inline]
 qfq_destroy_qdisc+0x182/0x2f0 net/sched/sch_qfq.c:1490
 qdisc_destroy+0x180/0x790 net/sched/sch_generic.c:983
 dev_shutdown+0x2b2/0x48b net/sched/sch_generic.c:1321
 rollback_registered_many+0x6a4/0xe70 net/core/dev.c:8181
 unregister_netdevice_many.part.0+0x1a/0x300 net/core/dev.c:9311
 unregister_netdevice_many net/core/dev.c:9310 [inline]
 default_device_exit_batch+0x2fa/0x3c0 net/core/dev.c:9782
 ops_exit_list+0xf9/0x150 net/core/net_namespace.c:156
 cleanup_net+0x3b4/0x8b0 net/core/net_namespace.c:553
 process_one_work+0x864/0x1570 kernel/workqueue.c:2155
 worker_thread+0x64c/0x1130 kernel/workqueue.c:2298
 kthread+0x33f/0x460 kernel/kthread.c:259
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415

The buggy address belongs to the object at ffff8880367b5cc0
 which belongs to the cache kmalloc-128 of size 128
The buggy address is located 72 bytes inside of
 128-byte region [ffff8880367b5cc0, ffff8880367b5d40)
The buggy address belongs to the page:
page:ffffea0000d9ed40 count:1 mapcount:0 mapping:ffff88813bff0640 index:0x0
flags: 0xfff00000000100(slab)
raw: 00fff00000000100 ffffea0000dbc148 ffffea0002961a08 ffff88813bff0640
raw: 0000000000000000 ffff8880367b5000 0000000100000015 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880367b5c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880367b5c80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
>ffff8880367b5d00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
                      ^
 ffff8880367b5d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc
 ffff8880367b5e00: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/12/06 19:15 linux-4.19.y daefdc9eb24b f12ba0c5 .config console log report info ci2-linux-4-19
* Struck through repros no longer work on HEAD.