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

Add systemd-tempfiles.d config for usbguard when root fs is read-only

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • rhel-10.0
    • rhel-10.0
    • usbguard
    • None
    • usbguard-1.1.3-6.el10
    • No
    • Moderate
    • rhel-sst-security-special-projects
    • ssg_security
    • 26
    • None
    • False
    • Hide

      None

      Show
      None
    • No
    • None
    • Unspecified Release Note Type - Unknown
    • All
    • None

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

      When booting RHEL with root marked as read-only, the systemd `usbguard` service fails, because it needs some to prepare and write some files in /var. Since /var is read-only, it will fail.

      Files in question: /var/log/usbguard/*

      The solution is:

      1. mount /var as rw tmpfs
      2. add the following config into /usr/lib/tmpfiles.d/usbguard.conf:

      d /var/lib/usbguard 700 root root -

      Not sure if selinux labeling needs to defined here.

      This will ensure that the folders are created and the selinux is correctly set up, otherwise usbguard won't have the permission to write it, even though the folder exists in tmpfs.

      Please provide the package NVR for which bug is seen:

      I think this applies to all usbguard packages, as long as RHEL is booted with `ro` /.

      How reproducible:

      Always, as long as RHEL is booted with `ro` /.

      Steps to reproduce

      1. modify /etc/fstab and add `ro` to the / existing attributes (something like `ro,defaults`)
      2. reboot
      3. systemctl status --failed

      Expected results

      usbguard is not in the failed units

      Actual results

      usbguard fails for the above reasons

              rh-ee-alakatos Attila Lakatos
              rh-ee-alakatos Attila Lakatos
              Attila Lakatos Attila Lakatos
              SSG Security QE SSG Security QE
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: