MacOs 26 - CIS_Benchmark - Policy Failures
Fleet versions
- Discovered: 4.86.2
- Reproduced: 4.86.2
Web browser and operating system: macOS 26.5.1
💥 Actual behavior
Three CIS benchmark policies on macOS 26 fail or produce incorrect results:
5.1.3 — nvram_info always reports AMFI as enabled on macOS 26
nvram_info returns amfi_enabled = 1 even when AMFI is disabled via sudo nvram boot-args="amfi_get_out_of_my_way=0x1". The CIS 5.1.3 policy always passes regardless of actual AMFI state. Root cause: nvram_info.go:37 checks strings.Contains(res, "amfi_get_out_of_my_way=1") — macOS 26 preserves the hex prefix (0x1), so the substring match silently fails.
5.7 — Default macOS 26 screensaver rule use-login-window-ui causes false FAIL
On macOS 26, the default system.login.screensaver rule is ["use-login-window-ui"] — a new screensaver authorization mechanism. The CIS 5.7 policy treats this as a FAIL on all freshly enrolled, unconfigured macOS 26 hosts.
5.11 — sudo_info Fleetd extension stores boolean flags as null, breaking sudo logging policy
The sudo_info extension stores boolean sudo flags (e.g., Defaults log_allowed) as null in the JSON blob. This makes it impossible to distinguish "flag is enabled" from "flag is absent." The query workaround in PR #48282 (json_type IS NOT NULL) mitigates the symptom but the extension itself is incorrect.
🛠️ Expected behavior
- 5.1.3: When AMFI is disabled (
amfi_get_out_of_my_way=0x1in NVRAM),nvram_infoshould returnamfi_enabled = 0and the CIS 5.1.3 policy should FAIL. Fix: also checkstrings.Contains(res, "amfi_get_out_of_my_way=0x1")inorbit/pkg/table/nvram_info/nvram_info.go. - 5.7:
use-login-window-uineeds security team review to determine if it provides equivalent protection toauthenticate-session-owner. If it does, the query should accept it as a passing state:OR rule LIKE '%use-login-window-ui%'. - 5.11: When
Defaults log_allowedis configured in sudoers,sudo_infoshould store the key as"true"so callers can distinguish enabled from absent. Fix inorbit/pkg/table/sudo_info/: detect lines with no=value and store as"true"instead ofnull.
🧑💻 Steps to reproduce
These steps:
- [ ] Have been confirmed to consistently lead to reproduction in multiple Fleet instances.
- [x] Describe the workflow that led to the error, but have not yet been reproduced in multiple Fleet instances.
5.1.3 — nvram_info hex prefix mismatch
- Enroll a macOS 26 host in Fleet.
- Boot into Recovery and run
csrutil disable, then reboot. - Run
sudo nvram boot-args="amfi_get_out_of_my_way=0x1"and reboot. - Run live query:
SELECT * FROM nvram_info;— observeamfi_enabled = 1(incorrect). - Confirm raw NVRAM:
SELECT value FROM nvram WHERE name = 'boot-args';— returnsamfi_get_out_of_my_way=0x1. - Run CIS 5.1.3 policy — observe it passes (false positive).
5.7 — use-login-window-ui false FAIL
- Enroll a freshly enrolled macOS 26 host with no custom screensaver authdb configuration.
- Run live query:
SELECT JSON_EXTRACT(json_result, '$.rule') FROM authdb WHERE right_name = 'system.login.screensaver';— observe["use-login-window-ui"]. - Run the CIS 5.7 policy — observe it returns no rows (FAIL) on an unconfigured host.
5.11 — sudo_info null boolean flags
- Enroll a macOS 26 host in Fleet.
- Add
Defaults log_allowedto/etc/sudoers.d/. - Confirm the setting is active:
sudo sudo -V | grep -i "log when a command is allowed"— key appears. - Run live query:
SELECT JSON_EXTRACT(json_result, '$.Log when a command is allowed by sudoers') FROM sudo_info;— observenullinstead of"true".
🕯️ More info
For context on what we were doing refer to https://github.com/fleetdm/fleet/issues/35120
- 5.11 is no longer an issue.
- 5.7 working as intended according to the benchmark.
QA Summary
Validated the fix for #48516 item 5.1.3 (PR #54235, nvram_info AMFI detection) on the macOS 26.5.1 Parallels VM (macos.shared) with SIP disabled, over two sessions. Scope was the changed table and its policy only; 5.7 and 5.11 were closed by engineering.
Results
| Check | Result | Notes |
|---|---|---|
| Shipped 1.62.1 with =0x1 | ✅ | reproduces the bug: amfi_enabled = 1 |
| Fixed ext with =0x1 | ✅ | amfi_enabled = 0 |
| Fixed ext with =1 | ✅ | 0 |
| No boot-args | ✅ | 1 on fixed ext and old agent |
| =0 / =0x0 / =0b0 / =00 | ✅ | 1 |
| Bare flag | ✅ | 0 |
| =0xff / =yes | ✅ | 0, fails closed |
| Among other args (-v … debug=0x144) | ✅ | 0; without the AMFI arg → 1 |
| Similar / dash-prefixed names | ✅ | 1 |
| =0X0 | ✅ | 0, documented XNU behaviour |
| Table shape / extension registration | ✅ | one column; extension v1 registered |
| Agent availability during run | ✅ | all fleetctl queries answered |
| Unit tests | ✅ | ok |
| Policy evaluated by fixed agent: pass state | ✅ | orbit 26.10.58309, boot-args empty → pass |
| Policy evaluated by fixed agent: fail state | ✅ | =0x1 → fail within ~15 s of refetch; confirmed in UI |
| Restore to pass | ✅ | boot-args cleared → pass |
Hex values hide in shade Fresh hosts fail needless checks now Data rings more true