syzbot


KASAN: use-after-free Read in qfq_reset_qdisc

Status: auto-closed as invalid on 2020/12/30 04:03
Reported-by: syzbot+035b42caa27937c5e47e@syzkaller.appspotmail.com
First crash: 1871d, last: 1558d
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 847d 919d 0/28 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 1765d 1775d 0/1 auto-closed as invalid on 2020/06/06 11:35
upstream KASAN: use-after-free Read in qfq_reset_qdisc net 1 1055d 1055d 0/28 closed as invalid on 2022/02/17 02:00
linux-4.19 KASAN: use-after-free Read in qfq_reset_qdisc (2) 1 1593d 1593d 0/1 auto-closed as invalid on 2020/11/25 14:56
linux-4.19 KASAN: use-after-free Read in qfq_reset_qdisc (3) 1 1461d 1461d 0/1 auto-closed as invalid on 2021/04/05 19:15

Sample crash report:
audit: type=1326 audit(1598932974.924:236): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=1089 comm="syz-executor.3" exe="/root/syz-executor.3" sig=9 arch=c000003e syscall=228 compat=0 ip=0x4603fa code=0x0
==================================================================
BUG: KASAN: use-after-free in qfq_reset_qdisc+0x379/0x490 net/sched/sch_qfq.c:1463
Read of size 8 at addr ffff8880a8b08888 by task kworker/u4:1/22

CPU: 1 PID: 22 Comm: kworker/u4:1 Not tainted 4.14.195-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:17 [inline]
 dump_stack+0x1b2/0x283 lib/dump_stack.c:58
 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
 kasan_report_error.cold+0x8a/0x194 mm/kasan/report.c:351
 kasan_report mm/kasan/report.c:409 [inline]
 __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:430
 qfq_reset_qdisc+0x379/0x490 net/sched/sch_qfq.c:1463
 qdisc_destroy+0x104/0x310 net/sched/sch_generic.c:724
 dev_shutdown+0x27a/0x43e net/sched/sch_generic.c:1001
 rollback_registered_many+0x6e0/0xb30 net/core/dev.c:7196
 unregister_netdevice_many.part.0+0x18/0x2e0 net/core/dev.c:8284
 unregister_netdevice_many net/core/dev.c:8283 [inline]
 default_device_exit_batch+0x2d8/0x380 net/core/dev.c:8745
 ops_exit_list+0xf9/0x150 net/core/net_namespace.c:145
 cleanup_net+0x3b3/0x840 net/core/net_namespace.c:484
 process_one_work+0x793/0x14a0 kernel/workqueue.c:2116
 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2250
 kthread+0x30d/0x420 kernel/kthread.c:232
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404

Allocated by task 364:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551
 __do_kmalloc_node mm/slab.c:3682 [inline]
 __kmalloc_node+0x4c/0x70 mm/slab.c:3689
 kmalloc_node include/linux/slab.h:530 [inline]
 kvmalloc_node+0x46/0xd0 mm/util.c:397
 kvmalloc include/linux/mm.h:531 [inline]
 kvmalloc_array include/linux/mm.h:547 [inline]
 get_pages_array lib/iov_iter.c:1110 [inline]
 pipe_get_pages_alloc lib/iov_iter.c:1136 [inline]
 iov_iter_get_pages_alloc+0x488/0xe40 lib/iov_iter.c:1157
 default_file_splice_read+0x171/0x910 fs/splice.c:390
 do_splice_to+0xfb/0x140 fs/splice.c:880
 splice_direct_to_actor+0x207/0x730 fs/splice.c:952
 do_splice_direct+0x164/0x210 fs/splice.c:1061
 do_sendfile+0x47f/0xb30 fs/read_write.c:1441
 SYSC_sendfile64 fs/read_write.c:1502 [inline]
 SyS_sendfile64+0xff/0x110 fs/read_write.c:1488
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb

Freed by task 364:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524
 __cache_free mm/slab.c:3496 [inline]
 kfree+0xc9/0x250 mm/slab.c:3815
 kvfree+0x45/0x50 mm/util.c:416
 default_file_splice_read+0x5a7/0x910 fs/splice.c:427
 do_splice_to+0xfb/0x140 fs/splice.c:880
 splice_direct_to_actor+0x207/0x730 fs/splice.c:952
 do_splice_direct+0x164/0x210 fs/splice.c:1061
 do_sendfile+0x47f/0xb30 fs/read_write.c:1441
 SYSC_sendfile64 fs/read_write.c:1502 [inline]
 SyS_sendfile64+0xff/0x110 fs/read_write.c:1488
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb

The buggy address belongs to the object at ffff8880a8b08840
 which belongs to the cache kmalloc-128 of size 128
The buggy address is located 72 bytes inside of
 128-byte region [ffff8880a8b08840, ffff8880a8b088c0)
The buggy address belongs to the page:
page:ffffea0002a2c200 count:1 mapcount:0 mapping:ffff8880a8b08000 index:0x0
flags: 0xfffe0000000100(slab)
raw: 00fffe0000000100 ffff8880a8b08000 0000000000000000 0000000100000015
raw: ffffea00027df220 ffffea00028437e0 ffff88812fe52640 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880a8b08780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc
 ffff8880a8b08800: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
>ffff8880a8b08880: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
                      ^
 ffff8880a8b08900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880a8b08980: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00
==================================================================

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/09/01 04:03 linux-4.14.y d7e78d08fa77 d5a3ae1f .config console log report ci2-linux-4-14
2020/05/31 07:53 linux-4.14.y 4f68020fef1c 6f3e1c7c .config console log report ci2-linux-4-14
2020/03/18 19:11 linux-4.14.y 12cd844a39ed 0a96a13c .config console log report ci2-linux-4-14
2020/02/29 21:56 linux-4.14.y 78d697fc93f9 c88c7b75 .config console log report ci2-linux-4-14
2020/02/15 06:16 linux-4.14.y 98db2bf27b9e 5d7b90f1 .config console log report ci2-linux-4-14
2019/10/24 06:44 linux-4.14.y b98aebd29824 b602d64b .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.