Skip to content

feat(modulejail): import package from Fedora - #20636

Draft
Rachel Menge (rlmenge) wants to merge 1 commit into
microsoft:4.0from
rlmenge:rlmenge/add-modulejail
Draft

Rachel Menge (rlmenge) wants to merge 1 commit into
microsoft:4.0from
rlmenge:rlmenge/add-modulejail

Conversation

@rlmenge

Copy link
Copy Markdown
Contributor

Summary

Add ModuleJail 1.6.3 as an optional Azure Linux 4 package.

  • Import Fedora’s spec and sources unchanged.
  • Pin the Fedora import because it postdates the distro’s source snapshot.
  • Add the component definition, lock file, and generated packaging.

Installing the package does not activate a blocking policy or add it to default images. Administrators explicitly generate and enable their policy.

Testing

  • Built the RPM and SRPM natively on AZL4 x86_64 using repo-pinned azldev.
  • Verified installation, version/help output, RPM file integrity, and removal in an isolated mock environment.
  • Tested the exact RPM on a disposable AZL4 x86_64 VM:
    • Confirmed baseline unprivileged QRTR module autoloading.
    • Verified audit logging, blocked autoload and direct modprobe, and explicit whitelist control.
    • Confirmed blocking persisted across a same-kernel reboot.
    • Exercised SSH, Azure agent/IMDS, DNS/HTTPS, filesystem I/O, and basic nftables operations.
    • Verified policy rollback and RPM removal restored module loading.

Simple test:

(
set -e
if grep -q '^qrtr ' /proc/modules; then
    echo "STOP: qrtr is already loaded" >&2
    exit 1
fi

sudo modprobe qrtr
sudo modprobe -r qrtr

d=$(mktemp -d)
trap 'rm -f "$d/test.conf"; rmdir "$d"' EXIT

sudo modulejail -p conservative --fail-on-module-load \
    -o "$d/test.conf" >/dev/null

if sudo modprobe -C "$d" qrtr; then
    echo "FAIL: unexpectedly loaded"
    exit 1
fi

sudo modprobe qrtr
sudo modprobe -r qrtr
echo "PASS: blocked with ModuleJail policy; loads normally without it"
)

Pin the Fedora import because it postdates the global source snapshot. Keep the upstream spec unchanged and do not activate any policy.

Signed-off-by: Rachel Menge <rlmenge@gmail.com>

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 74a6c6b0-1358-4657-b173-0734bd1d8a50
Copilot AI balanced review requested due to automatic review settings December 1, 2026 23:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Maintainer sign-off is still required for modulejail’s inherited SDK publication-channel assignments.

1 open issue
What changed in this PR

Adds ModuleJail 1.6.3 as an optional kernel-module hardening package for Azure Linux 4, without enabling a blocking policy or adding it to default images.

Changes:

  • Pins the Fedora import because it postdates the distro snapshot.
  • Adds the component definition, lock, and generated packaging.
File Description
specs/​m/​modulejail/​sources Records the source archive checksum.
specs/​m/​modulejail/​modulejail.spec Defines RPM packaging and source signature verification.
specs/​m/​modulejail/​jnuyens.gpg Supplies the upstream signing public key.
locks/​modulejail.lock Locks the upstream commit and input fingerprints.
base/​comps/​modulejail/​modulejail.comp.toml Registers the component with an explained upstream pin.

Review effort: Balanced

@@ -0,0 +1,4 @@
[components.modulejail]

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants