Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-121936

Cannot start systemd user's ssh-agent service for confined users due to missing rules in SELinux policy

Linking RHIVOS CVEs to...Migration: Automation ...RHELPRIO AssignedTeam ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • rhel-9.6
    • selinux-policy
    • None
    • Low
    • rhel-security-selinux
    • None
    • QE ack
    • False
    • False
    • Hide

      None

      Show
      None
    • No
    • None
    • Hide

      The reproducer does not trigger SELinux denials. Confined users can start the ssh-agent service in enforcing mode successfully.

      Show
      The reproducer does not trigger SELinux denials. Confined users can start the ssh-agent service in enforcing mode successfully.
    • None
    • Automated
    • Unspecified Release Note Type - Unknown
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      What were you trying to do that didn't work?

      When a confined user tries to start its ssh-agent.service unit, an AVC shows up because the agent cannot create its socket in /run/user/<UID> directory:

      #============= staff_ssh_agent_t ==============
      allow staff_ssh_agent_t user_tmp_t:dir write;
      
      #============= user_ssh_agent_t ==============
      allow user_ssh_agent_t user_tmp_t:dir write;
      

      RHEL10 has the proper rules, which was introduced as:

      userdom_user_tmp_filetrans(ssh_agent_type, ssh_agent_tmp_t, sock_file)
      

      What is the impact of this issue to you?

      Users cannot start the agent

      Please provide the package NVR for which the bug is seen:

      selinux-policy-38.1.53-5.el9_6

      How reproducible is this bug?

      Always

      Steps to reproduce

      1. Login as a confined user
      2. Start the service
        # systemctl --user start ssh-agent

      Expected results

      Service starts.

      Actual results

      AVC and service doesn't start.

              rhn-support-zpytela Zdenek Pytela
              rhn-support-rmetrich Renaud Métrich
              Zdenek Pytela Zdenek Pytela
              Milos Malik Milos Malik
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: