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

5 views
Skip to first unread message

syzbot

unread,
Jul 28, 2020, 10:56:19 AM7/28/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 20b3a3df Linux 4.19.134
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=152ab702900000
kernel config: https://syzkaller.appspot.com/x/.config?x=7c76c572c403b9ac
dashboard link: https://syzkaller.appspot.com/bug?extid=c1d00e3ef46bea1df0cf
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+c1d00e...@syzkaller.appspotmail.com

device veth1_macvtap left promiscuous mode
device veth0_macvtap left promiscuous mode
device veth1_vlan left promiscuous mode
device veth0_vlan left promiscuous mode
==================================================================
BUG: KASAN: use-after-free in qfq_reset_qdisc+0x3b2/0x4d0 net/sched/sch_qfq.c:1468
Read of size 8 at addr ffff88809028b108 by task kworker/u4:0/20636

CPU: 1 PID: 20636 Comm: kworker/u4:0 Not tainted 4.19.134-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/0x780 net/sched/sch_generic.c:981
dev_shutdown+0x2b2/0x48b net/sched/sch_generic.c:1301
rollback_registered_many+0x689/0xde0 net/core/dev.c:8180
unregister_netdevice_many.part.0+0x1a/0x300 net/core/dev.c:9310
unregister_netdevice_many net/core/dev.c:9309 [inline]
default_device_exit_batch+0x2fa/0x3c0 net/core/dev.c:9781
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+0x30b/0x410 kernel/kthread.c:246
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415

Allocated by task 22503:
__do_kmalloc mm/slab.c:3727 [inline]
__kmalloc_track_caller+0x155/0x3c0 mm/slab.c:3742
kmemdup+0x23/0x50 mm/util.c:118
kmemdup include/linux/string.h:446 [inline]
mpls_dev_sysctl_register+0xaa/0x2d0 net/mpls/af_mpls.c:1353
mpls_add_dev net/mpls/af_mpls.c:1419 [inline]
mpls_dev_notify+0x271/0x9b0 net/mpls/af_mpls.c:1545
notifier_call_chain+0xc0/0x230 kernel/notifier.c:93
call_netdevice_notifiers net/core/dev.c:1762 [inline]
register_netdevice+0xdd2/0x10f0 net/core/dev.c:8747
veth_newlink+0x3eb/0x930 drivers/net/veth.c:1143
rtnl_newlink+0x1027/0x15a0 net/core/rtnetlink.c:3141
rtnetlink_rcv_msg+0x453/0xb80 net/core/rtnetlink.c:4777
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 20636:
__cache_free mm/slab.c:3503 [inline]
kfree+0xcc/0x210 mm/slab.c:3822
mpls_dev_sysctl_unregister net/mpls/af_mpls.c:1389 [inline]
mpls_dev_notify+0x6d0/0x9b0 net/mpls/af_mpls.c:1578
notifier_call_chain+0xc0/0x230 kernel/notifier.c:93
call_netdevice_notifiers net/core/dev.c:1762 [inline]
rollback_registered_many+0x823/0xde0 net/core/dev.c:8187
unregister_netdevice_many.part.0+0x1a/0x300 net/core/dev.c:9310
unregister_netdevice_many net/core/dev.c:9309 [inline]
default_device_exit_batch+0x2fa/0x3c0 net/core/dev.c:9781
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+0x30b/0x410 kernel/kthread.c:246
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415

The buggy address belongs to the object at ffff88809028b0c0
which belongs to the cache kmalloc-128 of size 128
The buggy address is located 72 bytes inside of
128-byte region [ffff88809028b0c0, ffff88809028b140)
The buggy address belongs to the page:
page:ffffea000240a2c0 count:1 mapcount:0 mapping:ffff88812c39c640 index:0xffff88809028b780
flags: 0xfffe0000000100(slab)
raw: 00fffe0000000100 ffffea0001333348 ffffea0002359388 ffff88812c39c640
raw: ffff88809028b780 ffff88809028b000 0000000100000014 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff88809028b000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88809028b080: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
>ffff88809028b100: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
^
ffff88809028b180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88809028b200: 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

unread,
Nov 25, 2020, 9:56:11 AM11/25/20
to syzkaller...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages