Skip to content

LATX, fix: Support CEF sandbox isolation - #344

Closed
y347812075 wants to merge 1 commit into
lat-opensource:masterfrom
y347812075:fix/cef-sandbox-isolation
Closed

LATX, fix: Support CEF sandbox isolation#344
y347812075 wants to merge 1 commit into
lat-opensource:masterfrom
y347812075:fix/cef-sandbox-isolation

Conversation

@y347812075

@y347812075 y347812075 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • support CEF user, PID, network, and shared-filesystem namespace clone paths
  • preserve and rebuild QEMU RCU state across fork and raw clone operations
  • evaluate x86 seccomp-BPF programs at the guest syscall boundary
  • provide complete SIGSYS metadata for CEF broker traps
  • keep the implementation buildable with older seccomp UAPI headers

Root cause

LATX rejected the namespace flags used by the CEF zygote before reaching the
host kernel. After namespace creation was enabled, CEF still could not install
its x86 seccomp filters because applying those filters to the LoongArch host
would inspect the wrong syscall ABI and could restrict translator helper
threads. Brokered SECCOMP_RET_TRAP actions also require the trap ID and guest
syscall context in siginfo.

This change creates the requested host namespaces while maintaining QEMU child
state, and interprets seccomp filters against guest syscall numbers and
arguments before syscall translation.

Compatibility

SECCOMP_RET_USER_NOTIF is conditionally defined for Linux 4.19-era userspace
headers. User notification and listener FDs remain unsupported and return
ENOSYS; the fallback only provides the stable UAPI action value needed to
compile the existing unsupported-action path.

Validation

  • ./latxbuild/build64.sh
  • ./latxbuild/build32.sh
  • Linux 4.19 old-world ./latxbuild/build64.sh
  • old-world CEF application launch with LATX_AOT=0 LATX_KZT=0

The old-world run remained active for 20 seconds and created the expected
zygote, chrome-sandbox, and network-service processes. The logs contained no
clone EINVAL, debugger startup, rejected BPF filter, unexpected SIGSYS, or
startup SIGTRAP error.

Support the namespace clone flags used by CEF while preserving RCU
state across fork and raw clone paths.

Evaluate x86 seccomp-BPF filters at guest syscall boundaries and provide
the SIGSYS metadata required by CEF broker traps. Define the stable
SECCOMP_RET_USER_NOTIF value for older UAPI headers while keeping user
notification unsupported.

Signed-off-by: yuerengan <y347812075@163.com>
@y347812075

Copy link
Copy Markdown
Contributor Author

Superseded by #349. The replacement is based on the latest master, includes the completed namespace fix, and excludes test-report documentation.

@y347812075 y347812075 closed this Jul 28, 2026
@y347812075
y347812075 deleted the fix/cef-sandbox-isolation branch July 28, 2026 01:42
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.

1 participant