syzbot


general protection fault in io_uring_show_cred

Status: fixed on 2020/11/20 14:54
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+a6d494688cdb797bdfce@syzkaller.appspotmail.com
Fix commit: 6b47ab81c9a9 io_uring: use correct pointer for io_uring_show_cred()
First crash: 1268d, last: 1268d
Cause bisection: introduced by (bisect log) :
commit 1e6fa5216a0e59ef02e8b6b40d553238a3b81d49
Author: Jens Axboe <axboe@kernel.dk>
Date: Thu Oct 15 14:46:24 2020 +0000

  io_uring: COW io_identity on mismatch

Crash: BUG: unable to handle kernel paging request in io_uring_show_cred (log)
Repro: C syz .config
  
Duplicate bugs (2)
duplicates (2):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
KASAN: use-after-free Read in io_uring_show_cred fs C done 6 1268d 1267d 0/26 closed as dup on 2020/11/05 16:50
KASAN: slab-out-of-bounds Read in io_uring_show_cred fs 1 1268d 1263d 0/26 closed as dup on 2020/11/09 18:08
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] io_uring: use correct pointer for io_uring_show_cred() 1 (1) 2020/11/05 16:52
general protection fault in io_uring_show_cred 1 (2) 2020/11/05 16:49

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc04422cfb38: 0000 [#1] PREEMPT SMP KASAN
KASAN: probably user-memory-access in range [0x000000221167d9c0-0x000000221167d9c7]
CPU: 0 PID: 8480 Comm: syz-executor292 Not tainted 5.10.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:io_uring_show_cred+0x32f/0x5f0 fs/io_uring.c:8922
Code: 3c 02 00 0f 85 a8 02 00 00 49 8b ae a0 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 8d 4d 04 48 89 ca 48 89 4c 24 18 48 c1 ea 03 <0f> b6 14 02 48 89 c8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 e4
RSP: 0018:ffffc900015ff9f0 EFLAGS: 00010203
RAX: dffffc0000000000 RBX: ffff8880213f4c00 RCX: 000000221167d9c4
RDX: 00000004422cfb38 RSI: ffffffff81d32adc RDI: ffff888014b101a0
RBP: 000000221167d9c0 R08: 0000000000000001 R09: ffff8880272840ce
R10: ffffed1004e50819 R11: 0000000000000000 R12: 0000000000000001
R13: ffff8880136c4cb8 R14: ffff888014b10100 R15: ffffffff8b1fe940
FS:  0000000001182880(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000455310 CR3: 000000001b604000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 idr_for_each+0x113/0x220 lib/idr.c:208
 __io_uring_show_fdinfo fs/io_uring.c:8974 [inline]
 io_uring_show_fdinfo+0x923/0xda0 fs/io_uring.c:8996
 seq_show+0x4a8/0x700 fs/proc/fd.c:65
 seq_read+0x432/0x1070 fs/seq_file.c:208
 do_loop_readv_writev fs/read_write.c:761 [inline]
 do_loop_readv_writev fs/read_write.c:748 [inline]
 do_iter_read+0x48e/0x6e0 fs/read_write.c:803
 vfs_readv+0xe5/0x150 fs/read_write.c:921
 do_preadv fs/read_write.c:1013 [inline]
 __do_sys_preadv fs/read_write.c:1063 [inline]
 __se_sys_preadv fs/read_write.c:1058 [inline]
 __x64_sys_preadv+0x231/0x310 fs/read_write.c:1058
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x4403a9
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 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 db 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fff45cb17f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000127
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004403a9
RDX: 0000000000000333 RSI: 00000000200017c0 RDI: 0000000000000004
RBP: 00000000006ca018 R08: 0000000000000000 R09: 65732f636f72702f
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401c10
R13: 0000000000401ca0 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 2f3a282977161035 ]---
RIP: 0010:io_uring_show_cred+0x32f/0x5f0 fs/io_uring.c:8922
Code: 3c 02 00 0f 85 a8 02 00 00 49 8b ae a0 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 8d 4d 04 48 89 ca 48 89 4c 24 18 48 c1 ea 03 <0f> b6 14 02 48 89 c8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 e4
RSP: 0018:ffffc900015ff9f0 EFLAGS: 00010203
RAX: dffffc0000000000 RBX: ffff8880213f4c00 RCX: 000000221167d9c4
RDX: 00000004422cfb38 RSI: ffffffff81d32adc RDI: ffff888014b101a0
RBP: 000000221167d9c0 R08: 0000000000000001 R09: ffff8880272840ce
R10: ffffed1004e50819 R11: 0000000000000000 R12: 0000000000000001
R13: ffff8880136c4cb8 R14: ffff888014b10100 R15: ffffffff8b1fe940
FS:  0000000001182880(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000455310 CR3: 000000001b604000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/11/05 06:20 upstream 4ef8451b3326 64069d48 .config console log report syz C ci-upstream-kasan-gce-root
2020/11/05 05:57 upstream 4ef8451b3326 64069d48 .config console log report info ci-upstream-kasan-gce-smack-root
2020/11/05 05:55 upstream 4ef8451b3326 64069d48 .config console log report info ci-upstream-kasan-gce-root
2020/11/05 05:55 upstream 4ef8451b3326 64069d48 .config console log report info ci-upstream-kasan-gce-root
* Struck through repros no longer work on HEAD.