Skip to content
Commit 448857f5 authored by Richard Haines's avatar Richard Haines Committed by Greg Kroah-Hartman
Browse files

selinux: allow FIOCLEX and FIONCLEX with policy capability



[ Upstream commit 65881e1d ]

These ioctls are equivalent to fcntl(fd, F_SETFD, flags), which SELinux
always allows too.  Furthermore, a failed FIOCLEX could result in a file
descriptor being leaked to a process that should not have access to it.

As this patch removes access controls, a policy capability needs to be
enabled in policy to always allow these ioctls.

Based-on-patch-by: default avatarDemi Marie Obenour <demiobenour@gmail.com>
Signed-off-by: default avatarRichard Haines <richard_c_haines@btinternet.com>
[PM: subject line tweak]
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 4b9b60b5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment