android_kernel_sony_sdm845/security
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Paul Moore 00ac8fe87b UPSTREAM: selinux: fix inode_doinit_with_dentry() LABEL_INVALID error handling
[ Upstream commit 200ea5a2292dc444a818b096ae6a32ba3caa51b9 ]

A previous fix, commit 83370b31a915 ("selinux: fix error initialization
in inode_doinit_with_dentry()"), changed how failures were handled
before a SELinux policy was loaded.  Unfortunately that patch was
potentially problematic for two reasons: it set the isec->initialized
state without holding a lock, and it didn't set the inode's SELinux
label to the "default" for the particular filesystem.  The later can
be a problem if/when a later attempt to revalidate the inode fails
and SELinux reverts to the existing inode label.

This patch should restore the default inode labeling that existed
before the original fix, without affecting the LABEL_INVALID marking
such that revalidation will still be attempted in the future.

Fixes: 83370b31a915 ("selinux: fix error initialization in inode_doinit_with_dentry()")
Reported-by: Sven Schnelle <svens@linux.ibm.com>
Tested-by: Sven Schnelle <svens@linux.ibm.com>
Reviewed-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
Signed-off-by: Sorayukii <sorayukii69@gmail.com>
2026-05-15 18:07:01 +07:00
..
apparmor UPSTREAM: proc,security: move restriction on writing /proc/pid/attr nodes to proc 2026-05-15 18:02:34 +07:00
integrity BACKPORT: audit: use inline function to get audit context 2026-05-15 17:59:18 +07:00
keys This is the 4.9.259 stable release 2021-03-03 18:08:08 +01:00
loadpin UPSTREAM: LSM: Add /sys/kernel/security/lsm 2026-05-15 17:59:05 +07:00
pfe ICE, pfk: fix to set dio_inode precisely 2022-11-30 02:21:44 +02:00
selinux UPSTREAM: selinux: fix inode_doinit_with_dentry() LABEL_INVALID error handling 2026-05-15 18:07:01 +07:00
smack UPSTREAM: proc,security: move restriction on writing /proc/pid/attr nodes to proc 2026-05-15 18:02:34 +07:00
tomoyo UPSTREAM: LSM: Add /sys/kernel/security/lsm 2026-05-15 17:59:05 +07:00
yama UPSTREAM: LSM: Add /sys/kernel/security/lsm 2026-05-15 17:59:05 +07:00
commoncap.c UPSTREAM: LSM: Add /sys/kernel/security/lsm 2026-05-15 17:59:05 +07:00
device_cgroup.c device_cgroup: prepare code for bpf-based device controller 2026-05-15 17:55:40 +07:00
inode.c UPSTREAM: LSM: Add /sys/kernel/security/lsm 2026-05-15 17:59:05 +07:00
Kconfig Resolve merge conflict and enable HW FBE for ext4 fs 2018-05-22 12:58:05 +05:30
lsm_audit.c BACKPORT: audit: use inline function to get audit context 2026-05-15 17:59:18 +07:00
Makefile Resolve merge conflict and enable HW FBE for ext4 fs 2018-05-22 12:58:05 +05:30
min_addr.c mmap_min_addr check CAP_SYS_RAWIO only for write 2010-05-14 19:03:15 +10:00
security.c UPSTREAM: proc,security: move restriction on writing /proc/pid/attr nodes to proc 2026-05-15 18:02:34 +07:00