Skip to content

Commit 47fdacf

Browse files
a confined program reads the system's libraries in its cryptex (/private/preboot/Cryptexes); ci: the sandbox's refusals of this package's programs
Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
1 parent 0d96920 commit 47fdacf

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,8 @@ jobs:
255255
- name: The sandbox's refusals and the reports of ended programs
256256
if: failure()
257257
run: |
258-
log show --last 10m --style compact --predicate 'sender == "Sandbox" OR eventMessage CONTAINS "deny("' 2>/dev/null | tail -60 || true
258+
log show --last 10m --style compact --predicate 'eventMessage CONTAINS "deny("' 2>/dev/null \
259+
| grep -E 'openkal|conformance' | tail -80 || true
259260
for f in "$HOME"/Library/Logs/DiagnosticReports/*.ips; do
260261
[ -f "$f" ] || continue
261262
echo "--- $f"; head -c 6000 "$f"; echo

‎src/process.cpp‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,15 @@ struct profile {
6666
if (okm::failed(okm::sys(okm::nr_fcntl, grants[i], okm::f_getpath, reinterpret_cast<okm_long>(path)))) continue;
6767
ok = put(" (subpath ") && quoted(path) && put(")");
6868
}
69+
// The system's own libraries are in its cryptex, a volume this
70+
// system mounts at boot and reaches as /private/preboot as well as
71+
// beneath /System: the loader of a program reads them there, and a
72+
// program refused them is ended by it before its first instruction
73+
// (measured: SIGABRT, termination namespace 35, on macOS 15).
6974
ok = ok && put(")))\n(deny file-read-data (require-not (require-any"
7075
" (subpath \"/System\") (subpath \"/usr/lib\") (subpath \"/usr/share\")"
71-
" (subpath \"/private/var/db/dyld\") (subpath \"/Library/Apple\") (subpath \"/dev\")"
76+
" (subpath \"/private/var/db/dyld\") (subpath \"/private/preboot/Cryptexes\")"
77+
" (subpath \"/Library/Apple\") (subpath \"/dev\")"
7278
" (literal ") && quoted(program) && put(")");
7379
for (kal_uintptr i = 0; ok && i < g; ++i) {
7480
if (okm::failed(okm::sys(okm::nr_fcntl, grants[i], okm::f_getpath, reinterpret_cast<okm_long>(path)))) continue;

0 commit comments

Comments
 (0)