Skip to content

[8.19] Reject non-native ABIs in ML seccomp BPF filter (#3080)#3106

Merged
github-actions[bot] merged 1 commit into
8.19from
backport/8.19/pr-3080
Jul 24, 2026
Merged

[8.19] Reject non-native ABIs in ML seccomp BPF filter (#3080)#3106
github-actions[bot] merged 1 commit into
8.19from
backport/8.19/pr-3080

Conversation

@github-actions

Copy link
Copy Markdown

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

* 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)

@edsavage edsavage 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.

Clean automated backport of an already-reviewed, approved change. Approving so auto-merge can complete.

@github-actions
github-actions Bot merged commit 30aec46 into 8.19 Jul 24, 2026
5 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant