syzbot


general protection fault in d_path

Status: fixed on 2024/01/20 21:18
Subsystems: integrity overlayfs
[Documentation on labels]
Reported-by: syzbot+a67fc5321ffb4b311c98@syzkaller.appspotmail.com
Fix commit: 8a924db2d7b5 fs: Pass AT_GETATTR_NOSEC flag to getattr interface function
First crash: 530d, last: 384d
Cause bisection: introduced by (bisect log) :
commit db1d1e8b9867aae5c3e61ad7859abfcc4a6fd6c7
Author: Jeff Layton <jlayton@kernel.org>
Date: Mon Apr 17 16:55:51 2023 +0000

  IMA: use vfs_getattr_nosec to get the i_version

Crash: BUG: unable to handle kernel NULL pointer dereference in d_path (log)
Repro: C syz .config
  
Discussions (13)
Title Replies (including bot) Last reply
[PATCH] fs: Pass AT_GETATTR_NOSEC flag to getattr interface function 9 (9) 2023/12/07 21:10
[PATCH 6.6 015/112] fs: Pass AT_GETATTR_NOSEC flag to getattr interface function 1 (1) 2023/11/30 16:21
[syzbot] [overlayfs?] general protection fault in d_path 21 (25) 2023/10/01 14:51
Re: [syzbot] [integrity] [overlayfs] general protection fault in d_path 3 (3) 2023/09/29 04:30
Re: [syzbot] [integrity] [overlayfs] general protection fault in d_path 2 (2) 2023/09/21 16:06
Re: [syzbot] [integrity] [overlayfs] general protection fault in d_path 1 (1) 2023/09/21 15:19
Re: [syzbot] [integrity] [overlayfs] general protection fault in d_path 1 (1) 2023/09/21 15:18
Re: [syzbot] [integrity] [overlayfs] general protection fault in d_path 1 (1) 2023/09/21 15:10
Re: [syzbot] [integrity] [overlayfs] general protection fault in d_path 1 (1) 2023/09/21 14:52
Re: [syzbot] [integrity] [overlayfs] general protection fault in d_path 1 (1) 2023/09/21 14:29
[PATCH] ima: fix wrong dereferences of file->f_path 3 (3) 2023/09/14 15:26
[syzbot] Monthly overlayfs report (Aug 2023) 0 (1) 2023/08/24 07:15
[syzbot] Monthly overlayfs report (Jul 2023) 0 (1) 2023/07/24 08:31
Last patch testing requests (1)
Created Duration User Patch Repo Result
2023/09/13 07:10 1h34m amir73il@gmail.com https://github.com/amir73il/linux ima-ovl-fix report log

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000009: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000048-0x000000000000004f]
CPU: 0 PID: 5030 Comm: syz-executor173 Not tainted 6.6.0-rc1-syzkaller-00014-ga747acc0b752 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
RIP: 0010:__seqprop_spinlock_sequence include/linux/seqlock.h:275 [inline]
RIP: 0010:get_fs_root_rcu fs/d_path.c:244 [inline]
RIP: 0010:d_path+0x2f0/0x6e0 fs/d_path.c:286
Code: 30 00 74 08 48 89 df e8 be 20 e1 ff 4c 8b 23 4d 8d 6c 24 48 49 81 c4 88 00 00 00 4c 89 eb 48 c1 eb 03 4c 89 ef e8 00 1e 00 00 <42> 0f b6 04 33 84 c0 0f 85 89 00 00 00 45 8b 7d 00 44 89 fe 83 e6
RSP: 0018:ffffc90003a7eee0 EFLAGS: 00010246
RAX: 7e73051ae5315e00 RBX: 0000000000000009 RCX: ffff88807da73b80
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90003a7eff0 R08: ffffffff82068d08 R09: 1ffffffff1d34ccd
R10: dffffc0000000000 R11: fffffbfff1d34cce R12: 0000000000000088
R13: 0000000000000048 R14: dffffc0000000000 R15: ffff8880206d8000
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f351862ebb8 CR3: 00000000276a7000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 audit_log_d_path+0xd3/0x310 kernel/audit.c:2138
 dump_common_audit_data security/lsm_audit.c:224 [inline]
 common_lsm_audit+0x7cf/0x1a90 security/lsm_audit.c:458
 smack_log+0x421/0x540 security/smack/smack_access.c:383
 smk_tskacc+0x2ff/0x360 security/smack/smack_access.c:253
 smack_inode_getattr+0x203/0x270 security/smack/smack_lsm.c:1271
 security_inode_getattr+0xd3/0x120 security/security.c:2153
 vfs_getattr+0x2a/0x3a0 fs/stat.c:206
 ovl_getattr+0x1b1/0xf70 fs/overlayfs/inode.c:174
 ima_check_last_writer security/integrity/ima/ima_main.c:171 [inline]
 ima_file_free+0x26e/0x4b0 security/integrity/ima/ima_main.c:203
 __fput+0x36a/0x910 fs/file_table.c:378
 task_work_run+0x24a/0x300 kernel/task_work.c:179
 exit_task_work include/linux/task_work.h:38 [inline]
 do_exit+0x68f/0x2290 kernel/exit.c:874
 do_group_exit+0x206/0x2c0 kernel/exit.c:1024
 get_signal+0x175d/0x1840 kernel/signal.c:2892
 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:309
 exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:168
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204
 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
 syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:296
 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f35185d8529
Code: Unable to access opcode bytes at 0x7f35185d84ff.
RSP: 002b:00007f3518599218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: 0000000000000001 RBX: 00007f3518662308 RCX: 00007f35185d8529
RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007f351866230c
RBP: 00007f3518662300 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f351862f064
R13: 0031656c69662f2e R14: 6e6f3d7865646e69 R15: 0079616c7265766f
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__seqprop_spinlock_sequence include/linux/seqlock.h:275 [inline]
RIP: 0010:get_fs_root_rcu fs/d_path.c:244 [inline]
RIP: 0010:d_path+0x2f0/0x6e0 fs/d_path.c:286
Code: 30 00 74 08 48 89 df e8 be 20 e1 ff 4c 8b 23 4d 8d 6c 24 48 49 81 c4 88 00 00 00 4c 89 eb 48 c1 eb 03 4c 89 ef e8 00 1e 00 00 <42> 0f b6 04 33 84 c0 0f 85 89 00 00 00 45 8b 7d 00 44 89 fe 83 e6
RSP: 0018:ffffc90003a7eee0 EFLAGS: 00010246
RAX: 7e73051ae5315e00 RBX: 0000000000000009 RCX: ffff88807da73b80
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90003a7eff0 R08: ffffffff82068d08 R09: 1ffffffff1d34ccd
R10: dffffc0000000000 R11: fffffbfff1d34cce R12: 0000000000000088
R13: 0000000000000048 R14: dffffc0000000000 R15: ffff8880206d8000
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f351862ebb8 CR3: 000000007e769000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	30 00                	xor    %al,(%rax)
   2:	74 08                	je     0xc
   4:	48 89 df             	mov    %rbx,%rdi
   7:	e8 be 20 e1 ff       	call   0xffe120ca
   c:	4c 8b 23             	mov    (%rbx),%r12
   f:	4d 8d 6c 24 48       	lea    0x48(%r12),%r13
  14:	49 81 c4 88 00 00 00 	add    $0x88,%r12
  1b:	4c 89 eb             	mov    %r13,%rbx
  1e:	48 c1 eb 03          	shr    $0x3,%rbx
  22:	4c 89 ef             	mov    %r13,%rdi
  25:	e8 00 1e 00 00       	call   0x1e2a
* 2a:	42 0f b6 04 33       	movzbl (%rbx,%r14,1),%eax <-- trapping instruction
  2f:	84 c0                	test   %al,%al
  31:	0f 85 89 00 00 00    	jne    0xc0
  37:	45 8b 7d 00          	mov    0x0(%r13),%r15d
  3b:	44 89 fe             	mov    %r15d,%esi
  3e:	83                   	.byte 0x83
  3f:	e6                   	.byte 0xe6

Crashes (210):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/09/12 22:09 upstream a747acc0b752 59da8366 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root general protection fault in d_path
2023/11/24 07:05 upstream d3fa86b1a7b4 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/23 11:30 upstream 9b6de136b5f0 fc59b78e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/23 04:52 upstream 9b6de136b5f0 fc59b78e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/22 16:14 upstream c2d5304e6c64 03e12510 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/22 12:36 upstream c2d5304e6c64 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/21 18:21 upstream 98b1cc82c4af cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/21 16:01 upstream 98b1cc82c4af cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/21 07:33 upstream 98b1cc82c4af cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/20 13:34 upstream 98b1cc82c4af cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/19 15:18 upstream 037266a5f723 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/19 11:03 upstream 037266a5f723 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/18 12:05 upstream 791c8ab095f7 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/18 04:56 upstream 791c8ab095f7 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/18 03:01 upstream 6bc40e44f1dd cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/17 22:33 upstream 6bc40e44f1dd cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/17 15:52 upstream 6bc40e44f1dd cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/17 11:23 upstream 7475e51b8796 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/17 08:30 upstream 7475e51b8796 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/15 20:47 upstream c42d9eeef8e5 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/15 16:11 upstream c42d9eeef8e5 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/14 20:49 upstream 9bacdd8996c7 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/14 15:25 upstream 9bacdd8996c7 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/14 13:06 upstream 9bacdd8996c7 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/13 17:05 upstream b85ea95d0864 6d6dbf8a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/13 07:07 upstream b57b17e88bf5 6d6dbf8a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/12 12:03 upstream 1b907d050735 6d6dbf8a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/12 02:37 upstream 1b907d050735 6d6dbf8a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/11 20:05 upstream 3ca112b71f35 6d6dbf8a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/11 01:35 upstream ac347a0655db d80eec66 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/09 22:47 upstream 4bbdb725a36b 56230772 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/07 17:12 upstream be3ca57cfb77 83211397 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/05 21:18 upstream 1c41041124bd 500bfdc4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/05 12:54 upstream 1c41041124bd 500bfdc4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/04 23:33 upstream aea6bf908d73 500bfdc4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/04 19:32 upstream 90b0c2b2edd1 500bfdc4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/03 21:28 upstream 6bdfe2d88b9f 500bfdc4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/11/03 09:56 upstream 8f6f76a6a29f c4ac074c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/10/31 11:32 upstream 5a6a09e97199 58499c95 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/10/31 01:04 upstream 14ab6d425e80 b5729d82 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/10/30 00:41 upstream 2af9b20dbb39 3c418d72 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/10/29 07:00 upstream 2af9b20dbb39 3c418d72 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/10/28 17:18 upstream 56567a20b22b 3c418d72 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/10/28 15:29 upstream 56567a20b22b 3c418d72 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/10/28 15:10 upstream 56567a20b22b 3c418d72 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/10/27 04:40 upstream 3a568e3a961b bf285f0c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root general protection fault in d_path
2023/10/26 12:21 upstream 611da07b89fd 23afc60f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/10/25 20:05 upstream 611da07b89fd 72e794c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/10/25 16:45 upstream 4f82870119a4 72e794c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/10/25 07:38 upstream 4f82870119a4 17e6d526 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/10/24 17:45 upstream d88520ad73b7 17e6d526 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/10/24 15:07 upstream d88520ad73b7 af8d2e46 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/07/05 04:38 upstream d528014517f2 80298b6f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
2023/07/01 11:48 upstream a507db1d8fdc bfc47836 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in d_path
* Struck through repros no longer work on HEAD.