syzbot


general protection fault in lo_ioctl (2)

Status: fixed on 2019/01/15 20:25
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+bf89c128e05dd6c62523@syzkaller.appspotmail.com
Fix commit: 310ca162d779 block/loop: Use global lock for ioctl() operation.
First crash: 2431d, last: 2417d
Duplicate bugs (1)
duplicates (1):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
general protection fault in loop_validate_file block C 19 2185d 2369d 0/28 closed as dup on 2018/06/18 14:51
Discussions (17)
Title Replies (including bot) Last reply
[PATCH 4.19 00/99] 4.19.17-stable review 109 (109) 2019/04/22 19:40
[PATCH 4.4 000/104] 4.4.172-stable review 111 (111) 2019/01/30 07:30
[PATCH 3.18 00/52] 3.18.133-stable review 55 (55) 2019/01/25 23:16
[PATCH 4.14 00/59] 4.14.95-stable review 65 (65) 2019/01/23 12:55
[PATCH 4.9 00/51] 4.9.152-stable review 56 (56) 2019/01/23 09:06
[PATCH 4.20 000/111] 4.20.4-stable review 120 (120) 2019/01/23 06:43
[PATCH 0/16 v3] loop: Fix oops and possible deadlocks 22 (22) 2018/11/12 10:15
[PATCH 0/15 v2] loop: Fix oops and possible deadlocks 24 (24) 2018/10/17 09:47
[PATCH 0/14] loop: Fix oops and possible deadlocks 17 (17) 2018/10/04 10:15
[PATCH 1/4] block/loop: Don't grab "struct file" for vfs_getattr() operation. 8 (8) 2018/09/27 11:42
[PATCH v3 (resend)] block/loop: Serialize ioctl operations. 11 (11) 2018/09/25 09:57
[PATCH] block/loop: Use global lock for ioctl() operation. 3 (3) 2018/09/25 08:41
possible deadlock in blkdev_reread_part 11 (11) 2018/09/17 13:57
[PATCH v3] block/loop: Serialize ioctl operations. 6 (6) 2018/08/28 10:31
[PATCH] loop: add recursion validation to LOOP_CHANGE_FD 17 (17) 2018/06/05 15:07
[PATCH v2] block/loop: Serialize ioctl operations. 1 (1) 2018/05/09 10:54
general protection fault in lo_ioctl (2) 5 (6) 2018/05/08 21:06
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-49 general protection fault in lo_ioctl 13 2364d 2696d 0/3 closed as invalid on 2019/01/01 20:10
upstream general protection fault in lo_ioctl 17 2602d 2596d 0/28 closed as invalid on 2018/02/12 16:15
android-44 general protection fault in lo_ioctl 1 2374d 2373d 0/2 auto-closed as invalid on 2019/02/22 15:09

Sample crash report:
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN
Dumping ftrace buffer:
   (ftrace buffer empty)
Modules linked in:
CPU: 0 PID: 10637 Comm: syz-executor1 Not tainted 4.17.0-rc3+ #52
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:loop_set_fd drivers/block/loop.c:901 [inline]
RIP: 0010:lo_ioctl+0x1ae8/0x2130 drivers/block/loop.c:1397
RSP: 0018:ffff8801bd6dfc08 EFLAGS: 00010202
RAX: 0000000000000037 RBX: ffff8801d296db00 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: ffffffff84b2cd57 RDI: 00000000000001b8
RBP: ffff8801bd6dfc80 R08: ffff8801c46943c0 R09: ffffed003b5c46c2
R10: 0000000000000003 R11: 0000000000000001 R12: 0000000000000000
R13: 0000000000000000 R14: ffff8801b58561a0 R15: ffff8801b58560c0
FS:  0000000000000000(0000) GS:ffff8801dae00000(0063) knlGS:00000000f7f2eb40
CS:  0010 DS: 002b ES: 002b CR0: 0000000080050033
CR2: 0000000008138024 CR3: 00000001d03df000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 lo_compat_ioctl+0xc1/0x170 drivers/block/loop.c:1602
 compat_blkdev_ioctl+0x3c2/0x1b20 block/compat_ioctl.c:406
 __do_compat_sys_ioctl fs/compat_ioctl.c:1461 [inline]
 __se_compat_sys_ioctl fs/compat_ioctl.c:1407 [inline]
 __ia32_compat_sys_ioctl+0x221/0x640 fs/compat_ioctl.c:1407
 do_syscall_32_irqs_on arch/x86/entry/common.c:323 [inline]
 do_fast_syscall_32+0x345/0xf9b arch/x86/entry/common.c:394
 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139
RIP: 0023:0xf7f32cb9
RSP: 002b:00000000f7f2e0ac EFLAGS: 00000282 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000004c00
RDX: 0000000000000003 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Code: e8 03 80 3c 08 00 0f 85 2c 02 00 00 4d 8b ad f0 00 00 00 48 b9 00 00 00 00 00 fc ff df 49 8d bd b8 01 00 00 48 89 f8 48 c1 e8 03 <80> 3c 08 00 0f 85 f9 01 00 00 4d 8b ad b8 01 00 00 48 b9 00 00 
RIP: loop_set_fd drivers/block/loop.c:901 [inline] RSP: ffff8801bd6dfc08
RIP: lo_ioctl+0x1ae8/0x2130 drivers/block/loop.c:1397 RSP: ffff8801bd6dfc08
---[ end trace a15583efe355602c ]---

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/05/01 22:09 upstream fff75eb2a08c d5b114b4 .config console log report syz ci-upstream-kasan-gce-386
2018/04/17 20:12 upstream a27fc14219f2 b80fd3b5 .config console log report ci-upstream-kasan-gce-root
* Struck through repros no longer work on HEAD.