syzbot


general protection fault in loop_validate_file (2)

Status: fixed on 2019/04/01 10:28
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+9bdc1adc1c55e7fe765b@syzkaller.appspotmail.com
Fix commit: f7c8a4120eed loop: access lo_backing_file only when the loop device is Lo_bound
First crash: 1893d, last: 1889d
Discussions (4)
Title Replies (including bot) Last reply
[PATCH 5.0 00/52] 5.0.5-stable review 61 (61) 2019/03/27 05:06
[PATCH 4.19 00/45] 4.19.32-stable review 51 (51) 2019/03/27 04:04
general protection fault in loop_validate_file (2) 6 (7) 2019/03/20 13:43
[PATCH 1/1] loop: access lo_backing_file only when the loop device is Lo_bound 2 (2) 2019/03/18 14:21
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-44 general protection fault in loop_validate_file syz 20 1947d 1865d 0/2 public: reported syz repro on 2019/04/14 00:02
android-414 general protection fault in loop_validate_file 4 1955d 1865d 0/1 auto-closed as invalid on 2019/07/13 08:46
upstream general protection fault in loop_validate_file block C 19 1980d 2164d 0/26 closed as dup on 2018/06/18 14:51
android-49 general protection fault in loop_validate_file syz 28 1722d 1865d 0/3 public: reported syz repro on 2019/04/14 09:28
android-414 general protection fault in loop_validate_file (2) syz 6 1719d 1765d 0/1 public: reported syz repro on 2019/07/22 13:25
linux-4.14 general protection fault in loop_validate_file C error 9 445d 1728d 0/1 upstream: reported C repro on 2019/08/28 22:28

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] PREEMPT SMP KASAN
CPU: 0 PID: 16621 Comm: syz-executor.5 Not tainted 5.1.0-rc1+ #30
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:loop_validate_file+0x23e/0x310 drivers/block/loop.c:652
Code: 00 48 89 f8 48 c1 e8 03 42 80 3c 38 00 0f 85 d4 00 00 00 4d 8b a4 24 f0 00 00 00 49 8d bc 24 b8 01 00 00 48 89 f8 48 c1 e8 03 <42> 80 3c 38 00 0f 85 a8 00 00 00 4d 8b a4 24 b8 01 00 00 4c 89 e0
RSP: 0018:ffff88807d077b18 EFLAGS: 00010202
RAX: 0000000000000037 RBX: ffff88807fc67a98 RCX: ffffc900108bc000
RDX: 00000000000000a7 RSI: ffffffff83e7619d RDI: 00000000000001b8
RBP: ffff88807d077b40 R08: ffff8880630b01c0 R09: fffffbfff11d9825
R10: ffff88807d077b40 R11: ffffffff88ecc127 R12: 0000000000000000
R13: 0000000000000002 R14: ffff8880a6db9080 R15: dffffc0000000000
FS:  00007fafbf0a1700(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004dc188 CR3: 000000009ea34000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 loop_set_fd drivers/block/loop.c:930 [inline]
 lo_ioctl+0x99d/0x2150 drivers/block/loop.c:1542
 __blkdev_driver_ioctl block/ioctl.c:303 [inline]
 blkdev_ioctl+0xee8/0x1c40 block/ioctl.c:605
 block_ioctl+0xee/0x130 fs/block_dev.c:1931
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:509 [inline]
 do_vfs_ioctl+0xd6e/0x1390 fs/ioctl.c:696
 ksys_ioctl+0xab/0xd0 fs/ioctl.c:713
 __do_sys_ioctl fs/ioctl.c:720 [inline]
 __se_sys_ioctl fs/ioctl.c:718 [inline]
 __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718
 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x458079
Code: ad b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 7b b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fafbf0a0c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000458079
RDX: 0000000000000004 RSI: 0000000000004c00 RDI: 0000000000000003
RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fafbf0a16d4
R13: 00000000004c1252 R14: 00000000004d31a0 R15: 00000000ffffffff
Modules linked in:
---[ end trace 956d3aa12fd395cf ]---
RIP: 0010:loop_validate_file+0x23e/0x310 drivers/block/loop.c:652
Code: 00 48 89 f8 48 c1 e8 03 42 80 3c 38 00 0f 85 d4 00 00 00 4d 8b a4 24 f0 00 00 00 49 8d bc 24 b8 01 00 00 48 89 f8 48 c1 e8 03 <42> 80 3c 38 00 0f 85 a8 00 00 00 4d 8b a4 24 b8 01 00 00 4c 89 e0
RSP: 0018:ffff88807d077b18 EFLAGS: 00010202
RAX: 0000000000000037 RBX: ffff88807fc67a98 RCX: ffffc900108bc000
RDX: 00000000000000a7 RSI: ffffffff83e7619d RDI: 00000000000001b8
RBP: ffff88807d077b40 R08: ffff8880630b01c0 R09: fffffbfff11d9825
R10: ffff88807d077b40 R11: ffffffff88ecc127 R12: 0000000000000000
R13: 0000000000000002 R14: ffff8880a6db9080 R15: dffffc0000000000
FS:  00007fafbf0a1700(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000f019b8 CR3: 000000009ea34000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/03/20 17:03 upstream babf09c3837f a664c187 .config console log report ci-upstream-kasan-gce-selinux-root
2019/03/20 03:02 upstream b7a42146dca3 2458c1c6 .config console log report ci-upstream-kasan-gce
2019/03/16 23:39 upstream 9c7dc824d9a4 bab43553 .config console log report ci-upstream-kasan-gce
* Struck through repros no longer work on HEAD.