mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* WARNING in do_syscall_64
@ 2020-07-19  7:42 syzbot
  2020-07-19 15:12 ` Andy Lutomirski
  0 siblings, 1 reply; 3+ messages in thread
From: syzbot @ 2020-07-19  7:42 UTC (permalink / raw)
  To: bp, hpa, linux-kernel, luto, mingo, syzkaller-bugs, tglx, x86

Hello,

syzbot found the following issue on:

HEAD commit:    e9919e11 Merge branch 'for-linus' of git://git.kernel.org/..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=11dca4cf100000
kernel config:  https://syzkaller.appspot.com/x/.config?x=e944500a36bc4d55
dashboard link: https://syzkaller.appspot.com/bug?extid=29454675f5fe94137999
compiler:       clang version 10.0.0 (https://github.com/llvm/llvm-project/ c2443155a0fb245c8f17f2c1c72b6ea391e86e81)

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+29454675f5fe94137999@syzkaller.appspotmail.com

------------[ cut here ]------------
DEBUG_LOCKS_WARN_ON(!irqs_disabled())
WARNING: CPU: 0 PID: 7015 at kernel/locking/lockdep.c:3745 lockdep_hardirqs_off+0x8f/0xa0 kernel/locking/lockdep.c:3745
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 7015 Comm: syz-executor.2 Not tainted 5.8.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1f0/0x31e lib/dump_stack.c:118
 panic+0x264/0x7a0 kernel/panic.c:231
 __warn+0x227/0x250 kernel/panic.c:600
 report_bug+0x1b1/0x2e0 lib/bug.c:198
 handle_bug+0x42/0x80 arch/x86/kernel/traps.c:235
 exc_invalid_op+0x16/0x40 arch/x86/kernel/traps.c:255
 asm_exc_invalid_op+0x12/0x20 arch/x86/include/asm/idtentry.h:542
RIP: 0010:lockdep_hardirqs_off+0x8f/0xa0 kernel/locking/lockdep.c:3745
Code: 41 5e c3 e8 c3 07 00 00 85 c0 74 f3 83 3d ac e1 6f 01 00 75 ea 48 c7 c7 26 0a 07 89 48 c7 c6 46 9a 08 89 31 c0 e8 e1 c3 28 f9 <0f> 0b eb d1 0f 1f 00 66 2e 0f 1f 84 00 00 00 00 00 55 41 57 41 56
RSP: 0018:ffffc90004957f20 EFLAGS: 00010246
RAX: 516cfadac3d71d00 RBX: ffff8880611fe500 RCX: ffff8880611fe500
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000282
RBP: 0000000000000000 R08: ffffffff817a2fd0 R09: fffffbfff129cee5
R10: fffffbfff129cee5 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: ffffffff88400078 R15: ffffc90004957f58
 enter_from_user_mode arch/x86/entry/common.c:100 [inline]
 do_syscall_64+0x18/0xe0 arch/x86/entry/common.c:374
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x45f9ea
Code: Bad RIP value.
RSP: 002b:00007ffd3fa384e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e4
RAX: ffffffffffffffda RBX: 000000000002d52f RCX: 000000000045f9ea
RDX: 0000000000000000 RSI: 00007ffd3fa384f0 RDI: 0000000000000001
RBP: 00000000000000c9 R08: 0000000000000001 R09: 0000000002ca9940
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000009
R13: 00007ffd3fa38550 R14: 000000000002d505 R15: 00007ffd3fa38560
Kernel Offset: disabled
Rebooting in 86400 seconds..


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

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

* Re: WARNING in do_syscall_64
  2020-07-19  7:42 WARNING in do_syscall_64 syzbot
@ 2020-07-19 15:12 ` Andy Lutomirski
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Lutomirski @ 2020-07-19 15:12 UTC (permalink / raw)
  To: syzbot
  Cc: Borislav Petkov, H. Peter Anvin, LKML, Andrew Lutomirski,
	Ingo Molnar, syzkaller-bugs, Thomas Gleixner, X86 ML

On Sun, Jul 19, 2020 at 12:42 AM syzbot
<syzbot+29454675f5fe94137999@syzkaller.appspotmail.com> wrote:
>
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit:    e9919e11 Merge branch 'for-linus' of git://git.kernel.org/..
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=11dca4cf100000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=e944500a36bc4d55
> dashboard link: https://syzkaller.appspot.com/bug?extid=29454675f5fe94137999
> compiler:       clang version 10.0.0 (https://github.com/llvm/llvm-project/ c2443155a0fb245c8f17f2c1c72b6ea391e86e81)
>
> Unfortunately, I don't have any reproducer for this issue yet.

On a brief inspection, the only way I can see this happening is if the
syscall flags msr got corrupted.  There's not much code between the
actual hardware entry and this warning.

--Andy

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

* WARNING in do_syscall_64
@ 2021-09-03  7:33 Hao Sun
  0 siblings, 0 replies; 3+ messages in thread
From: Hao Sun @ 2021-09-03  7:33 UTC (permalink / raw)
  To: axboe, linux-block; +Cc: linux-kernel

Hello,

When using Healer to fuzz the latest Linux kernel, the following crash
was triggered.

HEAD commit: 7d2a07b76933 Linux 5.14
git tree: upstream
console output:
https://drive.google.com/file/d/16u3wNG5yzVrVg2JgCh02xnbl-Jhgixy9/view?usp=sharing
kernel config: https://drive.google.com/file/d/1XD9WYDViQLSXN7RGwH8AGGDvP9JvOghx/view?usp=sharing
C reproducer: https://drive.google.com/file/d/1aRcBubQfi5DpLd4GF1B3b9SzHCh6kV8-/view?usp=sharing
Syzlang reproducer:
https://drive.google.com/file/d/1HWH_QhAdw0_llycc4qYMwSXhH17BqB-m/view?usp=sharing

If you fix this issue, please add the following tag to the commit:
Reported-by: Hao Sun <sunhao.th@gmail.com>

loop3: detected capacity change from 0 to 20480
FAULT_INJECTION: forcing a failure.
name failslab, interval 1, probability 0, space 0, times 1
CPU: 0 PID: 8075 Comm: syz-executor Not tainted 5.14.0 #25
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
1.13.0-1ubuntu1.1 04/01/2014
Call Trace:
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x8b/0xb3 lib/dump_stack.c:105
 fail_dump lib/fault-inject.c:52 [inline]
 should_fail.cold+0x5/0xa lib/fault-inject.c:146
 should_failslab+0x5/0x10 mm/slab_common.c:1326
 slab_pre_alloc_hook mm/slab.h:494 [inline]
 slab_alloc_node mm/slub.c:2880 [inline]
 slab_alloc mm/slub.c:2967 [inline]
 kmem_cache_alloc_trace+0x62/0x350 mm/slub.c:2984
 kmalloc include/linux/slab.h:591 [inline]
 kzalloc include/linux/slab.h:721 [inline]
 device_private_init drivers/base/core.c:3197 [inline]
 device_add+0x114a/0x2030 drivers/base/core.c:3247
 device_create_groups_vargs+0x203/0x280 drivers/base/core.c:4014
 device_create+0xdf/0x120 drivers/base/core.c:4056
 bdi_register_va.part.0+0x9c/0x800 mm/backing-dev.c:871
 bdi_register_va mm/backing-dev.c:906 [inline]
 bdi_register+0x12a/0x140 mm/backing-dev.c:903
 __device_add_disk+0x923/0xd10 block/genhd.c:521
 add_disk include/linux/genhd.h:217 [inline]
 loop_add+0x6ec/0x8c0 drivers/block/loop.c:2395
 loop_control_ioctl+0x130/0x3c0 drivers/block/loop.c:2492
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:1069 [inline]
 __se_sys_ioctl fs/ioctl.c:1055 [inline]
 __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:1055
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x4739cd
Code: 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa 48 89 f8 48
89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d
01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f83625f8198 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 000000000059c0a0 RCX: 00000000004739cd
RDX: 0000000000000000 RSI: 0000000000004c80 RDI: 0000000000000003
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000038
R13: 00007ffc4876caff R14: 00007ffc4876cca0 R15: 00007f83625f8300
------------[ cut here ]------------
WARNING: CPU: 0 PID: 8075 at block/genhd.c:523
__device_add_disk+0xba9/0xd10 block/genhd.c:523
Modules linked in:
CPU: 0 PID: 8075 Comm: syz-executor Not tainted 5.14.0 #25
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
1.13.0-1ubuntu1.1 04/01/2014
RIP: 0010:__device_add_disk+0xba9/0xd10 block/genhd.c:523
Code: fd ff ff 4c 89 ef 89 44 24 28 e8 22 a5 f3 fd 8b 44 24 28 e9 6f
fd ff ff 4c 89 ef e8 a1 a4 f3 fd e9 d5 fd ff ff e8 f7 b6 ac fd <0f> 0b
e9 8c fd ff ff 48 8b 7c 24 08 e8 96 a4 f3 fd e9 0a f6 ff ff
RSP: 0018:ffffc90005a27dc0 EFLAGS: 00010212
RAX: 000000000002e311 RBX: ffff88810d55c380 RCX: 0000000000040000
RDX: ffffc900012e9000 RSI: ffff888102aa9cc0 RDI: 0000000000000002
R10: 0000000000000005 R11: fffffbfff1eb371f R12: 0000000000000001
FS:  00007f83625f8700(0000) GS:ffff888119e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
PKRU: 55555554
Call Trace:
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
Code: 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa 48 89 f8 48
89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d
01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RAX: ffffffffffffffda RBX: 000000000059c0a0 RCX: 00000000004739cd
RDX: 0000000000000000 RSI: 0000000000004c80 RDI: 0000000000000003
RBP: 00007f83625f81d0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000038
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 8075 Comm: syz-executor Not tainted 5.14.0 #25
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
1.13.0-1ubuntu1.1 04/01/2014
Call Trace:
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x8b/0xb3 lib/dump_stack.c:105
 panic+0x306/0x73d kernel/panic.c:232
 __warn.cold+0x20/0x2f kernel/panic.c:606
 report_bug+0x273/0x300 lib/bug.c:199
 exc_invalid_op+0x14/0x40 arch/x86/kernel/traps.c:259
 asm_exc_invalid_op+0x12/0x20 arch/x86/include/asm/idtentry.h:566
RIP: 0010:__device_add_disk+0xba9/0xd10 block/genhd.c:523
Code: fd ff ff 4c 89 ef 89 44 24 28 e8 22 a5 f3 fd 8b 44 24 28 e9 6f
fd ff ff 4c 89 ef e8 a1 a4 f3 fd e9 d5 fd ff ff e8 f7 b6 ac fd <0f> 0b
e9 8c fd ff ff 48 8b 7c 24 08 e8 96 a4 f3 fd e9 0a f6 ff ff
RAX: 000000000002e311 RBX: ffff88810d55c380 RCX: 0000000000040000
RDX: ffffc900012e9000 RSI: ffff888102aa9cc0 RDI: 0000000000000002
RBP: ffff88810b438800 R08: ffffffff83c84189 R09: 0000000000000000
R10: 0000000000000005 R11: fffffbfff1eb371f R12: 0000000000000001
R13: ffff88810d55c85c R14: ffff88810b4388a0 R15: 0000000000000000
 add_disk include/linux/genhd.h:217 [inline]
 loop_add+0x6ec/0x8c0 drivers/block/loop.c:2395
 loop_control_ioctl+0x130/0x3c0 drivers/block/loop.c:2492
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:1069 [inline]
 __se_sys_ioctl fs/ioctl.c:1055 [inline]
 __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:1055
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x4739cd
Code: 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa 48 89 f8 48
89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d
01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f83625f8198 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 000000000059c0a0 RCX: 00000000004739cd
RDX: 0000000000000000 RSI: 0000000000004c80 RDI: 0000000000000003
RBP: 00007f83625f81d0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000038
R13: 00007ffc4876caff R14: 00007ffc4876cca0 R15: 00007f83625f8300
Dumping ftrace buffer:
   (ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 1 seconds..
----------------
Code disassembly (best guess):
   0: 02 b8 ff ff ff ff    add    -0x1(%rax),%bh
   6: c3                    retq
   7: 66 0f 1f 44 00 00    nopw   0x0(%rax,%rax,1)
   d: f3 0f 1e fa          endbr64
  11: 48 89 f8              mov    %rdi,%rax
  14: 48 89 f7              mov    %rsi,%rdi
  17: 48 89 d6              mov    %rdx,%rsi
  1a: 48 89 ca              mov    %rcx,%rdx
  1d: 4d 89 c2              mov    %r8,%r10
  20: 4d 89 c8              mov    %r9,%r8
  23: 4c 8b 4c 24 08        mov    0x8(%rsp),%r9
  28: 0f 05                syscall
* 2a: 48 3d 01 f0 ff ff    cmp    $0xfffffffffffff001,%rax <--
trapping instruction
  30: 73 01                jae    0x33
  32: c3                    retq
  33: 48 c7 c1 bc ff ff ff mov    $0xffffffffffffffbc,%rcx
  3a: f7 d8                neg    %eax
  3c: 64 89 01              mov    %eax,%fs:(%rcx)
  3f: 48                    rex.W

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

end of thread, other threads:[~2021-09-03  7:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-19  7:42 WARNING in do_syscall_64 syzbot
2020-07-19 15:12 ` Andy Lutomirski
2021-09-03  7:33 Hao Sun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome