Access to xdm_t
I have a question about access to xdm_t:
With KDM 3.3 I am seeing a lot of accesses to xdm_t:fd and xdm_t:fifo_file from user processes (say user_lpr_t and user_gpg_t) Should these be allowed?
If yes, should xdm_t get the attribute privfd?
Also, is it OK to dontaudit access to .xsession-errors (on SuSE it lives under ~ and I do not want to give all derived user domains access to user's home dir). Or will this cause errors with some programs?
Thanks for your answers,
Thomas
Signature · 7 lines
http://www.cip.ifi.lmu.de/~bleher/selinux/ - my SELinux pages GPG-Fingerprint: BC4F BB16 30D6 F253 E3EA D09E C562 2BAE B2F4 ABE7 -- 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 5 lines · Thomas Bleher
I have a question about access to
xdm_t:
With KDM 3.3 I am seeing a lot of accesses to xdm_t:fd and xdm_t:fifo_file from user processes (sayuser_lpr_tanduser_gpg_t) Should these be allowed?
If yes, shouldxdm_tget the attribute privfd?
I don't think that is necessary. gpg and lpr are both text based programs and have no need of direct communication with xdm_t. I think that the wide inheritance of that file handle is a bug.
Quoted 3 lines
Also, is it OK to dontaudit access to .xsession-errors (on SuSE it lives under ~ and I do not want to give all derived user domains access to user's home dir). Or will this cause errors with some programs?
That should be fine.
Signature · 9 lines
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page -- 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 5 lines · Russell Coker
Quoted 3 lines
Also, is it OK to dontaudit access to .xsession-errors (on SuSE it lives under ~ and I do not want to give all derived user domains access to user's home dir). Or will this cause errors with some programs?
That should be fine.
thomas, when you've done that could you kindly send an appropriate patch in, and could it please be considered for inclusion in the strict policy, because i'm fed up of hacking in the audit messages to get rid of xsession-errors access all the time!
... that having been said, what happens when you _need_ to know what errors a program (kvm - a program in development) is generating?
l.
Signature · 13 lines
-- Truth, honesty and respect are rare commodities that all spring from the same well: Love. If you love yourself and everyone and everything around you, funnily and coincidentally enough, life gets a lot better. -- <a href="http://lkcl.net"> lkcl.net </a> <br /> <a href="mailto:[email protected]"> [email protected] </a> <br /> -- 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 3 lines · Thomas Bleher
I have a question about access to
xdm_t:
With KDM 3.3 I am seeing a lot of accesses to xdm_t:fd and xdm_t:fifo_file from user processes (sayuser_lpr_tanduser_gpg_t)
For Fedora we modified GDM to log the X session errors to /tmp/xses-$USER.$RANDOM, you could probably do something similar with KDM.
Quoted 2 lines
Should these be allowed?
If yes, shouldxdm_tget the attribute privfd?
I think it'd be better to move the X errors to /tmp. It's more NFS-homedir friendly anyways.
--
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 8 lines · Colin Walters
Quoted 3 lines · Thomas Bleher
I have a question about access to
xdm_t:
With KDM 3.3 I am seeing a lot of accesses to xdm_t:fd and xdm_t:fifo_file from user processes (sayuser_lpr_tanduser_gpg_t)For Fedora we modified GDM to log the X session errors to
/tmp/xses-$USER.$RANDOM, you could probably do something similar with KDM.
This seems like the right thing to do; however, this is not possible with current kdm, at least not without patching.
Just bugzillad: http://bugs.kde.org/show_bug.cgi?id=90552
Thomas
Signature · 2 lines
http://www.cip.ifi.lmu.de/~bleher/selinux/ - my SELinux pages GPG-Fingerprint: BC4F BB16 30D6 F253 E3EA D09E C562 2BAE B2F4 ABE7
Quoted 1 line · Thomas Bleher
If yes, should
xdm_tget the attribute privfd?
Actually even moving the log to /tmp you'll still get programs wanting access to the xdm_t fd. Ideally we would have a little program run in its own domain (xdm_launcher_t say) that would simply close all of its file descriptors, open up the tmp file itself for logging and exec the user session. Then you could make the xdm_launcher_t privfd, without giving users access to any random fd that xdm forgot to close or that one of PAM libraries xdm is using forgot to close...
--
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 9 lines · Colin Walters
Quoted 1 line · Thomas Bleher
If yes, should
xdm_tget the attribute privfd?Actually even moving the log to /tmp you'll still get programs wanting access to the
xdm_tfd. Ideally we would have a little program run in its own domain (xdm_launcher_tsay) that would simply close all of its file descriptors, open up the tmp file itself for logging and exec the user session.
/usr/bin/startkde for example?
--
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 11 lines · Luke Kenneth Casson Leighton
Quoted 8 lines · Colin Walters
Quoted 1 line · Thomas Bleher
If yes, should
xdm_tget the attribute privfd?Actually even moving the log to /tmp you'll still get programs wanting access to the
xdm_tfd. Ideally we would have a little program run in its own domain (xdm_launcher_tsay) that would simply close all of its file descriptors, open up the tmp file itself for logging and exec the user session.
/usr/bin/startkdefor example?
Yes, that sounds good for it.
Signature · 9 lines
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page -- 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 5 lines · Luke Kenneth Casson Leighton
Quoted 4 lines · Colin Walters
Quoted 1 line · Thomas Bleher
If yes, should
xdm_tget the attribute privfd?
Quoted 7 lines
Quoted 5 lines
Actually even moving the log to /tmp you'll still get programs wanting access to the
xdm_tfd. Ideally we would have a little program run in its own domain (xdm_launcher_tsay) that would simply close all of its file descriptors, open up the tmp file itself for logging and exec the user session.
/usr/bin/startkdefor example?
I think the idea with doing it inside ?dm was to keep common functionality inside the display manager; also it ensures you get an error log even if your session script fails early on (and gdm will offer to display the error log for example if your session lasts less than 10 seconds, which it can really only do if it knows the name of the error log).
So putting it inside each session script is generally wrong I think.
--
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 8 lines · Colin Walters
Quoted 1 line
/usr/bin/startkdefor example?I think the idea with doing it inside ?dm was to keep common functionality inside the display manager; also it ensures you get an error log even if your session script fails early on (and gdm will offer to display the error log for example if your session lasts less than 10 seconds, which it can really only do if it knows the name of the error log).
if the log file goes into a common directory, that same functionality can be achieved.
--
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 8 lines · Colin Walters
I think the idea with doing it inside ?dm was to keep common functionality inside the display manager; also it ensures you get an error log even if your session script fails early on (and gdm will offer to display the error log for example if your session lasts less than 10 seconds, which it can really only do if it knows the name of the error log).
So putting it inside each session script is generally wrong I think.
OK, we can have another script which just creates the error log file and launches the session script.
Signature · 9 lines
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page -- 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 8 lines · Colin Walters
Quoted 1 line · Thomas Bleher
If yes, should
xdm_tget the attribute privfd?Actually even moving the log to /tmp you'll still get programs wanting access to the
xdm_tfd. Ideally we would have a little program run in its own domain (xdm_launcher_tsay) that would simply close all of its file descriptors, open up the tmp file itself for logging and exec the user session. Then you could make thexdm_launcher_tprivfd, without
Why not just have the xdm program launch a script in the user context which opens the file and redirects output to it? If the file handle is opened as user_t then it won't cause any problems for any program.
Signature · 9 lines
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page -- 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.