general protection fault in taprio_dequeue_soft

17 views
Skip to first unread message

syzbot

unread,
Dec 15, 2020, 4:44:11 AM12/15/20
to da...@davemloft.net, j...@mojatatu.com, ji...@resnulli.us, ku...@kernel.org, linux-...@vger.kernel.org, net...@vger.kernel.org, syzkall...@googlegroups.com, xiyou.w...@gmail.com
Hello,

syzbot found the following issue on:

HEAD commit: 7f376f19 Merge tag 'mtd/fixes-for-5.10-rc8' of git://git.k..
git tree: net
console output: https://syzkaller.appspot.com/x/log.txt?x=13842287500000
kernel config: https://syzkaller.appspot.com/x/.config?x=3416bb960d5c705d
dashboard link: https://syzkaller.appspot.com/bug?extid=8971da381fb5a31f542d
compiler: gcc (GCC) 10.1.0-syz 20200507
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=128c5745500000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17a1f123500000

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

general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.10.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:taprio_dequeue_soft+0x22e/0xa40 net/sched/sch_taprio.c:544
Code: 24 18 e8 d5 3e 4c fa 48 8b 44 24 10 80 38 00 0f 85 4c 07 00 00 48 8b 93 c0 02 00 00 49 63 c5 4c 8d 24 c2 4c 89 e0 48 c1 e8 03 <80> 3c 28 00 0f 85 3c 07 00 00 4d 8b 24 24 4d 85 e4 0f 84 87 03 00
RSP: 0018:ffffc90000d90e08 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff8880282e3800 RCX: ffffffff8723c557
RDX: 0000000000000000 RSI: ffffffff8723c59b RDI: 0000000000000005
RBP: dffffc0000000000 R08: 0000000000000001 R09: ffffffff8ebaf667
R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000401 R15: ffff88801917e000
FS: 0000000000000000(0000) GS:ffff8880b9f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000600 CR3: 0000000013cdc000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
dequeue_skb net/sched/sch_generic.c:263 [inline]
qdisc_restart net/sched/sch_generic.c:366 [inline]
__qdisc_run+0x1ae/0x15e0 net/sched/sch_generic.c:384
qdisc_run include/net/pkt_sched.h:131 [inline]
qdisc_run include/net/pkt_sched.h:123 [inline]
net_tx_action+0x4b9/0xbf0 net/core/dev.c:4915
__do_softirq+0x2a0/0x9f6 kernel/softirq.c:298
asm_call_irq_on_stack+0xf/0x20
</IRQ>
__run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline]
run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline]
do_softirq_own_stack+0xaa/0xd0 arch/x86/kernel/irq_64.c:77
invoke_softirq kernel/softirq.c:393 [inline]
__irq_exit_rcu kernel/softirq.c:423 [inline]
irq_exit_rcu+0x132/0x200 kernel/softirq.c:435
sysvec_apic_timer_interrupt+0x4d/0x100 arch/x86/kernel/apic/apic.c:1091
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:631
RIP: 0010:native_save_fl arch/x86/include/asm/irqflags.h:29 [inline]
RIP: 0010:arch_local_save_flags arch/x86/include/asm/irqflags.h:79 [inline]
RIP: 0010:arch_irqs_disabled arch/x86/include/asm/irqflags.h:169 [inline]
RIP: 0010:acpi_safe_halt drivers/acpi/processor_idle.c:112 [inline]
RIP: 0010:acpi_idle_do_entry+0x1c9/0x250 drivers/acpi/processor_idle.c:517
Code: 5d 07 88 f8 84 db 75 ac e8 44 0f 88 f8 e8 bf cd 8d f8 e9 0c 00 00 00 e8 35 0f 88 f8 0f 00 2d 9e 86 c0 00 e8 29 0f 88 f8 fb f4 <9c> 5b 81 e3 00 02 00 00 fa 31 ff 48 89 de e8 84 07 88 f8 48 85 db
RSP: 0018:ffffc90000d27d18 EFLAGS: 00000293
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 1ffffffff19d8e91
RDX: ffff888010d98000 RSI: ffffffff88e7f547 RDI: 0000000000000000
RBP: ffff888014e50064 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000001
R13: ffff888014e50000 R14: ffff888014e50064 R15: ffff88801747a804
acpi_idle_enter+0x361/0x500 drivers/acpi/processor_idle.c:648
cpuidle_enter_state+0x1b1/0xc80 drivers/cpuidle/cpuidle.c:237
cpuidle_enter+0x4a/0xa0 drivers/cpuidle/cpuidle.c:351
call_cpuidle kernel/sched/idle.c:158 [inline]
cpuidle_idle_call kernel/sched/idle.c:239 [inline]
do_idle+0x3e1/0x590 kernel/sched/idle.c:299
cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:395
start_secondary+0x266/0x340 arch/x86/kernel/smpboot.c:266
secondary_startup_64_no_verify+0xb0/0xbb
Modules linked in:
---[ end trace 86b7dd17b9a0a261 ]---
RIP: 0010:taprio_dequeue_soft+0x22e/0xa40 net/sched/sch_taprio.c:544
Code: 24 18 e8 d5 3e 4c fa 48 8b 44 24 10 80 38 00 0f 85 4c 07 00 00 48 8b 93 c0 02 00 00 49 63 c5 4c 8d 24 c2 4c 89 e0 48 c1 e8 03 <80> 3c 28 00 0f 85 3c 07 00 00 4d 8b 24 24 4d 85 e4 0f 84 87 03 00
RSP: 0018:ffffc90000d90e08 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff8880282e3800 RCX: ffffffff8723c557
RDX: 0000000000000000 RSI: ffffffff8723c59b RDI: 0000000000000005
RBP: dffffc0000000000 R08: 0000000000000001 R09: ffffffff8ebaf667
R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000401 R15: ffff88801917e000
FS: 0000000000000000(0000) GS:ffff8880b9f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000600 CR3: 0000000013cdc000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
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 can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Dec 15, 2020, 12:38:03 PM12/15/20
to da...@davemloft.net, j...@mojatatu.com, ji...@resnulli.us, ku...@kernel.org, linux-...@vger.kernel.org, net...@vger.kernel.org, syzkall...@googlegroups.com, viniciu...@intel.com, xiyou.w...@gmail.com
syzbot has bisected this issue to:

commit b5b73b26b3ca34574124ed7ae9c5ba8391a7f176
Author: Vinicius Costa Gomes <viniciu...@intel.com>
Date: Thu Sep 10 00:03:11 2020 +0000

taprio: Fix allowing too small intervals

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=13c8eadf500000
start commit: 7f376f19 Merge tag 'mtd/fixes-for-5.10-rc8' of git://git.k..
git tree: net
final oops: https://syzkaller.appspot.com/x/report.txt?x=1028eadf500000
console output: https://syzkaller.appspot.com/x/log.txt?x=17c8eadf500000
Reported-by: syzbot+8971da...@syzkaller.appspotmail.com
Fixes: b5b73b26b3ca ("taprio: Fix allowing too small intervals")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

Davide Caratti

unread,
Dec 16, 2020, 7:56:01 AM12/16/20
to syzbot, da...@davemloft.net, j...@mojatatu.com, ji...@resnulli.us, ku...@kernel.org, linux-...@vger.kernel.org, net...@vger.kernel.org, syzkall...@googlegroups.com, xiyou.w...@gmail.com
I think we need to flush "child" qdiscs before freeing them in
taprio_destroy(): I will try a small patch in the afternoon.
thanks!
--
davide


Davide Caratti

unread,
Dec 16, 2020, 9:31:33 AM12/16/20
to syzbot, syzkall...@googlegroups.com
0001-net-sched-sch_taprio-reset-child-qdiscs-before-freei.patch

syzbot

unread,
Dec 16, 2020, 9:31:34 AM12/16/20
to Davide Caratti, dcar...@redhat.com, syzkall...@googlegroups.com
> #syz test git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git

want 2 args (repo, branch), got 9

syzbot

unread,
Dec 16, 2020, 9:31:35 AM12/16/20
to Davide Caratti, dcar...@redhat.com, syzkall...@googlegroups.com
> #syz test git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git

want 2 args (repo, branch), got 9

>
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-bug...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-bugs/8dcc77ca9cd5a8f30f39ba1d1f6161daa9c0bf4a.camel%40redhat.com.

Davide Caratti

unread,
Dec 16, 2020, 9:41:09 AM12/16/20
to syzbot, syzkall...@googlegroups.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git master

On Tue, 2020-12-15 at 01:44 -0800, syzbot wrote:
0001-net-sched-sch_taprio-reset-child-qdiscs-before-freei.patch

syzbot

unread,
Dec 16, 2020, 12:38:04 PM12/16/20
to dcar...@redhat.com, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
INFO: rcu detected stall in corrupted

rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: Tasks blocked on level-0 rcu_node (CPUs 0-1):
(detected by 1, t=10545 jiffies, g=13201, q=1826)
rcu: All QSes seen, last rcu_preempt kthread activity 4093 (4294958060-4294953967), jiffies_till_next_fqs=1, root ->qsmask 0x0
rcu: rcu_preempt kthread starved for 4093 jiffies! g13201 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x0 ->cpu=1
rcu: Unless rcu_preempt kthread gets sufficient CPU time, OOM is now expected behavior.
rcu: RCU grace-period kthread stack dump:
task:rcu_preempt state:R running task stack:29176 pid: 11 ppid: 2 flags:0x00004000
Call Trace:
context_switch kernel/sched/core.c:4327 [inline]
__schedule+0x8cd/0x2150 kernel/sched/core.c:5078
schedule+0xcf/0x270 kernel/sched/core.c:5157
schedule_timeout+0x148/0x250 kernel/time/timer.c:1878
rcu_gp_fqs_loop kernel/rcu/tree.c:1940 [inline]
rcu_gp_kthread+0xbbe/0x1d70 kernel/rcu/tree.c:2113
kthread+0x3b1/0x4a0 kernel/kthread.c:292
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296


Tested on:

commit: 57030a0b lan743x: fix rx_napi_poll/interrupt ping-pong
git tree: net
console output: https://syzkaller.appspot.com/x/log.txt?x=100ccb37500000
kernel config: https://syzkaller.appspot.com/x/.config?x=bfc59efdc2596f42
dashboard link: https://syzkaller.appspot.com/bug?extid=8971da381fb5a31f542d
compiler: gcc (GCC) 10.1.0-syz 20200507
patch: https://syzkaller.appspot.com/x/patch.diff?x=1560e41f500000

Reply all
Reply to author
Forward
0 new messages