syzbot


general protection fault in smack_inode_permission

Status: upstream: reported on 2024/05/06 08:57
Subsystems: lsm
[Documentation on labels]
Reported-by: syzbot+4ac565a7081cc43bb185@syzkaller.appspotmail.com
First crash: 25d, last: 22d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [lsm?] general protection fault in smack_inode_permission 0 (1) 2024/05/06 08:57
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: unable to handle kernel NULL pointer dereference in smack_inode_permission lsm C 1 564d 560d 22/26 fixed on 2023/02/24 13:50

Sample crash report:
ERROR: (device loop0): jfs_readdir: JFS:Dtree error: ino = 2, bn=0, index = 6
ERROR: (device loop0): jfs_readdir: JFS:Dtree error: ino = 2, bn=0, index = 7
general protection fault, probably for non-canonical address 0xdffffc01839e4cf3: 0000 [#1] PREEMPT SMP KASAN PTI
KASAN: probably user-memory-access in range [0x0000000c1cf26798-0x0000000c1cf2679f]
CPU: 0 PID: 12996 Comm: syz-executor.0 Not tainted 6.9.0-rc6-syzkaller-00234-g7367539ad4b0 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:smk_of_inode security/smack/smack.h:373 [inline]
RIP: 0010:smack_inode_permission+0x2bf/0x380 security/smack/smack_lsm.c:1234
Code: 49 83 c7 38 4c 89 f8 48 c1 e8 03 80 3c 18 00 74 08 4c 89 ff e8 52 3c 97 fd 4c 63 35 d3 94 73 09 4d 03 37 4c 89 f0 48 c1 e8 03 <80> 3c 18 00 74 08 4c 89 f7 e8 33 3c 97 fd 49 8b 3e 8b 74 24 14 4c
RSP: 0018:ffffc90004ca7900 EFLAGS: 00010206
RAX: 00000001839e4cf3 RBX: dffffc0000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffc90004ca7948
RBP: ffffc90004ca7a18 R08: ffffc90004ca7987 R09: 0000000000000000
R10: ffffc90004ca7968 R11: fffff52000994f31 R12: 1ffff92000994f24
R13: ffffc90004ca7940 R14: 0000000c1cf26798 R15: ffff88804b800468
FS:  000055555808c480(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b3112c000 CR3: 0000000011652000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 security_inode_permission+0xa5/0x100 security/security.c:2216
 may_lookup fs/namei.c:1726 [inline]
 link_path_walk+0x2ef/0xea0 fs/namei.c:2273
 path_lookupat+0xa9/0x450 fs/namei.c:2484
 filename_lookup+0x256/0x610 fs/namei.c:2514
 user_path_at_empty+0x42/0x60 fs/namei.c:2921
 user_path_at include/linux/namei.h:57 [inline]
 ksys_umount fs/namespace.c:1916 [inline]
 __do_sys_umount fs/namespace.c:1924 [inline]
 __se_sys_umount fs/namespace.c:1922 [inline]
 __x64_sys_umount+0xf4/0x170 fs/namespace.c:1922
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f95e027efd7
Code: b0 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b0 ff ff ff f7 d8 64 89 02 b8
RSP: 002b:00007ffed42b0998 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: ffffffffffffffda RBX: 00007f95e02c83b9 RCX: 00007f95e027efd7
RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffed42b0a50
RBP: 00007ffed42b0a50 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffed42b1b40
R13: 00007f95e02c83b9 R14: 00000000000ade1b R15: 0000000000000019
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:smk_of_inode security/smack/smack.h:373 [inline]
RIP: 0010:smack_inode_permission+0x2bf/0x380 security/smack/smack_lsm.c:1234
Code: 49 83 c7 38 4c 89 f8 48 c1 e8 03 80 3c 18 00 74 08 4c 89 ff e8 52 3c 97 fd 4c 63 35 d3 94 73 09 4d 03 37 4c 89 f0 48 c1 e8 03 <80> 3c 18 00 74 08 4c 89 f7 e8 33 3c 97 fd 49 8b 3e 8b 74 24 14 4c
RSP: 0018:ffffc90004ca7900 EFLAGS: 00010206
RAX: 00000001839e4cf3 RBX: dffffc0000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffc90004ca7948
RBP: ffffc90004ca7a18 R08: ffffc90004ca7987 R09: 0000000000000000
R10: ffffc90004ca7968 R11: fffff52000994f31 R12: 1ffff92000994f24
R13: ffffc90004ca7940 R14: 0000000c1cf26798 R15: ffff88804b800468
FS:  000055555808c480(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000c000b9177c CR3: 0000000011652000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	49 83 c7 38          	add    $0x38,%r15
   4:	4c 89 f8             	mov    %r15,%rax
   7:	48 c1 e8 03          	shr    $0x3,%rax
   b:	80 3c 18 00          	cmpb   $0x0,(%rax,%rbx,1)
   f:	74 08                	je     0x19
  11:	4c 89 ff             	mov    %r15,%rdi
  14:	e8 52 3c 97 fd       	call   0xfd973c6b
  19:	4c 63 35 d3 94 73 09 	movslq 0x97394d3(%rip),%r14        # 0x97394f3
  20:	4d 03 37             	add    (%r15),%r14
  23:	4c 89 f0             	mov    %r14,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	80 3c 18 00          	cmpb   $0x0,(%rax,%rbx,1) <-- trapping instruction
  2e:	74 08                	je     0x38
  30:	4c 89 f7             	mov    %r14,%rdi
  33:	e8 33 3c 97 fd       	call   0xfd973c6b
  38:	49 8b 3e             	mov    (%r14),%rdi
  3b:	8b 74 24 14          	mov    0x14(%rsp),%esi
  3f:	4c                   	rex.WR

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/04 18:03 upstream 7367539ad4b0 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in smack_inode_permission
2024/05/02 08:48 upstream 0106679839f7 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in smack_inode_permission
2024/05/02 08:48 upstream 0106679839f7 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in smack_inode_permission
2024/05/02 08:48 upstream 0106679839f7 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in smack_inode_permission
2024/05/02 08:48 upstream 0106679839f7 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in smack_inode_permission
* Struck through repros no longer work on HEAD.