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

4 Aufrufe
Direkt zur ersten ungelesenen Nachricht

syzbot

ungelesen,
06.12.2020, 14:15:1006.12.20
an syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: daefdc9e Linux 4.19.161
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15053117500000
kernel config: https://syzkaller.appspot.com/x/.config?x=5e8be1f59358cc24
dashboard link: https://syzkaller.appspot.com/bug?extid=55ed1aef8f1264dc4217
compiler: gcc (GCC) 10.1.0-syz 20200507

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+55ed1a...@syzkaller.appspotmail.com

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
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

ungelesen,
05.04.2021, 15:15:1005.04.21
an syzkaller...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten