Skip to content

Added dirtyfrag module#143

Merged
nickanderson merged 2 commits into
cfengine:masterfrom
nickanderson:security/dirtyfrag
May 19, 2026
Merged

Added dirtyfrag module#143
nickanderson merged 2 commits into
cfengine:masterfrom
nickanderson:security/dirtyfrag

Conversation

@nickanderson
Copy link
Copy Markdown
Member

No description provided.

@nickanderson nickanderson requested a review from olehermanse May 13, 2026 19:16
@nickanderson nickanderson force-pushed the security/dirtyfrag branch 2 times, most recently from 4565be0 to 4bde0b0 Compare May 13, 2026 19:22
Detects Dirty Frag kernel page-cache write vulnerabilities (xfrm-ESP and
RxRPC) and optionally applies mitigation via modprobe.d module blacklisting.
Copy link
Copy Markdown

@oldgiova oldgiova left a comment

Choose a reason for hiding this comment

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

I've asked Claude Code to helping me review this and here's the finding (the ones that I understood and confirmed with human double-checks)

Comment thread security/dirtyfrag/dirtyfrag.cf Outdated
Comment thread security/dirtyfrag/README.md Outdated
Comment thread security/dirtyfrag/dirtyfrag.cf Outdated
Comment thread security/dirtyfrag/dirtyfrag.cf Outdated
Comment thread security/dirtyfrag/dirtyfrag.cf Outdated
Comment thread security/dirtyfrag/patched-kernels.json Outdated
Copy link
Copy Markdown
Contributor

@craigcomstock craigcomstock left a comment

Choose a reason for hiding this comment

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

looks good. :)

Comment thread security/dirtyfrag/README.md
Comment thread security/dirtyfrag/README.md
Comment thread security/dirtyfrag/README.md Outdated
Comment thread security/dirtyfrag/dirtyfrag.cf Outdated
Comment thread security/dirtyfrag/dirtyfrag.cf Outdated
Comment thread security/dirtyfrag/dirtyfrag.cf Outdated
Comment thread security/dirtyfrag/dirtyfrag.cf
Comment thread security/dirtyfrag/dirtyfrag.cf Outdated
Comment thread security/dirtyfrag/dirtyfrag.cf Outdated
Comment thread security/dirtyfrag/dirtyfrag.cf Outdated
@nickanderson nickanderson marked this pull request as draft May 15, 2026 17:52
@nickanderson
Copy link
Copy Markdown
Member Author

Thanks for the reviews, great stuff. I am working on an overhaul

@nickanderson nickanderson marked this pull request as ready for review May 18, 2026 18:49
@nickanderson
Copy link
Copy Markdown
Member Author

OK, fixups from reviews See what you think now

Addresses Roberto and Craigs reviews and a cross-distro hardening pass
(centos7/rocky8/9, alma10, debian12/13, ubuntu24).

- ipcomp4 -> ipcomp
- namespace references in kernel_patch_check; widen class scope
- version_match patterns
- sourced kernel version from package metadata on Debian/Ubuntu
- Dropped /usr/bin/ paths and useshell pipelines where CFEngine primitives
  suffice (string_split, sort -V -C, packagesmatching)
- Collapsed module-file presence checks into one findfiles per CVE
- Collapse kernel_patch_check into bundle main; drop _kver alias
- Use packagesmatching() instead of a dpkg-query subprocess
- New status: MITIGATED (userns disabled) when user.max_user_namespaces=0
- Composite classes (dirtyfrag_vulnerable, dirtyfrag_esp_mitigated,
  dirtyfrag_rxrpc_mitigated) tagged meta=>{"report"} and namespace-
  scoped, so cf-hub collects them for reports without cluttering the
  default Inventory column set
- CMDB toggle variables default-disabled with explicit opt-in
@nickanderson nickanderson merged commit c538640 into cfengine:master May 19, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants