general protection fault in proc_map_files_readdir

Status: upstream: reported C repro on 2026/07/24 20:44
Reported-by: syzbot+d999409d5f3eeec9c1a6@syzkaller.appspotmail.com
First crash: 2d10h, last: 17h53m

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc000000002b: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000158-0x000000000000015f]
CPU: 1 PID: 4681 Comm: syz.4.114 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
RIP: 0010:__lock_acquire+0xf8/0x7c40 kernel/locking/lockdep.c:4933
Code: 42 0f b6 04 00 84 c0 0f 85 e9 64 00 00 83 3d 52 40 bd 0c 00 0f 84 80 27 00 00 83 3d 41 b9 3b 0b 00 74 2a 4c 89 e8 48 c1 e8 03 <42> 80 3c 00 00 74 12 4c 89 ef e8 39 61 6f 00 49 b8 00 00 00 00 00
RSP: 0018:ffffc900040af820 EFLAGS: 00010006
RAX: 000000000000002b RBX: 0000000000000000 RCX: 1ffff92000815f24
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000158
RBP: ffffc900040afa50 R08: dffffc0000000000 R09: 0000000000000000
R10: dffffc0000000000 R11: fffffbfff1c4215e R12: 0000000000000001
R13: 0000000000000158 R14: 0000000000000000 R15: 0000000000000001
FS:  000055556f613500(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000004280 CR3: 000000001bfa0000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 lock_acquire+0x1bb/0x4a0 kernel/locking/lockdep.c:5676
 down_read_killable+0x4c/0x340 kernel/locking/rwsem.c:1543
 mmap_read_lock_killable include/linux/mmap_lock.h:126 [inline]
 proc_map_files_readdir+0x3c1/0x970 fs/proc/base.c:2413
 iterate_dir+0x213/0x550 fs/readdir.c:-1
 __do_sys_getdents64 fs/readdir.c:369 [inline]
 __se_sys_getdents64+0xf2/0x270 fs/readdir.c:354
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f08e139de99
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe08cfbba8 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9
RAX: ffffffffffffffda RBX: 00007f08e1625fa0 RCX: 00007f08e139de99
RDX: 000000000000005e RSI: 0000200000000280 RDI: 0000000000000005
RBP: 00007f08e1433eaf R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f08e1625fac R14: 00007f08e1625fa0 R15: 00007f08e1625fa0
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__lock_acquire+0xf8/0x7c40 kernel/locking/lockdep.c:4933
Code: 42 0f b6 04 00 84 c0 0f 85 e9 64 00 00 83 3d 52 40 bd 0c 00 0f 84 80 27 00 00 83 3d 41 b9 3b 0b 00 74 2a 4c 89 e8 48 c1 e8 03 <42> 80 3c 00 00 74 12 4c 89 ef e8 39 61 6f 00 49 b8 00 00 00 00 00
RSP: 0018:ffffc900040af820 EFLAGS: 00010006
RAX: 000000000000002b RBX: 0000000000000000 RCX: 1ffff92000815f24
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000158
RBP: ffffc900040afa50 R08: dffffc0000000000 R09: 0000000000000000
R10: dffffc0000000000 R11: fffffbfff1c4215e R12: 0000000000000001
R13: 0000000000000158 R14: 0000000000000000 R15: 0000000000000001
FS:  000055556f613500(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000004280 CR3: 000000001bfa0000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	42 0f b6 04 00       	movzbl (%rax,%r8,1),%eax
   5:	84 c0                	test   %al,%al
   7:	0f 85 e9 64 00 00    	jne    0x64f6
   d:	83 3d 52 40 bd 0c 00 	cmpl   $0x0,0xcbd4052(%rip)        # 0xcbd4066
  14:	0f 84 80 27 00 00    	je     0x279a
  1a:	83 3d 41 b9 3b 0b 00 	cmpl   $0x0,0xb3bb941(%rip)        # 0xb3bb962
  21:	74 2a                	je     0x4d
  23:	4c 89 e8             	mov    %r13,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 00 00       	cmpb   $0x0,(%rax,%r8,1) <-- trapping instruction
  2f:	74 12                	je     0x43
  31:	4c 89 ef             	mov    %r13,%rdi
  34:	e8 39 61 6f 00       	call   0x6f6172
  39:	49                   	rex.WB
  3a:	b8 00 00 00 00       	mov    $0x0,%eax

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/07/26 13:49 linux-6.1.y dc5c83b7f5f8 492bab15 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan general protection fault in proc_map_files_readdir
2026/07/26 12:29 linux-6.1.y dc5c83b7f5f8 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in proc_map_files_readdir
2026/07/26 12:26 linux-6.1.y dc5c83b7f5f8 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in proc_map_files_readdir
2026/07/24 20:44 linux-6.1.y dc5c83b7f5f8 dd737a83 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in proc_map_files_readdir
* Struck through repros no longer work on HEAD.