Question about the process : share permission.
Hello all,
I am trying to understand what the process : share permission does. In the SELinux by example book, it says the process : share permission allows state sharing with cloned or forked processes.
I looked looked through the refpolicy tree and only found one instance of the process : share permission, it is in the kernel_share_state
interface. This interface is only called by the system/init module.
At first I thought this permission had to do with shared libraries and/or forking processes, but I see there is also a process : fork permission and there is a libs_use_shared_libs interface function to allow the loading and execution of shared libraries.
I am just curious to understand what the process : share permission allows/prevents.
Thanks!
- Ryan
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 10 lines · Ryan Bradetich
Hello all,
I am trying to understand what the process : share permission does. In the SELinux by example book, it says the process : share permission allows state sharing with cloned or forked processes.
I looked looked through the refpolicy tree and only found one instance of the process : share permission, it is in the
kernel_share_state
interface. This interface is only called by the system/init module.
Quoted 7 lines
At first I thought this permission had to do with shared libraries and/or forking processes, but I see there is also a process : fork permission and there is a
libs_use_shared_libsinterface function to allow the loading and execution of shared libraries.I am just curious to understand what the process : share permission allows/prevents.
If you call clone() with certain flags (e.g. CLONE_FS, CLONE_FILES) to cause sharing of certain portions of the task state and then perform a context-changing execve, then the process share permission is checked between the old and new contexts. This is generally unsafe, as it allows the caller to influence/control the callee. It happens naturally when the kernel starts init, which is why it is allowed there.
Signature · 8 lines
Stephen Smalley National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Ah, that make sense.
Thanks for the explanation!
- Ryan
Quoted 26 lines · Stephen Smalley
Quoted 10 lines · Ryan Bradetich
Hello all,
I am trying to understand what the process : share permission does. In the SELinux by example book, it says the process : share permission allows state sharing with cloned or forked processes.
I looked looked through the refpolicy tree and only found one instance of the process : share permission, it is in the
kernel_share_state
interface. This interface is only called by the system/init module.Quoted 7 lines
At first I thought this permission had to do with shared libraries and/or forking processes, but I see there is also a process : fork permission and there is a
libs_use_shared_libsinterface function to allow the loading and execution of shared libraries.I am just curious to understand what the process : share permission allows/prevents.
If you call
clone()with certain flags (e.g.CLONE_FS,CLONE_FILES) to cause sharing of certain portions of the task state and then perform a context-changing execve, then the process share permission is checked between the old and new contexts. This is generally unsafe, as it allows the caller to influence/control the callee. It happens naturally when the kernel starts init, which is why it is allowed there.
Quoted 5 lines
--
Stephen Smalley
National Security Agency
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.