dynamic context transitions
i have what i believe to be an important question about how dynamic context transitions should partition resources:
is it the case that:
- when a single process transitions (dynamically) to a new context, any resources it presently has opened (file handles etc.) will still be available and accessible in the new context.
or is it the case that:
- when a single process transitions (dynamically) to a new context, any resources it presently has opened (file handles etc.) will NOT be accessible in the new context, but that, should the process (dynamically) transition BACK to the new context, those resources become accessible again.
the former is a trivial implementation, i presume [by comparison to...]
the latter requires that every resource accessible by a process has a context handle associated with it (eek!)
the distinction is critical because the latter is more like the exec() model and the former is more seteuid-like.
i wouldn't want to be explaining and advocating something that was misunderstood!
l.
--
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 19 lines · Luke Kenneth Casson Leighton
i have what i believe to be an important question about how dynamic context transitions should partition resources:
is it the case that:
- when a single process transitions (dynamically) to a new context, any resources it presently has opened (file handles etc.) will still be available and accessible in the new context.
or is it the case that:
- when a single process transitions (dynamically) to a new context, any resources it presently has opened (file handles etc.) will NOT be accessible in the new context, but that, should the process (dynamically) transition BACK to the new context, those resources become accessible again.
the former is a trivial implementation, i presume [by comparison to...]
Quoted 8 lines
the latter requires that every resource accessible by a process has a context handle associated with it (eek!)
the distinction is critical because the latter is more like the
exec()model and the former is more seteuid-like.i wouldn't want to be explaining and advocating something that was misunderstood!
As proposed, all state is inherited across a setcon(). However, since SELinux revalidates permission upon access to files, attempts to read/write already opened descriptors may fail after the setcon() if the new context is not allowed the necessary permissions. It becomes a policy issue whether or not you choose to allow the new context to access any descriptors opened under the old context. Regardless of what you do, it is always true that the entire application has to be trusted to maintain any desired separation between the two security contexts upon a setcon() operation, unlike exec-based transitions.
Signature · 8 lines
Stephen Smalley <[email protected]> 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.