Skip to content

Add kernel module name and taint fields to load_module events#761

Open
nicholasberlin wants to merge 3 commits into
mainfrom
load-module-taints
Open

Add kernel module name and taint fields to load_module events#761
nicholasberlin wants to merge 3 commits into
mainfrom
load-module-taints

Conversation

@nicholasberlin

Copy link
Copy Markdown
Contributor

Summary

Adds five new fields to Linux load_module process events:

Field Type Description
process.Ext.load_module.name keyword Canonical kernel module name (mod->name)
process.Ext.load_module.version keyword Module version, if declared via MODULE_VERSION()
process.Ext.load_module.src_version keyword Module source version checksum
process.Ext.load_module.taints long Bitmask of taint flags the module sets on the kernel (0 = untainted)
process.Ext.load_module.taint_flags keyword Decoded kernel taint letters (e.g. OE = out-of-tree + unsigned); only present when nonzero

Endpoint reads these from the kernel's module_load tracepoint (via quark's eBPF probes), giving visibility into which LKM was loaded and whether it tainted the kernel — useful for detecting out-of-tree/unsigned rootkit-style module loads.

Companion changes:

  • quark: elastic/quark module-load-taints branch (adds mod->taints to the probe and quark_module_load)
  • endpoint: endpoint-dev branch nberlin/quark-module-load-taints (plumbs the fields into ES documents; its EAF test test_events_load_module asserts them)

What changed

  • custom_schemas/custom_process.yml — field definitions
  • custom_subsets/elastic_endpoint/process/process.yaml — subset entries
  • custom_documentation/src/.../linux_process_load_module.yaml — document the new fields
  • Regenerated: package/endpoint/data_stream/process/fields/fields.yml, package/endpoint/docs/README.md, schemas/v1/process/process.yaml, custom_documentation/doc/.../linux_process_load_module.md

🤖 Generated with Claude Code

Adds process.Ext.load_module.{name,version,src_version,taints,
taint_flags} for Linux load_module process events. Endpoint now
reads the module name and taint bitmask from the kernel's
module_load tracepoint (via quark) and reports whether a loaded
LKM taints the kernel (e.g. out-of-tree or unsigned modules).

Regenerated: process fields.yml, docs/README.md, schemas/v1, and
the load_module custom documentation.
@pzl

pzl commented Jul 10, 2026

Copy link
Copy Markdown
Member

@nicholasberlin branching was a little delayed in this repo, 9.5 branch wasn't cut yet.

Is this change for 9.6? At a quick glance it looks ok, I just might need this to hold for a little bit until we can cut the release branch

@pzl pzl requested review from pzl and removed request for paul-tavares and szwarckonrad July 10, 2026 13:34
@nicholasberlin

Copy link
Copy Markdown
Contributor Author

I plan to backport to 9.5. Happy to hold off until you are ready. How do I indicate it should be backported? With labels?

Sample values for the new process.Ext.load_module.* mappings so the
automated mapping tests exercise them. taints 12288 corresponds to
taint_flags OE (out-of-tree + unsigned).
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.

2 participants