syzbot


general protection fault in path_openat

Status: fixed on 2020/02/18 14:31
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+190005201ced78a74ad6@syzkaller.appspotmail.com
Fix commit: 6404674acd59 vfs: fix do_last() regression
First crash: 1782d, last: 1778d
Cause bisection: introduced by (bisect log) :
commit d0cb50185ae942b03c4327be322055d622dc79f6
Author: Al Viro <viro@zeniv.linux.org.uk>
Date: Sun Jan 26 14:29:34 2020 +0000

  do_last(): fetch directory ->i_mode and ->i_uid before it's too late

Crash: general protection fault in path_openat (log)
Repro: C syz .config
  
Discussions (9)
Title Replies (including bot) Last reply
[PATCH 3.16 000/245] 3.16.83-rc1 review 260 (260) 2020/04/24 17:54
[PATCH 5.5 00/23] 5.5.2-stable review 31 (31) 2020/02/08 16:13
[PATCH 4.4 00/53] 4.4.213-stable review 63 (63) 2020/02/05 22:37
[PATCH 5.4 00/90] 5.4.18-stable review 107 (107) 2020/02/05 21:21
[PATCH 4.19 00/70] 4.19.102-stable review 77 (77) 2020/02/05 14:42
[PATCH 4.14 00/89] 4.14.170-stable review 93 (93) 2020/02/04 17:19
[PATCH 4.9 00/68] 4.9.213-stable review 72 (72) 2020/02/04 17:18
[PATCH] fix do_last() regression 4 (4) 2020/02/01 18:37
general protection fault in path_openat 1 (3) 2020/02/01 17:08
Similar bugs (7)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: unable to handle kernel paging request in path_openat reiserfs C error inconclusive 52 346d 743d 0/28 auto-obsoleted due to no activity on 2024/04/12 10:28
android-5-10 general protection fault in path_openat C done 30 13d 573d 0/2 upstream: reported C repro on 2023/05/21 01:33
linux-4.19 general protection fault in path_openat C done 13 1774d 1780d 1/1 fixed on 2020/03/06 08:34
linux-4.14 general protection fault in path_openat C done 40 1774d 1780d 1/1 fixed on 2020/03/06 21:15
android-5-15 general protection fault in path_openat origin:downstream C done 7 28d 573d 0/2 upstream: reported C repro on 2023/05/21 01:53
android-6-1 general protection fault in path_openat origin:downstream C done error 6 107d 573d 0/2 upstream: reported C repro on 2023/05/21 01:53
android-54 general protection fault in path_openat syz 26 1773d 1780d 1/2 fixed on 2021/10/12 13:38

Sample crash report:
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: 3515 Comm: modprobe Not tainted 5.5.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:do_last fs/namei.c:3336 [inline]
RIP: 0010:path_openat+0x281/0x3460 fs/namei.c:3607
Code: ff df 48 c1 ea 03 80 3c 02 00 0f 85 76 29 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 5c 24 58 48 8d 7b 04 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 28
RSP: 0018:ffffc90003c37a40 EFLAGS: 00010247
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff81c24369
RDX: 0000000000000000 RSI: ffffffff81c24376 RDI: 0000000000000004
RBP: ffffc90003c37b90 R08: ffff88809dca63c0 R09: ffffed1015416ca2
R10: ffffed1015416ca1 R11: ffff8880aa0b6508 R12: ffff8880aa0b64a0
R13: ffff88809dca63c0 R14: ffffc90003c37d98 R15: ffffc90003c37bd0
FS:  00007f70d677c700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000009a184000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 do_filp_open+0x192/0x260 fs/namei.c:3637
 do_sys_openat2+0x5eb/0x7e0 fs/open.c:1149
 do_sys_open+0xf2/0x180 fs/open.c:1165
 ksys_open include/linux/syscalls.h:1386 [inline]
 __do_sys_open fs/open.c:1171 [inline]
 __se_sys_open fs/open.c:1169 [inline]
 __x64_sys_open+0x7e/0xc0 fs/open.c:1169
 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f70d6094120
Code: 48 8b 15 1b 4d 2b 00 f7 d8 64 89 02 83 c8 ff c3 90 90 90 90 90 90 90 90 90 90 83 3d d5 a4 2b 00 00 75 10 b8 02 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 5e 8c 01 00 48 89 04 24
RSP: 002b:00007ffdbe2762c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000002
RAX: ffffffffffffffda RBX: 0000558ff35f3240 RCX: 00007f70d6094120
RDX: 00007ffdbe2764fc RSI: 0000000000080000 RDI: 00007ffdbe2764e0
RBP: 00007f70d6564300 R08: 0000000000000000 R09: 0000558ff35f3219
R10: 0000000000000000 R11: 0000000000000246 R12: 0000558ff35eb210
R13: 0000558ff35f3210 R14: 0000558ff35eb210 R15: 00007ffdbe2764e0
Modules linked in:
---[ end trace bdc3fba9ce9969a3 ]---
RIP: 0010:do_last fs/namei.c:3336 [inline]
RIP: 0010:path_openat+0x281/0x3460 fs/namei.c:3607
Code: ff df 48 c1 ea 03 80 3c 02 00 0f 85 76 29 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 5c 24 58 48 8d 7b 04 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 28
RSP: 0018:ffffc90003c37a40 EFLAGS: 00010247
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff81c24369
RDX: 0000000000000000 RSI: ffffffff81c24376 RDI: 0000000000000004
RBP: ffffc90003c37b90 R08: ffff88809dca63c0 R09: ffffed1015416ca2
R10: ffffed1015416ca1 R11: ffff8880aa0b6508 R12: ffff8880aa0b64a0
R13: ffff88809dca63c0 R14: ffffc90003c37d98 R15: ffffc90003c37bd0
FS:  00007f70d677c700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fdd12577518 CR3: 000000009a184000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/02/01 03:07 upstream ccaaaf6fe5a5 c30117b2 .config console log report syz C ci-upstream-kasan-gce-root
2020/02/01 01:04 upstream ccaaaf6fe5a5 c30117b2 .config console log report ci-upstream-kasan-gce-selinux-root
2020/01/31 18:35 upstream ccaaaf6fe5a5 c30117b2 .config console log report ci-upstream-kasan-gce-root
2020/01/31 07:49 upstream 9f68e3655aae 5ed23f9a .config console log report ci-upstream-kasan-gce-root
2020/01/29 15:57 upstream b3a608222336 5ed23f9a .config console log report ci-qemu-upstream
2020/01/29 09:03 upstream b3a608222336 c8e81ce4 .config console log report ci-qemu-upstream
2020/01/28 04:43 upstream b0be0eff1a5a 56cd6c9b .config console log report ci-qemu-upstream
* Struck through repros no longer work on HEAD.