linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* WARNING in isotp_tx_timer_handler
@ 2020-12-20 19:24 syzbot
       [not found] ` <20201221054031.1468-1-hdanton@sina.com>
  2020-12-24  0:20 ` syzbot
  0 siblings, 2 replies; 5+ messages in thread
From: syzbot @ 2020-12-20 19:24 UTC (permalink / raw)
  To: davem, kuba, linux-can, linux-kernel, mkl, netdev, socketcan,
	syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    5e60366d Merge tag 'fallthrough-fixes-clang-5.11-rc1' of g..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=179a2287500000
kernel config:  https://syzkaller.appspot.com/x/.config?x=db720fe37a6a41d8
dashboard link: https://syzkaller.appspot.com/bug?extid=78bab6958a614b0c80b9
compiler:       gcc (GCC) 10.1.0-syz 20200507
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=10ea3e0f500000

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

------------[ cut here ]------------
WARNING: CPU: 0 PID: 9908 at net/can/isotp.c:835 isotp_tx_timer_handler+0x65f/0xba0 net/can/isotp.c:835
Modules linked in:
CPU: 0 PID: 9908 Comm: systemd-udevd Not tainted 5.10.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:isotp_tx_timer_handler+0x65f/0xba0 net/can/isotp.c:835
Code: c1 e8 03 83 e1 07 0f b6 04 28 38 c8 7f 08 84 c0 0f 85 b8 04 00 00 41 88 54 24 05 e9 07 fb ff ff 40 84 ed 75 21 e8 21 11 80 f9 <0f> 0b 45 31 e4 e8 17 11 80 f9 44 89 e0 48 83 c4 48 5b 5d 41 5c 41
RSP: 0018:ffffc90000007dc8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff88803e4e8518 RCX: 0000000000000100
RDX: ffff8880117d5040 RSI: ffffffff87f2102f RDI: 0000000000000003
RBP: 0000000000000000 R08: ffffffff8a7b6540 R09: ffffffff87f20a2e
R10: 0000000000000003 R11: 0000000000000000 R12: 0000000000000000
R13: ffff8880b9c26c80 R14: ffff8880b9c26a00 R15: ffff88803e4e8000
FS:  00007fc247dbb8c0(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffcab7e7800 CR3: 000000001c8c6000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 __run_hrtimer kernel/time/hrtimer.c:1519 [inline]
 __hrtimer_run_queues+0x609/0xea0 kernel/time/hrtimer.c:1583
 hrtimer_run_softirq+0x17b/0x360 kernel/time/hrtimer.c:1600
 __do_softirq+0x2bc/0xa77 kernel/softirq.c:343
 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:226 [inline]
 __irq_exit_rcu+0x17f/0x200 kernel/softirq.c:420
 irq_exit_rcu+0x5/0x20 kernel/softirq.c:432
 sysvec_apic_timer_interrupt+0x4d/0x100 arch/x86/kernel/apic/apic.c:1096
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:628
RIP: 0010:call_rcu+0x2e7/0x710 kernel/rcu/tree.c:3039
Code: 3c 02 00 0f 85 bb 03 00 00 48 8b 05 63 75 1a 0a 49 03 84 24 f0 00 00 00 49 39 c7 0f 8f 72 01 00 00 e8 5d e4 18 00 ff 34 24 9d <48> 83 c4 20 5b 5d 41 5c 41 5d 41 5e 41 5f c3 80 3c 02 00 0f 84 2f
RSP: 0018:ffffc9000adafb88 EFLAGS: 00000246
RAX: 00000000000010e9 RBX: ffff8880143c1780 RCX: ffffffff815740d7
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffff8880b9c35b70 R08: 0000000000000001 R09: ffffffff8f4f983f
R10: fffffbfff1e9f307 R11: 0000000000000000 R12: ffff8880b9c35a80
R13: ffff8880b9c35b60 R14: ffff8880b9c35b18 R15: 000000000000002c
 security_inode_free+0x9a/0xc0 security/security.c:1005
 __destroy_inode+0x24d/0x740 fs/inode.c:259
 destroy_inode+0x91/0x1b0 fs/inode.c:282
 iput_final fs/inode.c:1654 [inline]
 iput.part.0+0x41e/0x840 fs/inode.c:1680
 iput+0x58/0x70 fs/inode.c:1670
 dentry_unlink_inode+0x2b1/0x3d0 fs/dcache.c:374
 __dentry_kill+0x3c0/0x640 fs/dcache.c:579
 dentry_kill fs/dcache.c:717 [inline]
 dput+0x696/0xc10 fs/dcache.c:878
 do_renameat2+0xae7/0xbf0 fs/namei.c:4461
 __do_sys_rename fs/namei.c:4503 [inline]
 __se_sys_rename fs/namei.c:4501 [inline]
 __x64_sys_rename+0x5d/0x80 fs/namei.c:4501
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7fc246bb7d47
Code: 75 12 48 89 df e8 19 84 07 00 85 c0 0f 95 c0 0f b6 c0 f7 d8 5b c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 b8 52 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 21 41 33 00 f7 d8 64 89 01 48
RSP: 002b:00007ffcab6e3c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000052
RAX: ffffffffffffffda RBX: 00005556c8f7a380 RCX: 00007fc246bb7d47
RDX: 0000000000000000 RSI: 00007ffcab6e3c70 RDI: 00005556c8f823b0
RBP: 00007ffcab6e3d30 R08: 00005556c8f812c0 R09: 00005556c8f811e0
R10: 00007fc247dbb8c0 R11: 0000000000000246 R12: 00007ffcab6e3c70
R13: 0000000000000001 R14: 00005556c71306cb R15: 0000000000000000


---
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 syzkaller@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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: WARNING in isotp_tx_timer_handler
       [not found] ` <20201221054031.1468-1-hdanton@sina.com>
@ 2020-12-21 12:55   ` Oliver Hartkopp
  0 siblings, 0 replies; 5+ messages in thread
From: Oliver Hartkopp @ 2020-12-21 12:55 UTC (permalink / raw)
  To: Hillf Danton, syzbot; +Cc: linux-can, linux-kernel, mkl, netdev, syzkaller-bugs

Hello Hillf,

On 21.12.20 06:40, Hillf Danton wrote:
> Sun, 20 Dec 2020 11:24:13 -0800
>> syzbot found the following issue on:
>>
>> HEAD commit:    5e60366d Merge tag 'fallthrough-fixes-clang-5.11-rc1' of g..
>> git tree:       upstream
>> console output: https://syzkaller.appspot.com/x/log.txt?x=179a2287500000
>> kernel config:  https://syzkaller.appspot.com/x/.config?x=db720fe37a6a41d8
>> dashboard link: https://syzkaller.appspot.com/bug?extid=78bab6958a614b0c80b9
>> compiler:       gcc (GCC) 10.1.0-syz 20200507
>> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=10ea3e0f500000
>>
>> IMPORTANT: if you fix the issue, please add the following tag to the commit:
>> Reported-by: syzbot+78bab6958a614b0c80b9@syzkaller.appspotmail.com
>>
>> ------------[ cut here ]------------
>> WARNING: CPU: 0 PID: 9908 at net/can/isotp.c:835 isotp_tx_timer_handler+0x65f/0xba0 net/can/isotp.c:835
>> Modules linked in:
>> CPU: 0 PID: 9908 Comm: systemd-udevd Not tainted 5.10.0-syzkaller #0
>> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
>> RIP: 0010:isotp_tx_timer_handler+0x65f/0xba0 net/can/isotp.c:835
>> Code: c1 e8 03 83 e1 07 0f b6 04 28 38 c8 7f 08 84 c0 0f 85 b8 04 00 00 41 88 54 24 05 e9 07 fb ff ff 40 84 ed 75 21 e8 21 11 80 f9 <0f> 0b 45 31 e4 e8 17 11 80 f9 44 89 e0 48 83 c4 48 5b 5d 41 5c 41
>> RSP: 0018:ffffc90000007dc8 EFLAGS: 00010246
>> RAX: 0000000000000000 RBX: ffff88803e4e8518 RCX: 0000000000000100
>> RDX: ffff8880117d5040 RSI: ffffffff87f2102f RDI: 0000000000000003
>> RBP: 0000000000000000 R08: ffffffff8a7b6540 R09: ffffffff87f20a2e
>> R10: 0000000000000003 R11: 0000000000000000 R12: 0000000000000000
>> R13: ffff8880b9c26c80 R14: ffff8880b9c26a00 R15: ffff88803e4e8000
>> FS:  00007fc247dbb8c0(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
>> CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
>> CR2: 00007ffcab7e7800 CR3: 000000001c8c6000 CR4: 00000000001506f0
>> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
>> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
>> Call Trace:
>>   <IRQ>
>>   __run_hrtimer kernel/time/hrtimer.c:1519 [inline]
>>   __hrtimer_run_queues+0x609/0xea0 kernel/time/hrtimer.c:1583
>>   hrtimer_run_softirq+0x17b/0x360 kernel/time/hrtimer.c:1600
>>   __do_softirq+0x2bc/0xa77 kernel/softirq.c:343
>>   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:226 [inline]
>>   __irq_exit_rcu+0x17f/0x200 kernel/softirq.c:420
>>   irq_exit_rcu+0x5/0x20 kernel/softirq.c:432
>>   sysvec_apic_timer_interrupt+0x4d/0x100 arch/x86/kernel/apic/apic.c:1096
>>   asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:628
>> RIP: 0010:call_rcu+0x2e7/0x710 kernel/rcu/tree.c:3039
>> Code: 3c 02 00 0f 85 bb 03 00 00 48 8b 05 63 75 1a 0a 49 03 84 24 f0 00 00 00 49 39 c7 0f 8f 72 01 00 00 e8 5d e4 18 00 ff 34 24 9d <48> 83 c4 20 5b 5d 41 5c 41 5d 41 5e 41 5f c3 80 3c 02 00 0f 84 2f
>> RSP: 0018:ffffc9000adafb88 EFLAGS: 00000246
>> RAX: 00000000000010e9 RBX: ffff8880143c1780 RCX: ffffffff815740d7
>> RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
>> RBP: ffff8880b9c35b70 R08: 0000000000000001 R09: ffffffff8f4f983f
>> R10: fffffbfff1e9f307 R11: 0000000000000000 R12: ffff8880b9c35a80
>> R13: ffff8880b9c35b60 R14: ffff8880b9c35b18 R15: 000000000000002c
>>   security_inode_free+0x9a/0xc0 security/security.c:1005
>>   __destroy_inode+0x24d/0x740 fs/inode.c:259
>>   destroy_inode+0x91/0x1b0 fs/inode.c:282
>>   iput_final fs/inode.c:1654 [inline]
>>   iput.part.0+0x41e/0x840 fs/inode.c:1680
>>   iput+0x58/0x70 fs/inode.c:1670
>>   dentry_unlink_inode+0x2b1/0x3d0 fs/dcache.c:374
>>   __dentry_kill+0x3c0/0x640 fs/dcache.c:579
>>   dentry_kill fs/dcache.c:717 [inline]
>>   dput+0x696/0xc10 fs/dcache.c:878
>>   do_renameat2+0xae7/0xbf0 fs/namei.c:4461
>>   __do_sys_rename fs/namei.c:4503 [inline]
>>   __se_sys_rename fs/namei.c:4501 [inline]
>>   __x64_sys_rename+0x5d/0x80 fs/namei.c:4501
>>   do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
>>   entry_SYSCALL_64_after_hwframe+0x44/0xa9
>> RIP: 0033:0x7fc246bb7d47
>> Code: 75 12 48 89 df e8 19 84 07 00 85 c0 0f 95 c0 0f b6 c0 f7 d8 5b c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 b8 52 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 21 41 33 00 f7 d8 64 89 01 48
>> RSP: 002b:00007ffcab6e3c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000052
>> RAX: ffffffffffffffda RBX: 00005556c8f7a380 RCX: 00007fc246bb7d47
>> RDX: 0000000000000000 RSI: 00007ffcab6e3c70 RDI: 00005556c8f823b0
>> RBP: 00007ffcab6e3d30 R08: 00005556c8f812c0 R09: 00005556c8f811e0
>> R10: 00007fc247dbb8c0 R11: 0000000000000246 R12: 00007ffcab6e3c70
>> R13: 0000000000000001 R14: 00005556c71306cb R15: 0000000000000000
> 
> Canceling a running timer that handles ISOTP_WAIT_FC/ISOTP_WAIT_FIRST_FC
> ends up with the so->tx.state assigned to be ISOTP_IDLE.  That triggers
> the warning. Fix it by correcting state before adding timer.
> 
> --- a/net/can/isotp.c
> +++ b/net/can/isotp.c
> @@ -378,6 +378,7 @@ static int isotp_rcv_fc(struct isotp_soc
>   		break;
>   
>   	case ISOTP_FC_WT:
> +		so->tx.state = ISOTP_WAIT_FC;
>   		/* start timer to wait for next FC frame */
>   		hrtimer_start(&so->txtimer, ktime_set(1, 0),
>   			      HRTIMER_MODE_REL_SOFT);
> 

Thanks for looking into this!

But how did you get to this insight?

When going through isotp_rcv_fc() there is no other way than 
so->tx.state already contains ISOTP_WAIT_FC at that point.

Or did I miss something?

Best regards,
Oliver

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: WARNING in isotp_tx_timer_handler
  2020-12-20 19:24 WARNING in isotp_tx_timer_handler syzbot
       [not found] ` <20201221054031.1468-1-hdanton@sina.com>
@ 2020-12-24  0:20 ` syzbot
  1 sibling, 0 replies; 5+ messages in thread
From: syzbot @ 2020-12-24  0:20 UTC (permalink / raw)
  To: davem, hdanton, kuba, linux-can, linux-kernel, mkl, netdev,
	socketcan, syzkaller-bugs

syzbot has found a reproducer for the following issue on:

HEAD commit:    614cb589 Merge tag 'acpi-5.11-rc1-2' of git://git.kernel.o..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=151d558f500000
kernel config:  https://syzkaller.appspot.com/x/.config?x=3e7e34a83d606100
dashboard link: https://syzkaller.appspot.com/bug?extid=78bab6958a614b0c80b9
compiler:       gcc (GCC) 10.1.0-syz 20200507
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1196822b500000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=12c75f97500000

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

------------[ cut here ]------------
WARNING: CPU: 0 PID: 0 at net/can/isotp.c:835 isotp_tx_timer_handler+0x65f/0xba0 net/can/isotp.c:835
Modules linked in:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:isotp_tx_timer_handler+0x65f/0xba0 net/can/isotp.c:835
Code: c1 e8 03 83 e1 07 0f b6 04 28 38 c8 7f 08 84 c0 0f 85 b8 04 00 00 41 88 54 24 05 e9 07 fb ff ff 40 84 ed 75 21 e8 c1 64 7e f9 <0f> 0b 45 31 e4 e8 b7 64 7e f9 44 89 e0 48 83 c4 48 5b 5d 41 5c 41
RSP: 0018:ffffc90000007dc8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff88802a288518 RCX: 0000000000000100
RDX: ffffffff8b49bc00 RSI: ffffffff87f4e3ff RDI: 0000000000000003
RBP: 0000000000000000 R08: ffffffff8a7baf80 R09: ffffffff87f4ddfe
R10: 0000000000000003 R11: 0000000000000000 R12: 0000000000000000
R13: ffff8880b9c26c80 R14: ffff8880b9c26a00 R15: ffff88802a288000
FS:  0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffd91884b10 CR3: 000000001b5d4000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 __run_hrtimer kernel/time/hrtimer.c:1519 [inline]
 __hrtimer_run_queues+0x609/0xea0 kernel/time/hrtimer.c:1583
 hrtimer_run_softirq+0x17b/0x360 kernel/time/hrtimer.c:1600
 __do_softirq+0x2bc/0xa77 kernel/softirq.c:343
 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:226 [inline]
 __irq_exit_rcu+0x17f/0x200 kernel/softirq.c:420
 irq_exit_rcu+0x5/0x20 kernel/softirq.c:432
 sysvec_apic_timer_interrupt+0x4d/0x100 arch/x86/kernel/apic/apic.c:1096
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:628
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:111 [inline]
RIP: 0010:acpi_idle_do_entry+0x1c9/0x250 drivers/acpi/processor_idle.c:516
Code: ed 26 57 f8 84 db 75 ac e8 64 20 57 f8 e8 3f f6 5c f8 e9 0c 00 00 00 e8 55 20 57 f8 0f 00 2d ae 57 ae 00 e8 49 20 57 f8 fb f4 <9c> 5b 81 e3 00 02 00 00 fa 31 ff 48 89 de e8 24 28 57 f8 48 85 db
RSP: 0018:ffffffff8b407d60 EFLAGS: 00000293
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffffffff8b49bc00 RSI: ffffffff891c2877 RDI: 0000000000000000
RBP: ffff888141653064 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff81791ed8 R11: 0000000000000000 R12: 0000000000000001
R13: ffff888141653000 R14: ffff888141653064 R15: ffff888017f65004
 acpi_idle_enter+0x361/0x500 drivers/acpi/processor_idle.c:647
 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+0x3eb/0x590 kernel/sched/idle.c:299
 cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:396
 start_kernel+0x496/0x4b7 init/main.c:1061
 secondary_startup_64_no_verify+0xb0/0xbb


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: WARNING in isotp_tx_timer_handler
  2022-10-21  6:45 Wei Chen
@ 2022-10-25  7:44 ` Oliver Hartkopp
  0 siblings, 0 replies; 5+ messages in thread
From: Oliver Hartkopp @ 2022-10-25  7:44 UTC (permalink / raw)
  To: Wei Chen, mkl, davem, Eric Dumazet, kuba, pabeni
  Cc: linux-can, netdev, linux-kernel

I'm looking at it.

Best,
Oliver

On 21.10.22 08:45, Wei Chen wrote:
> Dear Linux Developer,
> 
> Recently when using our tool to fuzz kernel, the following crash was triggered:
> 
> HEAD commit: 4fe89d07 Linux v6.0
> git tree: upstream
> compiler: clang 12.0.0
> console output:
> https://drive.google.com/file/d/1uwGcdgsj0b2RQy0dQqiCN5ntcbYpVoKL/view?usp=sharing
> Syzlang reproducer:
> https://drive.google.com/file/d/1sWib_bzKTQCeQOqApX9y1wVJ0C-UdyJP/view?usp=sharing
> kernel config: https://drive.google.com/file/d/1ZHRxVTXHL9mENdAPmQYS1DtgbflZ9XsD/view?usp=sharing
> 
> Unfortunately, I don't have any C reproducer for this crash yet.
> 
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: Wei Chen <harperchen1110@gmail.com>
> 
> WARNING: CPU: 0 PID: 0 at net/can/isotp.c:910 isotp_tx_timer_handler+0x160/0x270
> Modules linked in:
> CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.0.0 #35
> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
> 1.13.0-1ubuntu1.1 04/01/2014
> RIP: 0010:isotp_tx_timer_handler+0x160/0x270 net/can/isotp.c:910
> Code: 01 00 00 00 00 00 48 81 c3 90 09 02 00 31 ed 48 89 df be 01 00
> 00 00 ba 01 00 00 00 31 c9 e8 07 62 2b f8 eb 6e e8 d0 15 4e f8 <0f> 0b
> 31 ed eb 63 e8 c5 15 4e f8 e8 70 75 3e f8 49 89 c6 49 81 c6
> RSP: 0018:ffffc90000007c30 EFLAGS: 00010246
> RAX: ffffffff89390350 RBX: ffff88804c440000 RCX: ffffffff8ccbb940
> RDX: 0000000080000101 RSI: ffffffff8e13dba0 RDI: 0000000000000000
> RBP: 0000000000000000 R08: 0000000000000005 R09: ffffffff8939023d
> R10: 0000000000000003 R11: ffffffff8ccbb940 R12: 1ffff1100988a0f5
> R13: ffffffff8ccbc360 R14: ffff88804c4507a8 R15: dffffc0000000000
> FS:  0000000000000000(0000) GS:ffff88802cc00000(0000) knlGS:0000000000000000
> CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 0000564e766615a8 CR3: 000000000cc8e000 CR4: 0000000000750ef0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> PKRU: 55555554
> Call Trace:
>   <IRQ>
>   __run_hrtimer kernel/time/hrtimer.c:1685 [inline]
>   __hrtimer_run_queues+0x50b/0xa60 kernel/time/hrtimer.c:1749
>   hrtimer_run_softirq+0x1b7/0x5d0 kernel/time/hrtimer.c:1766
>   __do_softirq+0x372/0x783 kernel/softirq.c:571
>   __irq_exit_rcu+0xcf/0x150 kernel/softirq.c:650
>   irq_exit_rcu+0x5/0x20 kernel/softirq.c:662
>   sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1106
>   </IRQ>
>   <TASK>
>   asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:649
> RIP: 0010:default_idle+0xb/0x10 arch/x86/kernel/process.c:731
> Code: fe ff ff 44 89 e1 80 e1 07 80 c1 03 38 c1 7c 93 4c 89 e7 e8 07
> f5 a9 f7 eb 89 e8 00 41 fd ff 66 90 0f 00 2d 87 bc 5a 00 fb f4 <c3> 0f
> 1f 40 00 41 57 41 56 53 49 be 00 00 00 00 00 fc ff df 65 48
> RSP: 0018:ffffffff8cc07da8 EFLAGS: 000002c2
> RAX: 2a4c2150f0015f00 RBX: ffffffff8ccbb940 RCX: ffffffff8a2b46ee
> RDX: 0000000000000001 RSI: 0000000000000001 RDI: 0000000000000000
> RBP: ffffffff8cc07ed0 R08: dffffc0000000000 R09: ffffed100598693d
> R10: ffffed100598693d R11: 0000000000000000 R12: 1ffffffff1997728
> R13: 1ffffffff1980fca R14: 0000000000000000 R15: dffffc0000000000
>   default_idle_call+0x82/0xc0 kernel/sched/idle.c:109
>   cpuidle_idle_call kernel/sched/idle.c:191 [inline]
>   do_idle+0x215/0x5e0 kernel/sched/idle.c:303
>   cpu_startup_entry+0x15/0x20 kernel/sched/idle.c:400
>   rest_init+0x24f/0x270 init/main.c:727
>   arch_call_rest_init+0xa/0xa
>   start_kernel+0x490/0x536 init/main.c:1138
>   secondary_startup_64_no_verify+0xcf/0xdb
>   </TASK>
> ----------------
> Code disassembly (best guess), 2 bytes skipped:
>     0: ff 44 89 e1           incl   -0x1f(%rcx,%rcx,4)
>     4: 80 e1 07             and    $0x7,%cl
>     7: 80 c1 03             add    $0x3,%cl
>     a: 38 c1                 cmp    %al,%cl
>     c: 7c 93                 jl     0xffffffa1
>     e: 4c 89 e7             mov    %r12,%rdi
>    11: e8 07 f5 a9 f7       callq  0xf7a9f51d
>    16: eb 89                 jmp    0xffffffa1
>    18: e8 00 41 fd ff       callq  0xfffd411d
>    1d: 66 90                 xchg   %ax,%ax
>    1f: 0f 00 2d 87 bc 5a 00 verw   0x5abc87(%rip)        # 0x5abcad
>    26: fb                   sti
>    27: f4                   hlt
> * 28: c3                   retq <-- trapping instruction
>    29: 0f 1f 40 00           nopl   0x0(%rax)
>    2d: 41 57                 push   %r15
>    2f: 41 56                 push   %r14
>    31: 53                   push   %rbx
>    32: 49 be 00 00 00 00 00 movabs $0xdffffc0000000000,%r14
>    39: fc ff df
>    3c: 65                   gs
>    3d: 48                   rex.W
> 
> Best,
> Wei

^ permalink raw reply	[flat|nested] 5+ messages in thread

* WARNING in isotp_tx_timer_handler
@ 2022-10-21  6:45 Wei Chen
  2022-10-25  7:44 ` Oliver Hartkopp
  0 siblings, 1 reply; 5+ messages in thread
From: Wei Chen @ 2022-10-21  6:45 UTC (permalink / raw)
  To: socketcan, mkl, davem, Eric Dumazet, kuba, pabeni
  Cc: linux-can, netdev, linux-kernel

Dear Linux Developer,

Recently when using our tool to fuzz kernel, the following crash was triggered:

HEAD commit: 4fe89d07 Linux v6.0
git tree: upstream
compiler: clang 12.0.0
console output:
https://drive.google.com/file/d/1uwGcdgsj0b2RQy0dQqiCN5ntcbYpVoKL/view?usp=sharing
Syzlang reproducer:
https://drive.google.com/file/d/1sWib_bzKTQCeQOqApX9y1wVJ0C-UdyJP/view?usp=sharing
kernel config: https://drive.google.com/file/d/1ZHRxVTXHL9mENdAPmQYS1DtgbflZ9XsD/view?usp=sharing

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

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: Wei Chen <harperchen1110@gmail.com>

WARNING: CPU: 0 PID: 0 at net/can/isotp.c:910 isotp_tx_timer_handler+0x160/0x270
Modules linked in:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.0.0 #35
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
1.13.0-1ubuntu1.1 04/01/2014
RIP: 0010:isotp_tx_timer_handler+0x160/0x270 net/can/isotp.c:910
Code: 01 00 00 00 00 00 48 81 c3 90 09 02 00 31 ed 48 89 df be 01 00
00 00 ba 01 00 00 00 31 c9 e8 07 62 2b f8 eb 6e e8 d0 15 4e f8 <0f> 0b
31 ed eb 63 e8 c5 15 4e f8 e8 70 75 3e f8 49 89 c6 49 81 c6
RSP: 0018:ffffc90000007c30 EFLAGS: 00010246
RAX: ffffffff89390350 RBX: ffff88804c440000 RCX: ffffffff8ccbb940
RDX: 0000000080000101 RSI: ffffffff8e13dba0 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000005 R09: ffffffff8939023d
R10: 0000000000000003 R11: ffffffff8ccbb940 R12: 1ffff1100988a0f5
R13: ffffffff8ccbc360 R14: ffff88804c4507a8 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff88802cc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000564e766615a8 CR3: 000000000cc8e000 CR4: 0000000000750ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
PKRU: 55555554
Call Trace:
 <IRQ>
 __run_hrtimer kernel/time/hrtimer.c:1685 [inline]
 __hrtimer_run_queues+0x50b/0xa60 kernel/time/hrtimer.c:1749
 hrtimer_run_softirq+0x1b7/0x5d0 kernel/time/hrtimer.c:1766
 __do_softirq+0x372/0x783 kernel/softirq.c:571
 __irq_exit_rcu+0xcf/0x150 kernel/softirq.c:650
 irq_exit_rcu+0x5/0x20 kernel/softirq.c:662
 sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1106
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:649
RIP: 0010:default_idle+0xb/0x10 arch/x86/kernel/process.c:731
Code: fe ff ff 44 89 e1 80 e1 07 80 c1 03 38 c1 7c 93 4c 89 e7 e8 07
f5 a9 f7 eb 89 e8 00 41 fd ff 66 90 0f 00 2d 87 bc 5a 00 fb f4 <c3> 0f
1f 40 00 41 57 41 56 53 49 be 00 00 00 00 00 fc ff df 65 48
RSP: 0018:ffffffff8cc07da8 EFLAGS: 000002c2
RAX: 2a4c2150f0015f00 RBX: ffffffff8ccbb940 RCX: ffffffff8a2b46ee
RDX: 0000000000000001 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffffff8cc07ed0 R08: dffffc0000000000 R09: ffffed100598693d
R10: ffffed100598693d R11: 0000000000000000 R12: 1ffffffff1997728
R13: 1ffffffff1980fca R14: 0000000000000000 R15: dffffc0000000000
 default_idle_call+0x82/0xc0 kernel/sched/idle.c:109
 cpuidle_idle_call kernel/sched/idle.c:191 [inline]
 do_idle+0x215/0x5e0 kernel/sched/idle.c:303
 cpu_startup_entry+0x15/0x20 kernel/sched/idle.c:400
 rest_init+0x24f/0x270 init/main.c:727
 arch_call_rest_init+0xa/0xa
 start_kernel+0x490/0x536 init/main.c:1138
 secondary_startup_64_no_verify+0xcf/0xdb
 </TASK>
----------------
Code disassembly (best guess), 2 bytes skipped:
   0: ff 44 89 e1           incl   -0x1f(%rcx,%rcx,4)
   4: 80 e1 07             and    $0x7,%cl
   7: 80 c1 03             add    $0x3,%cl
   a: 38 c1                 cmp    %al,%cl
   c: 7c 93                 jl     0xffffffa1
   e: 4c 89 e7             mov    %r12,%rdi
  11: e8 07 f5 a9 f7       callq  0xf7a9f51d
  16: eb 89                 jmp    0xffffffa1
  18: e8 00 41 fd ff       callq  0xfffd411d
  1d: 66 90                 xchg   %ax,%ax
  1f: 0f 00 2d 87 bc 5a 00 verw   0x5abc87(%rip)        # 0x5abcad
  26: fb                   sti
  27: f4                   hlt
* 28: c3                   retq <-- trapping instruction
  29: 0f 1f 40 00           nopl   0x0(%rax)
  2d: 41 57                 push   %r15
  2f: 41 56                 push   %r14
  31: 53                   push   %rbx
  32: 49 be 00 00 00 00 00 movabs $0xdffffc0000000000,%r14
  39: fc ff df
  3c: 65                   gs
  3d: 48                   rex.W

Best,
Wei

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-10-25  7:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-20 19:24 WARNING in isotp_tx_timer_handler syzbot
     [not found] ` <20201221054031.1468-1-hdanton@sina.com>
2020-12-21 12:55   ` Oliver Hartkopp
2020-12-24  0:20 ` syzbot
2022-10-21  6:45 Wei Chen
2022-10-25  7:44 ` Oliver Hartkopp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).