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

ima-setup fails on RHEL 10

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-10.0
    • ima-evm-utils
    • None
    • No
    • Important
    • rhel-kernel-livepatching
    • 0
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      Running the steps listed in

      https://github.com/myllynen/rhel-ansible-roles/blob/master/roles/ima_evm_setup/tasks/enable.yml

      works on RHEL 9.6 but fails on RHEL 10:

      Installing prerequisite package rpm-plugin-ima
      Adding IMA signatures to installed package files
      Loading IMA keys
      Rebuilding the initramfs of kernel-6.12.0-55.17.1.el10_0.x86_64 to include the dracut integrity module
      /etc/ima/ima-policy.ansible can't be loaded
      Failed to load IMA policy /etc/ima/ima-policy.ansible!

      The failure comes from:

      if ! echo "$ima_policy_path" >"$IMA_POLICY_SYSFS"; then

      Given that RHEL 10 has some entries in the file by default it would probably be a bit more logical to do:

      cat "$ima_policy_path" >> "$IMA_POLICY_SYSFS"

      But this fails also. dmesg shows:

      ima: Unable to open file: /etc/ima/ima-policy.ansible (-13)

      but plain "cat /etc/ima/ima-policy.ansible" on the command line works.

      Thanks.

              coxu@redhat.com Coiby Xu
              myllynen Marko Myllynen
              Coiby Xu Coiby Xu
              Dennis Li Dennis Li
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: