syzbot


BUG: unable to handle kernel NULL pointer dereference in smack_inode_permission

Status: fixed on 2023/02/24 13:50
Subsystems: lsm
[Documentation on labels]
Reported-by: syzbot+0f89bd13eaceccc0e126@syzkaller.appspotmail.com
Fix commit: 578b565b240a 9p/fd: Fix write overflow in p9_read_work
First crash: 743d, last: 743d
Discussions (3)
Title Replies (including bot) Last reply
[PATCH 0/3 v2] 9p: Fix write overflow in p9_read_work 11 (11) 2022/11/18 15:34
[PATCH] 9p: Fix write overflow in p9_read_work 3 (3) 2022/11/17 07:58
[syzbot] BUG: unable to handle kernel NULL pointer dereference in smack_inode_permission 2 (3) 2022/11/14 20:15
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in smack_inode_permission lsm 9 64d 200d 0/28 upstream: reported on 2024/05/06 08:57

Sample crash report:
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000028
Mem abort info:
  ESR = 0x0000000096000004
  EC = 0x25: DABT (current EL), IL = 32 bits
  SET = 0, FnV = 0
  EA = 0, S1PTW = 0
  FSC = 0x04: level 0 translation fault
Data abort info:
  ISV = 0, ISS = 0x00000004
  CM = 0, WnR = 0
user pgtable: 4k pages, 48-bit VAs, pgdp=0000000109d98000
[0000000000000028] pgd=0000000000000000, p4d=0000000000000000
Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 2557 Comm: udevd Not tainted 6.1.0-rc4-syzkaller-31859-g56751c56c2a2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/30/2022
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : smack_inode_permission+0x70/0x164 security/smack/smack_lsm.c:1149
lr : smack_inode_permission+0x68/0x164 security/smack/smack_lsm.c:1146
sp : ffff800016a53a30
x29: ffff800016a53a80 x28: fefefefefefefeff
 x27: ffff0000ca5c0025

x26: 0000000000000000
 x25: 0000000000000000
 x24: ffff0000ca5c0025
x23: 0000000000000000 x22: 0000000000000008 x21: 0000000000000001
x20: 0000000000000001 x19: ffff0000c70cf2d8
 x18: 0000000000000000

x17: 0000000000000000
 x16: ffff80000db1a158
 x15: ffff0000c4f39a40
x14: 0000000000000090 x13: 00000000ffffffff x12: ffff0000c4f39a40
x11: ff8080000944189c x10: 0000000000000000 x9 : ffff0000c4f39a40
x8 : ffff80000944189c x7 : ffff8000086feb70 x6 : 0000000000000000
x5 : ffff0000c4f39a40 x4 : 0000000000000001 x3 : 0000000000000000
x2 : 0000000000000001 x1 : 0000000000000001 x0 : 0000000000000000
Call trace:
 smack_inode_permission+0x70/0x164
 security_inode_permission+0x50/0xa4 security/security.c:1326
 inode_permission+0xa0/0x244 fs/namei.c:533
 may_lookup fs/namei.c:1715 [inline]
 link_path_walk+0x138/0x628 fs/namei.c:2262
 path_lookupat+0x54/0x208 fs/namei.c:2473
 filename_lookup+0xf8/0x264 fs/namei.c:2503
 user_path_at_empty+0x5c/0x114 fs/namei.c:2876
 do_readlinkat+0x84/0x1c8 fs/stat.c:468
 __do_sys_readlinkat fs/stat.c:495 [inline]
 __se_sys_readlinkat fs/stat.c:492 [inline]
 __arm64_sys_readlinkat+0x28/0x3c fs/stat.c:492
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall arch/arm64/kernel/syscall.c:52 [inline]
 el0_svc_common+0x138/0x220 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x48/0x164 arch/arm64/kernel/syscall.c:206
 el0_svc+0x58/0x150 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:584
Code: f90003ff 97b9817f 34000134 8b1602f6 (b94022d7) 
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
   0:	f90003ff 	str	xzr, [sp]
   4:	97b9817f 	bl	0xfffffffffee60600
   8:	34000134 	cbz	w20, 0x2c
   c:	8b1602f6 	add	x22, x23, x22
* 10:	b94022d7 	ldr	w23, [x22, #32] <-- trapping instruction

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/11/09 23:57 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 56751c56c2a2 5fa28208 .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel NULL pointer dereference in smack_inode_permission
* Struck through repros no longer work on HEAD.