syzbot


kernel BUG in commit_creds

Status: fixed on 2023/02/24 13:50
Subsystems: io-uring
[Documentation on labels]
Reported-by: syzbot+60c52ca98513a8760a91@syzkaller.appspotmail.com
Fix commit: 701521403cfb io_uring: abort file assignment prior to assigning creds
First crash: 776d, last: 771d
Cause bisection: introduced by (bisect log) :
commit 6bf9c47a398911e0ab920e362115153596c80432
Author: Jens Axboe <axboe@kernel.dk>
Date: Tue Mar 29 16:10:08 2022 +0000

  io_uring: defer file assignment

Crash: kernel BUG in commit_creds (log)
Repro: C syz .config
  
Discussions (3)
Title Replies (including bot) Last reply
[PATCH 5.17 000/219] 5.17.4-rc1 review 231 (231) 2022/04/20 04:44
[syzbot] kernel BUG in commit_creds 1 (3) 2022/04/15 04:04
[PATCH] io_uring: abort file assignment prior to assigning creds 1 (1) 2022/04/15 03:41
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG in commit_creds (2) kernel 1 408d 404d 0/26 auto-obsoleted due to no activity on 2023/08/15 16:17
Last patch testing requests (1)
Created Duration User Patch Repo Result
2022/04/15 02:29 9m axboe@kernel.dk git://git.kernel.dk/linux-block io_uring-5.18 OK

Sample crash report:
------------[ cut here ]------------
kernel BUG at kernel/cred.c:456!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 3596 Comm: syz-executor303 Not tainted 5.18.0-rc2-syzkaller-00122-gb9b4c79e5830 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:commit_creds+0xf33/0x1360 kernel/cred.c:456
Code: 84 d2 0f 85 94 03 00 00 45 8b 74 24 2c 89 de 44 89 f7 e8 40 66 29 00 41 39 de 0f 85 03 f8 ff ff e9 10 f8 ff ff e8 2d 63 29 00 <0f> 0b e8 26 63 29 00 0f 0b e8 1f 63 29 00 0f 0b 48 89 cf e8 55 fc
RSP: 0018:ffffc900038efc58 EFLAGS: 00010293
RAX: 0000000000000000 RBX: dffffc0000000000 RCX: 0000000000000000
RDX: ffff888018ef1d00 RSI: ffffffff814fb873 RDI: ffff888070527200
RBP: ffff888070527200 R08: 0000000000000000 R09: 000000000834d300
R10: ffffffff83af84a5 R11: 0000000000000000 R12: ffff888070527100
R13: ffff888018ef1d00 R14: ffff888018ef1d00 R15: ffffed10031de4a4
FS:  00005555561b1300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000144 CR3: 000000007fb1f000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 install_process_keyring security/keys/process_keys.c:306 [inline]
 lookup_user_key+0x534/0x1270 security/keys/process_keys.c:653
 __do_sys_add_key+0x1d3/0x430 security/keys/keyctl.c:126
 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:0x7fcffb7b3249
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff804cfef8 EFLAGS: 00000246 ORIG_RAX: 00000000000000f8
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fcffb7b3249
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200000c0
RBP: 00007fcffb777230 R08: 00000000ffffffff R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fcffb7772c0
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:commit_creds+0xf33/0x1360 kernel/cred.c:456
Code: 84 d2 0f 85 94 03 00 00 45 8b 74 24 2c 89 de 44 89 f7 e8 40 66 29 00 41 39 de 0f 85 03 f8 ff ff e9 10 f8 ff ff e8 2d 63 29 00 <0f> 0b e8 26 63 29 00 0f 0b e8 1f 63 29 00 0f 0b 48 89 cf e8 55 fc
RSP: 0018:ffffc900038efc58 EFLAGS: 00010293
RAX: 0000000000000000 RBX: dffffc0000000000 RCX: 0000000000000000
RDX: ffff888018ef1d00 RSI: ffffffff814fb873 RDI: ffff888070527200
RBP: ffff888070527200 R08: 0000000000000000 R09: 000000000834d300
R10: ffffffff83af84a5 R11: 0000000000000000 R12: ffff888070527100
R13: ffff888018ef1d00 R14: ffff888018ef1d00 R15: ffffed10031de4a4
FS:  00005555561b1300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000144 CR3: 000000007fb1f000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/04/14 23:20 upstream b9b4c79e5830 b17b2923 .config console log report syz C ci-upstream-kasan-gce kernel BUG in commit_creds
2022/04/14 20:15 linux-next 40354149f4d7 b17b2923 .config console log report syz C ci-upstream-linux-next-kasan-gce-root kernel BUG in commit_creds
2022/04/19 04:48 linux-next 40354149f4d7 8bcc32a6 .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in commit_creds
2022/04/19 03:16 linux-next 40354149f4d7 8bcc32a6 .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in commit_creds
2022/04/14 19:53 linux-next 40354149f4d7 b17b2923 .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in commit_creds
* Struck through repros no longer work on HEAD.