Comments (3)
On our experimental Ubuntu 18.04.3 LTS machine running SELinux with latest official reference policy, we always get pam_selinux.so complaining “unable to get valid context for gdm” during system bootup. And we found it is the security_compute_user() hits the 4k page size bound with error -ERANGE from sel_write_user(). Specifically, we intend to transition from “system_u:system_r:init_t” to “system_u:system_r:xdm_t” in order to run the systemd user instance for system user gdm. With some instruments in the kernel, we realize we need roughly 16k for complete set of reachable contexts. That makes us wondering:
- The assumption about one page size is insufficient. We need to bump up size. But how large is enough?
- Maybe this is indeed a feature that disfavor type transition for a type that has large reachable contexts (fan-outs)?
- Or, it is time to bring the whole compute_user to userland?
What do you think?
from selinux.
I believe Fedora has worked around the issue by altering their policy to restrict outbound transitions from init_t and other unconfined domains to only legitimate ones. I would also recommend getting rid of the use of security_compute_user altogether. There was a patch to do this but there were some unresolved issues/concerns with it, see https://lore.kernel.org/selinux/[email protected]/ and its follow-ups.
from selinux.
I have proposed re-visiting the patch above with minor modifications to resolve this issue.
from selinux.
Related Issues (20)
- semanage_get_lock fails on NFSv4 filesystems HOT 1
- Python 3.11 support HOT 4
- manual setting HOT 2
- bad gpg signature HOT 4
- checkpolicy compilation error HOT 4
- selinux_restorecon.c comparison between signed and unsigned integer expressions
- Scope of boolean 'httpd_can_network_connect' & Django SELinux permissions
- libsepol:The libsepol package detects memory leaks and segmentation errors when tested by OSS-fuzz. HOT 4
- How Do I Select a Proper Number of Threads for Labeling? HOT 2
- Can use macro parameter for filecon path statment? HOT 1
- restore.c:(.text+0x229): undefined reference to `selinux_restorecon_parallel' HOT 1
- selinux-activate not working on RaspbianOS bullseye (version 11) HOT 1
- "semanage export" does not handle port definition modifications properly
- libselinux: off-by-one in setcon() family
- Question Regarding "semanage boolean": HOT 5
- Non-cached is_selinux_enabled() variant? HOT 1
- selinux 3.6 fails to compile against latest versions of musl HOT 1
- libselinux: selabel_digest -b x/media/db error HOT 1
- libsepol: new "all" op verifier in 3.6 does not check classcommon perms HOT 3
- Should ignoredirs apply to all subdirectories? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from selinux.