mxc icon indicating copy to clipboard operation
mxc copied to clipboard

MXC does not fall back to Tier 3 AppContainer+DACL on Windows 11 25H2 when BaseContainer is velocity-gated and bfscfg.exe is unavailable

Open andi0b opened this issue 5 months ago • 7 comments

Relevant area(s)

Windows

Brief description of your issue

MXC does not fall back to Tier 3 AppContainer+DACL on a Windows host where BaseContainer appears to be present but is not usable because required velocity keys are disabled, and where bfscfg.exe is unavailable.

Steps to reproduce

  1. On Windows 11 Pro 25H2 non-preview, run a simple processcontainer sandbox with schema 0.6.0-alpha
  2. Observe the BaseContainer failure.
  3. Change the same config to schema 0.4.0-alpha.
  4. Run the same command again.

Expected behavior

MXC should select a working fallback tier, ideally AppContainer+DACL Tier 3, when:

  • BaseContainer launch fails with E_NOTIMPL due to disabled velocity keys, and
  • AppContainer+BFS is unavailable because bfscfg.exe is missing.

Alternatively, the probe should detect this host state up front and report that Tier 3 is selected or explain why Tier 3 cannot be used.

Actual behavior

Observed on Windows 11 Pro 25H2, latest non-preview build.

PowerShell: 7.6.2
OsName: Microsoft Windows 11 Pro
OsVersion: 10.0.26200
OsBuildNumber: 26200
DisplayVersion: 25H2
UBR: 8524

With schema 0.6.0-alpha, MXC selects BaseContainer and fails at launch:

Experimental_CreateProcessInSandbox returned E_NOTIMPL. The following velocity keys are not enabled: 61389575, 61155944. Enable them and retry, or use schema version '0.4.0-alpha' to fall back to the AppContainer backend. {"error":{"code":"backend_error","extended_error":"Experimental_CreateProcessInSandbox failed: WIN32_ERROR(120)","message":"Experimental_CreateProcessInSandbox returned E_NOTIMPL. The following velocity keys are not enabled: 61389575, 61155944. Enable them and retry, or use schema version '0.4.0-alpha' to fall back to the AppContainer backend."}}

With schema 0.4.0-alpha, MXC fails because BFS is unavailable:

Filesystem policy error: bfscfg.exe is not available on this Windows build. Your config uses schema version '0.4.0-alpha', which requires BFS support. Either update your Windows build to one that includes bfscfg.exe, or update your config to schema version '0.6.0-alpha' or later (which uses the BaseContainer backend and does not require bfscfg.exe).

This leaves no working fallback path on this Windows 11 25H2 non-preview host, even though documentation suggests Tier 3 AppContainer+DACL should be available when neither BaseContainer nor BFS can be used.

andi0b avatar Jun 04 '26 19:06 andi0b

In my case, bfscfg.exe is indeed available here C:\Windows\System32\bfscfg.exe

  1. tier2_bfs is compiled OUT of production binaries — from Cargo.toml: "OFF by default: production wxc-exec cannot resolve or spawn bfscfg.exe, and fallback_detector::detect naturally falls through T2 to T3" And explicitly from build.yml: "production binaries on Win 11 25H2 must NOT carry the tier2_bfs feature, since bfscfg.exe hangs that host"
  2. So schema 0.4.0-alpha + production binary = BFS path triggered, but feature compiled out . The binary should fall through to Tier 3 (AppContainer+DACL) but doesn't.
  3. 0.6.0-alpha schema has fallback.allowDaclMutation: true as default but it's not triggering because the BaseContainer failure (E_NOTIMPL) doesn't fall through to DACL correctly.

Which update do we need to enable processcontainer on 25H2?

sabbour avatar Jun 10 '26 19:06 sabbour

I think this project is already abandoned. Build conference is over :)

andi0b avatar Jun 10 '26 19:06 andi0b

I think this project is already abandoned. Build conference is over :)

Ouch! I'm working on a PR to make Tier 1 -> Tier 3 fallback work reliably on downlevel Windows builds.

MGudgin avatar Jun 10 '26 21:06 MGudgin

Oh, good to know. So this is a confirmed bug and we aren't doing anything wrong?

andi0b avatar Jun 10 '26 22:06 andi0b

Yes, on a machine that has a processmodel.dll but where Experimental_CreateProcessInSandbox fails, mxc doesn't fall back to Tier 3. My fix will address that.

MGudgin avatar Jun 11 '26 00:06 MGudgin

@sabbour, @andi0b fix is now merged to main. We'll push an updated package to npm shortly.

MGudgin avatar Jun 11 '26 21:06 MGudgin

0.7.0 has been published

MGudgin avatar Jun 15 '26 01:06 MGudgin