the user space object manager code seems to fragile
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
I want to bring to your attention that the user space object manager functionality/code of selinux is fragile and is a challenge
Why now? Now fundamental components of GNU/Linux are user space object managers (systemd) and some other components that were already user space object managers for years became fundamental components in GNU/Linux (dbus)
Some small fragments from a systemd.conf youtube video
https://www.youtube.com/watch?v=kUWvSXEHMhU&feature=youtu.be&t=580
https://www.youtube.com/watch?v=kUWvSXEHMhU&feature=youtu.be&t=1137
I already have been experiencing strange behavior with user space object managers many times.
For example, on one system i have, it works inconsistently (i have to boot the system multiple times to get the systemd and/or dbus user space object manager to work)
Just today i hit another such issue when i tested the CIL unordered class functionality
It seems to work fine in some cases, and in other cases it doesnt work at all (even in permissive mode!?)
The access vectors are in the policy but for some reason the components are confused.
To reproduce: install a fedora23 minimal server, add yourself to the wheel group and run this script:
https://raw.githubusercontent.com/DefenSec/selinux-rpm-spec/master/scripts/dsspbase23
what it does is it installs my dssp policy with only the base. since the dbus access vector was relocated from base to dbus.cil it is not present in the this policy.
The policy denies unknown access vectors by default, thus i added the dbus access vector declaration to the base.cil addon module (a separate module to make the sole process context "unconfined")
The access vector ends up in the policy however, dbus gets confused for some reason, and since for example firewalld wants dbus, that fails and systemd freezes ( i suppose that may be some kind of security feature ).
The user space object manager code should be made more robust, and/or it should be better documented because clearly developers have a very hard time using it properly.
The decision to support user space object managers was made long ago, but in my view it was never really carefully thought out, or received the attention it deserves.
The fact that we only just now support unordered access vector declarations proves the above point I believe.
It is a fundamental requirement for this functionality.
Thank you for reading
(p.s. this is not about unordered access vectors, that was just one example. this is about libselinux/user space object managers)
- --
02DFF788
4D30 903A 1CF3 B756 FB48 1514 3148 83A2 02DF F788
https://sks-keyservers.net/pks/lookup?op=get&search=0x314883A202DFF788
Dominick Grift
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQGcBAEBCgAGBQJWR3bgAAoJENAR6kfG5xmcyIkMAMOTkUy2HOG6BmS+bhNv5YBV s43WbqT74tQChazb7ISlKpqerRdjoiPQIS/LCSkanq3kVce6XYWn4ridYAFjmiXF ds0Y5mlFeZUQtgzqVWIqMO2IrisdlBzV4w0xuJKwcanTmOCHZFLbz5kMJPqdoMHm BvV4IAJWX8vLIEL8kdsynNgto7N2W0jV/bNIOUmZM4ltUaeiLvpQdPXXboEDQ04x dxj4BLAEcJnvskLrnjgrhWXS/ILsN+pKGPha//Aa1TYG7OlGDK1W6WPt5y0/gJ1t Hx2fTTT/bGHD4fJb96/IFnkDk1YVRsu4m801vqY7/MrITbh/yfj3XzqqkEKHBgBv JwSXEZgX9I6Eg4F8buJn1R3IbMH04PtjplfZqYbKWXlikQfAacUCyrtqbOQtNHHs j+SDhv9m+awbk0K2m2FJ2NwjnDfNd7WaTTK4Tw2FOutm+sgUrwIfro1t/Kah2ATC Xt9XvAI4hQeNSyE5b6KlTs0hOuFsj8JUekFNo0AAng==
=XNSa
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Quoted 3 lines · Dominick Grift
I want to bring to your attention that the user space object manager functionality/code of selinux is fragile and is a challenge
Okay my apologies, this particular unordered class issue i just mentioned was my fault. I accidently declared the access vector in a non-. namespace
Still though:
- - (old known issue) dmesg does not print unknown user space access vector handling. so it not easy to detect
- - dbus fails (even in permissive mode) because dbus object is not declared and selinux is enabled
Video of me troubleshooting this issue:
https://www.youtube.com/watch?v=FK-wnweI4YM
I still believe the user space object manager handling could be improved a great deal.
- --
02DFF788
4D30 903A 1CF3 B756 FB48 1514 3148 83A2 02DF F788
https://sks-keyservers.net/pks/lookup?op=get&search=0x314883A202DFF788
Dominick Grift
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQGcBAEBCgAGBQJWR4vcAAoJENAR6kfG5xmcnw0MALvLVhLObPxqpROkiXHLqapP x/sLU1te+g+uivW5D8iFWGOa9vjhxdb6AQtwOhRb1ogR+irx0FU9waoVoyPih1NE UExWr9cmDQIGm3MxUQiQ/fDBnp7sMO9XgXAtJun0IKssog5hZnjprR72a3gXagWM tS/LipF9oQY/sUW6/7p8XPuU/OtOcR3MnYTxmSCDBi0nEis7tvHrLmTTUq3MonxT qacVv9ztoed3RSZxXjm30xR7xcwkapD1nKgnEOCLlKuwmCm2istgtp88HlwO/+ps hXrFWAbFneBp8BQnMEbJ6rr9jKzoo+BKfk89hZOmnO2IJJ0YE3vr+4U9p59qsV+Y FPloB4si8HMqM+OrRL3woNkZk00hDlrK3Bvxe88j8ynMOLV7f2hBdavgVc8fAyuJ yaBoQbt+r6Dh9fwWEs0vjFZTqY3Hy2GGceIa7QrpFSRwEzZX2dhbFGFD4Ls8M69A z1NLlgZrdiHyeyFrri83OUPs4PqeevTa5W7xt1lLKg==
=mPKd
-----END PGP SIGNATURE-----