Giter VIP home page Giter VIP logo

Comments (3)

hankyuwang avatar hankyuwang commented on July 23, 2024

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:

  1. The assumption about one page size is insufficient. We need to bump up size. But how large is enough?
  2. Maybe this is indeed a feature that disfavor type transition for a type that has large reachable contexts (fan-outs)?
  3. Or, it is time to bring the whole compute_user to userland?

What do you think?

from selinux.

stephensmalley avatar stephensmalley commented on July 23, 2024

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.

stephensmalley avatar stephensmalley commented on July 23, 2024

I have proposed re-visiting the patch above with minor modifications to resolve this issue.

from selinux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.