# CVE-2026-43689 — chroot(2) Without Entitlement

**Component:** XNU Kernel (bsd/kern/vfs_syscalls.c → chroot)  
**Versions:** xnu-12377.162.14~4 (26.6.2, vulnerable) → xnu-12377.162.13.701.45~1 (26.7.2, patched)  
**Impact:** "A permissions issue was addressed with additional restrictions" (Apple)  
**Credit:** Andreas Jaegersberger & Ro Achterberg of Nosebeard Labs  
**CVSS:** 7.8 (High) — Local, Low privileges, Low complexity

## DEVICE TEST RESULTS (2026-11-12)

**Device:** iPhone 17 Pro (iPhone18,1), iOS 26.6.2, Kernel 25.6.0  
**HW:** V53AP, Machine: iPhone18,1  
**Test UID:** 501 (mobile), sandboxed app container

### Q1: Can a sandboxed app call chroot(2)? → NO (EPERM)

```
chroot(2) FAILED: errno=1 (Operation not permitted)
Q1: NO — EPERM. Root-uid check still in place.
Bug may require root-but-unentitled context.
```

**The kernel has TWO gates on chroot(2):**
1. **`suser()` root-uid check** — requires uid 0. **BLOCKS mobile-uid (501) apps.**
2. **Entitlement check** (`com.apple.private.vfs.chroot`) — **MISSING on 26.6.2** (added in 26.7.2)

A sandboxed app (uid 501) hits the root check FIRST and gets EPERM before ever reaching the (missing) entitlement check. The bug is narrower than the CVE description suggests.

### Q2 & Q3: SKIPPED (Q1 failed)

Cannot test sandbox path confusion or privileged access without successful chroot.

### Additional Observations

- **Symlink to `/` blocked:** `symlink("/", fakeroot/escape)` returned "No such file or directory" — sandbox blocks symlink creation pointing to system paths
- **Pre-chroot access:** Both `/etc/passwd` and `/var/mobile` are accessible (expected baseline for sandboxed app)
- **Saved root fd: 3** — app CAN open `/` as O_RDONLY before any chroot attempt

## Revised Exploitation Assessment

### Who CAN exploit this bug?

The missing entitlement check is exploitable by processes that:
- **Have root (uid 0)** — passes the suser() check
- **Lack `com.apple.private.vfs.chroot`** — most root daemons don't have this entitlement

This includes many system daemons that run as root but were never intended to call chroot. If you can get code execution in any root daemon (via a separate bug), the chroot + path confusion attack becomes available.

### Who CANNOT exploit this bug?

- Sandboxed apps (uid 501) — blocked by suser() check
- WebContent process — runs as _webapp (uid ~33), also blocked
- Any non-root process

### Chain Impact

**CVE-2026-43689 is demoted from "sandbox escape" to "post-root persistence aid."**

It's useful AFTER getting root via kernel exploit, not as a stepping stone to root:

```
BEFORE (hypothesized):
  WebKit → chroot (sandbox escape) → kernel
  
AFTER (confirmed):
  Kernel exploit → root → chroot (path confusion for persistence)
```

**Chain A is now the ONLY viable chain:**
```
CVE-2026-84607 (AppleAVE2, app → kernel directly via VideoToolbox)
  → CVE-2026-86916 (kernel UAF → full kernel R/W)
  → Root (modify process credentials)
  → CVE-2026-43689 (chroot for persistence, IF path confusion works)
  → CVE-2026-86886 (TCC path traversal for protected file writes)
```

Chain B (WebKit entry) still works but no longer uses chroot for sandbox escape — it needs a different escape mechanism or must rely on Chain A.

## Patch Evidence

**Added in 26.7.2 kernel strings:**
```
com.apple.private.vfs.chroot
%s: proc %s[%d] calls chroot(2) without entitlement
```

On 26.6.2, no entitlement check gates `chroot(2)`. But the pre-existing root-uid check remains. The 26.7.2 patch REPLACES the root-uid check with an entitlement check (or adds the entitlement check alongside it), meaning the fix may actually WIDEN access: a non-root process WITH the entitlement can now chroot, while previously only root could.

## Remaining Value

Even though it's not a sandbox escape, CVE-2026-43689 has value:

1. **Post-exploitation tool:** After kernel exploit → root, use chroot to confuse Seatbelt for persistence writes
2. **Daemon exploitation:** If any root daemon has a bug allowing controlled chroot, path confusion could escalate
3. **Research insight:** Confirms kernel has defense-in-depth (two checks), but the entitlement check replacement pattern itself is interesting — was Apple INTENDING to allow non-root chroot with the right entitlement?

## Risk Assessment (Updated)

| Factor | Before Device Test | After Device Test |
|--------|-------------------|-------------------|
| Sandbox escape from app | MEDIUM | **RULED OUT** |
| Exploitable from root daemon | HIGH | **CONFIRMED LIKELY** |
| Chain role | Stage 2 (escape) | **Stage 4 (post-root persistence)** |
| Priority | HIGH | **LOW** (AVE2 + kernel UAF are the critical path) |
