[WIP] Add mprotect syscall events#367
Draft
Aegrah wants to merge 4 commits into
Draft
Conversation
Collect only read-write protection changes to keep event volume bounded while exposing raw and decoded protection data to consumers. Co-authored-by: Cursor <cursoragent@cursor.com>
Preserve the new CLOCK_BOOTTIME contract while moving the mprotect queue flag to the next available bit. Co-authored-by: Cursor <cursoragent@cursor.com>
Exercise every suppressed protection mask and keep the public event representation and documentation consistent. Co-authored-by: Cursor <cursoragent@cursor.com>
Describe the permission-bit filter without implying that optional protection modifiers are rejected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Collect
sys_enter_mprotectthrough eBPF and expose the address, length, and raw protection mask as a new Quark event.The probe requires both
PROT_READandPROT_WRITEbefore ring-buffer submission; execute and other modifier bits remain optional.quark-mon -uprints the mask in stable R/W/X order. This event is eBPF-only; no kprobe fallback is added.Issue: https://github.com/elastic/endpoint-dev/issues/20408
Verification
t_mprotect: PASS0through7; only RW and RWX are observed20260720T164000Z-mprotect-pr-ready-preflight— PASS20260720T181500Z-mprotect-pr-ready-acceptance— PASSObserved workload:
Companion PRs