Skip to content

fix(kernel): resolve CIS unused module findings - #18697

Merged
Tobias Brick (tobiasb-ms) merged 1 commit into
4.0from
tobiasb-ms/cis-disable-unused-kernel-modules
Sep 3, 2026
Merged

fix(kernel): resolve CIS unused module findings#18697
Tobias Brick (tobiasb-ms) merged 1 commit into
4.0from
tobiasb-ms/cis-disable-unused-kernel-modules

Conversation

@tobiasb-ms

@tobiasb-ms Tobias Brick (tobiasb-ms) commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • compile out CRAMFS, freevxfs, HFS, HFS+, FireWire, and FireWire NOSY support on x86_64 and aarch64

Rationale

These modules are not part of the expected Azure Linux server workload surface, and compiling them out removes unused kernel attack surface while satisfying the CIS requirement that they not be available. Unlike a modprobe deny-list, this also prevents privileged software from bypassing policy by loading the module file directly.

The existing distribution evidence supports removal:

  • Azure Linux 3 disables freevxfs, HFS, HFS+, and FireWire on both architectures. CRAMFS remains a module there, but AKS images explicitly block it through AgentBaker's CIS modprobe policy.
  • Amazon Linux 2023 disables all six options on both x86_64 and aarch64. This was verified in the shipped configs from the official 6.1 and 6.18 binary kernel RPMs, not inferred from a package list.

This also eliminates an x86_64 CIS-CAT applicability trap: AZL4 previously disabled CONFIG_FIREWIRE but retained CONFIG_FIREWIRE_NOSY=m. CIS-CAT treated nosy.ko under drivers/firewire as evidence that the unrelated FireWire core module was available.

Validation

After incorporating the latest 4.0 kernel changes, the kernel was rebuilt successfully for x86_64 and aarch64. Both shipped kernel configs were inspected, and the x86_64 build was installed on AZL4 nightly vm-base 4.0.2026082802 and tested:

  • verified all six options are unset in both built kernel configs
  • booted the x86_64 kernel successfully
  • verified the affected module files are absent and none are loaded
  • reran the CIS Azure Linux 4 Level 1 Server profile: all five affected rules passed
  • score improved from 87.88% (203 pass, 28 fail) to 90.04% (208 pass, 23 fail)

Related work items

  • AB#22846 - Ensure cramfs kernel module is not available
  • AB#22847 - Ensure freevxfs kernel module is not available
  • AB#22848 - Ensure hfs kernel module is not available
  • AB#22849 - Ensure hfsplus kernel module is not available
  • AB#22850 - Ensure firewire-core kernel module is not available

Copilot AI balanced review requested due to automatic review settings September 2, 2026 20:31

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

The post-rebase 1.3 build inputs require fresh build and smoke/CIS validation.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Removes unused kernel modules to reduce attack surface and satisfy CIS requirements.

Changes:

  • Disables CRAMFS, freevxfs, HFS/HFS+, FireWire, and NOSY.
  • Bumps the kernel release to 6.18.45-1.3.
  • Refreshes rendered configs and lock fingerprint.
File summaries
File Description
base/comps/kernel/kernel.spec Bumps release and changelog.
base/comps/kernel/6.18-x86_64-azl.config Disables targeted x86_64 modules.
base/comps/kernel/6.18-aarch64-azl.config Disables targeted aarch64 modules.
specs/k/kernel/kernel.spec Updates rendered kernel spec.
specs/k/kernel/6.18-x86_64-azl.config Updates rendered x86_64 config.
specs/k/kernel/6.18-aarch64-azl.config Updates rendered aarch64 config.
locks/kernel.lock Refreshes the input fingerprint.
Review details
  • Files reviewed: 6/7 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread base/comps/kernel/kernel.spec
@tobiasb-ms

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
2 pipeline(s) were filtered out due to trigger conditions.

@tobiasb-ms
Tobias Brick (tobiasb-ms) marked this pull request as ready for review September 2, 2026 20:41
@tobiasb-ms
Tobias Brick (tobiasb-ms) requested a review from a team as a code owner September 2, 2026 20:41
Copilot AI review requested due to automatic review settings September 2, 2026 22:40
@tobiasb-ms
Tobias Brick (tobiasb-ms) force-pushed the tobiasb-ms/cis-disable-unused-kernel-modules branch from b5fb3e1 to 40d6f71 Compare September 2, 2026 22:40

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

The aarch64 output lacks the mandatory installation and smoke-test validation.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 7/8 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread base/comps/kernel/6.18-aarch64-azl.config
Disable unsupported kernel modules on x86_64 and aarch64 to resolve these
CIS Level 1 findings:

- Ensure cramfs kernel module is not available (AB#22846)
- Ensure freevxfs kernel module is not available (AB#22847)
- Ensure hfs kernel module is not available (AB#22848)
- Ensure hfsplus kernel module is not available (AB#22849)
- Ensure firewire-core kernel module is not available (AB#22850)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 2, 2026 22:55
@tobiasb-ms
Tobias Brick (tobiasb-ms) force-pushed the tobiasb-ms/cis-disable-unused-kernel-modules branch from 40d6f71 to daa8c0c Compare September 2, 2026 22:55

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.

🟢 Approval recommended

The policy entries match both architecture configs, and the release, lock, rendered outputs, and validation are consistent.

Review details
  • Files reviewed: 7/8 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@tobiasb-ms

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
2 pipeline(s) were filtered out due to trigger conditions.

@tobiasb-ms
Tobias Brick (tobiasb-ms) merged commit facb285 into 4.0 Sep 3, 2026
12 checks passed
@tobiasb-ms
Tobias Brick (tobiasb-ms) deleted the tobiasb-ms/cis-disable-unused-kernel-modules branch September 3, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants