{"record":{"id":"76f3ea558fc8c0a1","repo":"openai/codex","slug":"helperfirewallruleverifyfailed","errorCode":"HelperFirewallRuleVerifyFailed","errorMessage":"LocalUserAuthorizedList (read-back) failed: {err:?}","messagePattern":"LocalUserAuthorizedList \\(read-back\\) failed: (.+?)","errorType":"error_code","errorClass":"SetupFailure","httpStatus":null,"severity":"error","filePath":"codex-rs/windows-sandbox-rs/src/bin/setup_main/win/firewall.rs","lineNumber":374,"sourceCode":"        rule.SetProfiles(NET_FW_PROFILE2_ALL.0).map_err(|err| {\n            anyhow::Error::new(SetupFailure::new(\n                SetupErrorCode::HelperFirewallRuleCreateOrAddFailed,\n                format!(\"SetProfiles failed: {err:?}\"),\n            ))\n        })?;\n        configure_rule_network_scope(rule, spec)?;\n        rule.SetLocalUserAuthorizedList(&BSTR::from(spec.local_user_spec))\n            .map_err(|err| {\n                anyhow::Error::new(SetupFailure::new(\n                    SetupErrorCode::HelperFirewallRuleCreateOrAddFailed,\n                    format!(\"SetLocalUserAuthorizedList failed: {err:?}\"),\n                ))\n            })?;\n    }\n\n    // Read-back verification: ensure we actually wrote the expected SID scope.\n    let actual = unsafe { rule.LocalUserAuthorizedList() }.map_err(|err| {\n        anyhow::Error::new(SetupFailure::new(\n            SetupErrorCode::HelperFirewallRuleVerifyFailed,\n            format!(\"LocalUserAuthorizedList (read-back) failed: {err:?}\"),\n        ))\n    })?;\n    let actual_str = actual.to_string();\n    if !actual_str.contains(spec.offline_sid) {\n        return Err(anyhow::Error::new(SetupFailure::new(\n            SetupErrorCode::HelperFirewallRuleVerifyFailed,\n            format!(\n                \"offline firewall rule user scope mismatch: expected SID {}, got {actual_str}\",\n                spec.offline_sid\n            ),\n        )));\n    }\n    Ok(())\n}\n\nfn configure_rule_network_scope(rule: &INetFwRule3, spec: &BlockRuleSpec<'_>) -> Result<()> {","sourceCodeStart":356,"sourceCodeEnd":392,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/windows-sandbox-rs/src/bin/setup_main/win/firewall.rs#L356-L392","documentation":"After setting a firewall rule's LocalUserAuthorizedList, the code reads the value back to verify the OS accepted the per-user restriction and the read-back COM getter returned an error. This means Windows refused or mangled the local-user ACL string (SDDL O:LSD:(A;;CC;;;SID) format) on the rule, so the rule cannot be trusted to limit traffic to the offline sandbox user.","triggerScenarios":"Thrown at codex-rs/windows-sandbox-rs/src/bin/setup_main/win/firewall.rs:374 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the HRESULT in the message to see whether the rule object rejected the SDDL user list or the getter failed for another reason","Confirm the offline user SID in the local_user_spec is a valid, resolvable SID string","Verify the Windows version supports per-user firewall rules (LocalUserAuthorizedList requires Windows 8+/Vista+ firewall stack)","Delete the stale codex firewall rules and re-run setup so the rule is recreated cleanly"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}