Commit Graph

80 Commits

Author SHA1 Message Date
Coiby Xu
d45f6c063d Release 1.6.2-4
Resolves: RHEL-92638
Resolves: RHEL-99358
Signed-off-by: Coiby Xu <coxu@redhat.com>
2025-10-30 09:04:21 +08:00
Coiby Xu
a8221a05b6 Use RSAHEADER to tell if a package has been signed
Relates: https://issues.redhat.com/browse/RHEL-92638
Conflict: None

commit 47853f2cf6575812d28093b750be2f2e897c153d
Author: Coiby Xu <coxu@redhat.com>
Date:   Thu Oct 16 17:29:52 2025 +0800

    Use RSAHEADER to tell if a package has been signed

    Packages now use RPM v4 signature %{RSAHEADER}. %{SIGPGP} is the name
    of the RPM v3 header+payload signature and can't be used to tell if
    a package has been signed,

        # uname -r
        6.16.10-200.fc42.x86_64
        # rpm -q --queryformat "%{SIGPGP:pgpsig}\n" --all|grep -c "^(none)$"
        586
        # rpm -q --queryformat "%{RSAHEADER}\n" --all|grep -c "^(none)$"
        5

    Signed-off-by: Coiby Xu <coxu@redhat.com>

Signed-off-by: Coiby Xu <coxu@redhat.com>
2025-10-30 09:00:16 +08:00
Coiby Xu
6d6ac4e2d0 ima-setup: skip installing rpm-plugin-ima if it has been installed
Resolves: https://issues.redhat.com/browse/RHEL-99358
Upstream Status: RHEL-only

Suggested-by: Marko Myllynen <myllynen@redhat.com>
Signed-off-by: Coiby Xu <coxu@redhat.com>
2025-10-30 08:48:14 +08:00
Coiby Xu
5a27b43c2f ima-setup: rebuild all initramfs images to include the integrity dracut module
Resolves: https://issues.redhat.com/browse/RHEL-92638
Conflict: Caused by a typo that exists in upstream

commit ac36e54bee77c82bd7f48a507d014a1ec0055645
Author: Coiby Xu <coxu@redhat.com>
Date:   Thu Jul 10 16:53:18 2025 +0800

    ima-setup: rebuild all initramfs images to include the integrity dracut module

    Resolves: https://issues.redhat.com/browse/RHEL-92638

    Quoting Raju,
      ima-setup currently only rebuild the initramfs of running kernel, so
      the older kernel's(n-1 or n-2) initramfs does contain an outdated
      information or it does not contain ima module, as a result the system
      fails to boot with older kernel.

      It is always recommended to have at least 2 older kernel's kept
      installed on the system as a fallback option in case if the latest
      kernel fails to boot due to some unforeseen issue. So that we can boot
      the system with older kernel to troubleshoot the can't boot issue with
      older kernel.

    Suggested-by: Raju Cheerla <rcheerla@redhat.com>

Signed-off-by: Coiby Xu <coxu@redhat.com>
2025-10-30 08:42:31 +08:00
Coiby Xu
427e17643a Release 1.6.2-3
Resovles:  https://issues.redhat.com/browse/RHEL-100320
Signed-off-by: Coiby Xu <coxu@redhat.com>
2025-07-31 09:14:52 +08:00
Coiby Xu
345d837bfc Fix shellcheck warning and typos
Relates: https://issues.redhat.com/browse/RHEL-100320

Upstream: Fedora
Conflict: None

Fix the following shellcheck warning,
    In ima-add-sigs.sh line 135:
    unsigned_packages_in_rpm_db=$(rpm -q --queryformat "%{SIGPGP:pgpsig}\n" "$package" | grep "^(none)$" | wc -l)
                                                                                     ^-------------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'.
Also fix two typos.

Signed-off-by: Coiby Xu <coxu@redhat.com>
2025-07-31 09:12:46 +08:00
Coiby Xu
be4e836e2f ima-add-sigs: Verify added IMA signature in case the file gets changed
Resolves: https://issues.redhat.com/browse/RHEL-100320

Upstream: Fedora
Conflict: None

Some IMA signatures from the RPM database may fail the verification
because they can be changed. For examples, the following files on F41
can't pass IMA signature verification,

    /usr/lib64/gconv/gconv-modules.cache
    /boot/grub2/grubenv
    /var/lib/selinux/targeted/active/commit_num
    /var/lib/selinux/targeted/active/file_contexts
    /etc/ssh/sshd_config
    /etc/yum.repos.d/fedora-updates.repo
    /etc/yum.repos.d/fedora.repo
    /etc/group
    /etc/gshadow

The kernel ima=fix mode won't generate IMA hash reference value for
files with IMA signature. As a result, users can be denied the access to
some files. So remove security.ima if a file fail the verification.
2025-07-31 09:12:10 +08:00
Coiby Xu
3d4dd401b1 Release 1.6.2-2
Resolves: https://issues.redhat.com/browse/RHEL-82392

Signed-off-by: Coiby Xu <coxu@redhat.com>
2025-03-10 12:26:19 +08:00
Coiby Xu
d6d9da7af7 ima-setup: fix two shellcheck warnings
Relates: https://issues.redhat.com/browse/RHEL-82392
Conflict: None

Upstream Status: https://src.fedoraproject.org/rpms/ima-evm-utils.git

commit 7b800d82d0947fd0e75e92997a3aec7af079c1cc
Author: Coiby Xu <coxu@redhat.com>
Date:   Tue Feb 25 13:24:33 2025 +0800

    ima-setup: fix two shellcheck warnings

    Fix the following two shellcheck warnings,

        In ima-setup.sh line 36:
                                echo "$policy_file doesn't exist"
                                      ^----------^ SC2154 (warning): policy_file is referenced but not assigned.

        In ima-setup.sh line 41:
                        reinstall_threshold=${_opt#*=}
                        ^-----------------^ SC2034 (warning): reinstall_threshold appears unused. Verify use (or export if used externally).

    Signed-off-by: Coiby Xu <coxu@redhat.com>

Signed-off-by: Coiby Xu <coxu@redhat.com>
2025-03-06 16:59:13 +08:00
Coiby Xu
3f5494f50f ima-setup: run zipl after building initramfs for s390x
Resolves: https://issues.redhat.com/browse/RHEL-82392
Conflict: None

Upstream Status: https://src.fedoraproject.org/rpms/ima-evm-utils.git

commit 2f1870b21accb4393a420cf55cba774dfd2d78ae
Author: Coiby Xu <coxu@redhat.com>
Date:   Tue Feb 25 13:17:28 2025 +0800

    ima-setup: run zipl after building initramfs for s390x

    Resovles: https://issues.redhat.com/browse/RHEL-74293

    Without running zipl, the old initramfs will be booted.

    Signed-off-by: Coiby Xu <coxu@redhat.com>

Signed-off-by: Coiby Xu <coxu@redhat.com>
2025-03-06 16:58:48 +08:00
Coiby Xu
062931180e Disable compatible building
Related: https://issues.redhat.com/browse/RHEL-65376

Signed-off-by: Coiby Xu <coxu@redhat.com>
2025-01-15 11:03:00 +08:00
Coiby Xu
8e319288a0 Update to upstream 1.6.2
Resolves: https://issues.redhat.com/browse/RHEL-65376

Signed-off-by: Coiby Xu <coxu@redhat.com>
2024-11-15 17:17:26 +08:00
Coiby Xu
cc6070aa03 Release 1.5-7
Resolves: https://issues.redhat.com/browse/RHEL-34778
Signed-off-by: Coiby Xu <coxu@redhat.com>
2024-11-08 10:59:44 +08:00
Coiby Xu
9325189a33 add usage for ima-add-sigs
Related: https://issues.redhat.com/browse/RHEL-34778
Conflict: None

Upstream Status: https://src.fedoraproject.org/rpms/ima-evm-utils.git

commit 0e28d7448d1ac2608241949a25d6cb245b04874d
Author: Coiby Xu <coxu@redhat.com>
Date:   Wed Oct 16 14:10:05 2024 +0800

    add usage for ima-add-sigs

    Also format the usage info ima-setup.

    Signed-off-by: Coiby Xu <coxu@redhat.com>

Signed-off-by: Coiby Xu <coxu@redhat.com>
2024-11-08 10:58:05 +08:00
Coiby Xu
909a75b554 Skip some file systems for appraisal
Resolves: https://issues.redhat.com/browse/RHEL-34778
Conflict: None

Upstream Status: https://src.fedoraproject.org/rpms/ima-evm-utils.git

commit 83b610d7edee02804dc1cecab8e151728925e90b
Author: Coiby Xu <coxu@redhat.com>
Date:   Wed Oct 16 13:48:01 2024 +0800

    Skip some file systems for appraisal

    Resolves: https://issues.redhat.com/browse/RHEL-62817

    When 01-appraise-exectuables-and-lib-signatures is enabled, no login
    screen is available for user to log in. This happens because IMA stops
    gnome-shell from creating some temp files as can been from the audit log,

        type=INTEGRITY_DATA msg=audit(1728700747.130:10235): pid=3240 uid=42 auid=4294967295 ses=4294967295 subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 op=appraise_data cause=IMA-signature-required comm="gnome-shell" name="/dev/shm/#3223" dev="tmpfs" ino=3223 res=0 errno=0UID="gdm" AUID="unset"
        type=INTEGRITY_DATA msg=audit(1728700747.130:10236): pid=3240 uid=42 auid=4294967295 ses=4294967295 subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 op=appraise_data cause=IMA-signature-required comm="gnome-shell" name="/run/user/42/#454" dev="tmpfs" ino=454 res=0 errno=0UID="gdm" AUID="unset"
        type=INTEGRITY_DATA msg=audit(1728700747.131:10237): pid=3240 uid=42 auid=4294967295 ses=4294967295 subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 op=appraise_data cause=IMA-signature-required comm="gnome-shell" name="memfd:libffi" dev="tmpfs" ino=578 res=0 errno=0UID="gdm" AUID="unset"

    Skip the file systems as listed in
    https://www.kernel.org/doc/Documentation/ABI/testing/ima_policy

    Reported-by: Raju Cheerla <rcheerla@redhat.com>

Signed-off-by: Coiby Xu <coxu@redhat.com>
2024-11-08 10:58:05 +08:00
Coiby Xu
84d7562079 Add IMA code signing certs
Resolves: https://issues.redhat.com/browse/RHEL-34778

Signed-off-by: Coiby Xu <coxu@redhat.com>
2024-11-08 10:58:05 +08:00
Coiby Xu
6e0f7dff8d ima-setup: include the integrity module for the default kernel
Resolves: https://issues.redhat.com/browse/RHEL-34778
Conflict: fix a typo

Upstream Status: https://src.fedoraproject.org/rpms/ima-evm-utils.git

commit 62f613cbb7e1753b2e8fa0ce547c02be24842b22
Author: Coiby Xu <coxu@redhat.com>
Date:   Mon Jun 3 14:39:06 2024 +0800

    ima-setup: include the integrity module for the default kernel

    ima-setup may run after a new kernel is installed. Detect this case by
    checking if the default kernel is the running kernel.

    Suggested-by: Marko Myllynen <myllynen@redhat.com>
    Signed-off-by: Coiby Xu <coxu@redhat.com>

Signed-off-by: Coiby Xu <coxu@redhat.com>
2024-11-08 10:58:05 +08:00
Coiby Xu
15abff6d5f ima-setup: Allow users to specify custom reinstall_threshold
Resolves: https://issues.redhat.com/browse/RHEL-34778
Conflict: None

Upstream Status: https://src.fedoraproject.org/rpms/ima-evm-utils.git

commit 141a74d96ab3cdee1b0d2cf6a0cba19337920e02
Author: Coiby Xu <coxu@redhat.com>
Date:   Tue May 28 09:54:19 2024 +0800

    ima-setup: Allow users to specify custom reinstall_threshold

    Some users may use custom built packages and we are not sure about the
    number of this type of packages. So make reinstall_threshold
    configurable.

    Suggested-by: Marko Myllynen <myllynen@redhat.com>

Signed-off-by: Coiby Xu <coxu@redhat.com>
2024-11-08 10:58:05 +08:00
Coiby Xu
87e9121bc9 ima-setup: Install prerequisite package rpm-plugin-ima
Upstream Status: RHEL-only

Since rpm-plugin-ima is not a BaseOS package, install it in ima-setup.

Signed-off-by: Coiby Xu <coxu@redhat.com>
2024-11-08 10:58:05 +08:00
Coiby Xu
478b5e4548 Add some IMA setup tools
Resolves: https://issues.redhat.com/browse/RHEL-34778
Conflict: Upstream has -libs subpackage

Upstream Status: https://src.fedoraproject.org/rpms/ima-evm-utils.git

commit 8980421a049c776e2b77e534793aafb925b3ad48
Author: Coiby Xu <coiby.xu@gmail.com>
Date:   Mon May 6 17:48:52 2024 +0800

    Add some IMA setup tools

    Some IMA setup tools are added to ease IMA setup which will do
    the following tasks,
       - add IMA signatures to installed packages files
       - load IMA keys and policy
       - enable the dracut integrity module to load IMA keys and policy
         automatically

    Two IMA polices as suggested by Stefan Berger are also provided which
    will be signed automatically with other package files.

    Thanks to Marko Myllynen for coming up with the idea to have a tool
    similar to fips-mode-setup. And thanks to Mimi Zohar and Stefan Berger
    for providing the feedback!

    Signed-off-by: Coiby Xu <coxu@redhat.com>

Signed-off-by: Coiby Xu <coxu@redhat.com>
2024-11-08 10:58:05 +08:00
Troy Dawson
69ad52a70c Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
2024-10-29 08:36:27 -07:00
Troy Dawson
c44733edc2 Bump release for June 2024 mass rebuild 2024-06-24 08:51:12 -07:00
Linqing Lu
399096205d initial gating tests
Signed-off-by: Linqing Lu <lilu@redhat.com>
2024-04-09 11:03:52 -04:00
Fedora Release Engineering
428c33916c Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-24 22:39:14 +00:00
Fedora Release Engineering
bd16779462 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-20 23:00:52 +00:00
Fedora Release Engineering
9f48b24234 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 07:20:43 +00:00
Peter Robinson
196c511652 Disable bootstrap 2023-06-08 10:45:50 +01:00
Peter Robinson
631781e5b2 1.5, updates for bootstrapping 2023-06-08 09:31:11 +01:00
Fedora Release Engineering
eeac9f2aed Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 13:05:15 +00:00
Fedora Release Engineering
c7ba98a6ec Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-21 14:35:25 +00:00
Fedora Release Engineering
558c3df69c - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 13:13:49 +00:00
Björn Esser
65d5e121c8
Build without compat bootstrap sub package
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
2022-01-20 06:54:07 +01:00
Björn Esser
e87fd6c09a
Build with compat bootstrap sub package
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
2022-01-20 06:36:24 +01:00
Miro Hrončok
b6235bcbb3 Actually enable compat bcond 2022-01-19 23:12:34 +01:00
Peter Robinson
3164e5a1c5 add patches for compat build 2022-01-19 15:25:39 +00:00
Peter Robinson
0602436823 Build with compatible for bootstrap 2022-01-19 15:19:26 +00:00
Peter Robinson
e3218f0188 v1.4 2021-11-08 20:52:13 +00:00
Sahana Prasad
87a9da9dc3 Rebuilt with OpenSSL 3.0.0 2021-09-14 19:04:41 +02:00
Fedora Release Engineering
fdeec277f7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 08:30:10 +00:00
Fedora Release Engineering
6d8b830293 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 14:17:04 +00:00
Tom Stellard
963df557f6 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2020-12-19 00:46:34 +00:00
Bruno Meneguele
406cc7e1e8 Rebase to new upstream v1.3.2 minor release
Resolves: BZ#1892415
Signed-off-by: Bruno Meneguele <bmeneg@redhat.com>
2020-10-28 17:57:46 -03:00
Bruno Meneguele
dad4a640db Rebase to new upstream v1.3.1 minor release
Resolves: BZ#1868019
Signed-off-by: Bruno Meneguele <bmeneg@redhat.com>
2020-08-11 11:31:20 -03:00
Fedora Release Engineering
b04b68a271 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 01:44:05 +00:00
Peter Robinson
845f3885b2 Fix devel deps 2020-07-26 14:07:37 +01:00
Peter Robinson
1598285d4e v1.3 2020-07-26 13:51:27 +01:00
Tom Stellard
c9a1da15a5 Use make macros
https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
2020-07-13 20:15:21 +00:00
Fedora Release Engineering
51238b8dd6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-29 05:21:53 +00:00
Bruno E. O. Meneguele
9207116199 - Remove a leftover unused patch file
Signed-off-by: Bruno E. O. Meneguele <bmeneg@redhat.com>
2019-07-31 16:14:47 -03:00
Bruno E. O. Meneguele
44d7a51bef - Remove unused patch files
Signed-off-by: Bruno E. O. Meneguele <bmeneg@redhat.com>
2019-07-31 16:13:14 -03:00