[9.4] Reject non-native ABIs in ML seccomp BPF filter (#3080)#3108
Merged
Conversation
* Reject non-native ABIs in ML seccomp BPF filter The Linux seccomp filter matched only on seccomp_data.nr, so an x86_64 process could issue int 0x80 (i386) and hit number collisions — notably i386 socketcall (102) vs allowlisted x86_64 getuid (102). That opened a socket surface the policy intended to block (elastic/security#12621). Require seccomp_data.arch to match the native ABI (AUDIT_ARCH_X86_64 / AUDIT_ARCH_AARCH64) with an immediate deny on mismatch, before any nr allowlist matching. The arch check is self-contained so existing relative jump offsets in the nr allowlist are unchanged. Co-authored-by: Cursor <[email protected]> * Add changelog for #3080 Co-authored-by: Cursor <[email protected]> * Address Copilot review on seccomp arch gate Use offsetof for seccomp_data field loads and add an x86_64-only int 0x80 denial test, soft-skipped when IA32 emulation is unavailable. Co-authored-by: Cursor <[email protected]> * [ML] Address remaining Copilot review comments on seccomp arch gate - Fix spelling in CSystemCallFilter.h doc comment (macOS, restrict/restricted). - Declare the 'cc' clobber on the int $0x80 i386-ABI probe asm, since the syscall entry path may modify the condition-code flags. Co-authored-by: Cursor <[email protected]> * [ML] Address Copilot review on seccomp arch-gate test/docs - Use plain // comments (not Doxygen //! / \p) in the .cc test file. - Zero the i386 argument registers (ebx/ecx/edx/esi/edi) in the int $0x80 probes so they are deterministic and side-effect free in the failure mode. - Harden the IA32 detection: a compat entry that returns -ENOSYS (stubbed, not truly usable) now skips the assertion instead of failing. - Fix the run-on DESCRIPTION sentence in the header. Co-authored-by: Cursor <[email protected]> * [ML] Remove public-to-private security-tracker references Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: Cursor <[email protected]> (cherry picked from commit 184a65a)
2 tasks
edsavage
approved these changes
Jul 24, 2026
edsavage
left a comment
Contributor
There was a problem hiding this comment.
Clean automated backport of an already-reviewed, approved change. Approving so auto-merge can complete.
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.
Backport
This will backport the following commits from
mainto9.4:Questions ?
Please refer to the Backport tool documentation