I am trying to make a restriction to procfs like only a certain groups of members can perform read and write actions.
kernel document says we can do that by setting hidepid
and gid
in /etc/fstab
. It will restrict the malicious user from making read and write on procfs but I have a doubt whether it is possible for malicious user (restricted in the /etc/fstab
) to access content in profs using syscall
instead of fs operation
like read and write.
/proc/<id>/cmdline
or you can also take malicious user should not read other users environ value which will be in/proc/<id>/environ
.hidepid=2
isn't good enough to stop that?environment value (environ)
of other users using syscall or any other way?hidepid
isn't effective against syscalls, when they're the normal way to read from there?