Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
cd38a59
refactor(macho): extract non-throwing container and slice load-comman…
chordpli Oct 20, 2026
2b41ca6
feat(macho): report per-slice encryption status in inspect_macho
chordpli Oct 20, 2026
f210a4f
fix(macho): keep slice facts and failures under large tables and clos…
chordpli Oct 20, 2026
ee6f565
Merge remote-tracking branch 'origin/main' into feat/macho-encryption…
chordpli Oct 20, 2026
c128c72
Merge remote-tracking branch 'origin/main' into feat/macho-encryption…
chordpli Oct 20, 2026
c6c8c75
Merge remote-tracking branch 'origin/main' into feat/macho-encryption…
chordpli Oct 21, 2026
15db4e6
Merge remote-tracking branch 'origin/main' into feat/macho-encryption…
chordpli Oct 22, 2026
c54ff26
Merge remote-tracking branch 'origin/main' into feat/macho-encryption…
chordpli Oct 24, 2026
0d506e2
fix(macho): map encrypted ranges only within segment VM extents
chordpli Oct 25, 2026
3bd1541
Merge remote-tracking branch 'origin/main' into HEAD
Oct 26, 2026
611ae1e
fix(macho): read encryption through the admitted descriptor facts
chordpli Oct 26, 2026
7e6d57f
fix(macho): retain a finished report when the target close fails
chordpli Oct 26, 2026
9c74d8d
Merge remote-tracking branch 'origin/main' into tmp5359
chordpli Oct 26, 2026
d95f4e3
Merge remote-tracking branch 'origin/main' into tmp5359
chordpli Oct 26, 2026
5a22d73
Merge remote-tracking branch 'origin/main' into tmp5359
chordpli Oct 26, 2026
811c47d
Merge remote-tracking branch 'origin/main' into tmp5359
chordpli Oct 26, 2026
08ed647
Merge remote-tracking branch 'origin/main' into tmp5359
chordpli Oct 27, 2026
29f37e6
Merge remote-tracking branch 'origin/main' into tmp5359
chordpli Oct 27, 2026
d3f63a8
test(native): supply readEncryption in merged dyld refusal cases
chordpli Oct 27, 2026
014a868
test(views): bind the Mach-O encryption page to its facet
chordpli Oct 27, 2026
c2c2e93
Merge remote-tracking branch 'origin/main' into tmp5359
chordpli Oct 28, 2026
7fb4355
Merge remote-tracking branch 'origin/main' into tmp5359
chordpli Oct 28, 2026
3476a90
Merge remote-tracking branch 'origin/main' into feat/macho-encryption…
chordpli Oct 29, 2026
13904db
fix(macho): bound encryption commands and range mapping across slices
chordpli Oct 29, 2026
1bc25f6
Merge remote-tracking branch 'origin/main' into feat/macho-encryption…
chordpli Oct 29, 2026
27edcc0
style(macho): format encryption reader and binding test
chordpli Oct 29, 2026
c806969
fix(macho): stop retaining segments past the mapping budget
chordpli Oct 29, 2026
26280c7
feat(macho): preserve per-slice encryption facts and mapping budgets
gensokyo-dev Oct 29, 2026
90ee1c6
chore(macho): align encryption reporting with current main
gensokyo-dev Oct 29, 2026
0eba2e7
docs(macho): clarify retained mapping allowance
gensokyo-dev Oct 29, 2026
5ffb40d
fix(ci): own the Mach-O encryption test in Apple scope
gensokyo-dev Oct 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/main' into tmp5359
# Conflicts:
#	src/artifacts/apple/MachoLoadCommandReader.ts
  • Loading branch information
chordpli committed Oct 27, 2026
commit 08ed6476ecbc91ab7bcd789d70364def0733c6f6
40 changes: 27 additions & 13 deletions src/artifacts/apple/MachoLoadCommandReader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,16 @@ export const readMachoContainer = async (
status: "unsupported",
reason: JVM_CLASS_IDENTITY_LIMIT_REASON,
};
// Aliased declarations are rejected at the declaration owner before any
// slice payload is parsed. A declaration whose own range is already
// defective keeps that fault; it does not turn its neighbours into aliases.
const overlap = findOverlappingFatSlices(rangeValidSlices(header));
if (overlap !== null)
return {
kind: "issue",
status: "malformed",
reason: overlapReason(overlap),
};
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Resolved
// Identity is only malformed through a slice range issue, which the
// returned rangeIssues retain.
return {
Expand Down Expand Up @@ -283,17 +293,15 @@ export const readMachoImage = async (
}
};

/** Reject aliasing at the declaration owner before parsing any slice payload. */
const assertDistinctFatSlices = (
declarations: readonly FatSliceDeclaration[],
): void => {
const overlap = findOverlappingFatSlices(declarations);
if (overlap !== null)
throw new MachoFormatIssue(
"malformed",
`Mach-O slices ${overlap[0].index} and ${overlap[1].index} overlap.`,
);
};
const rangeValidSlices = (
header: ParsedFatContainerHeader,
): FatSliceDeclaration[] =>
header.slices.filter((_, index) => header.rangeIssues[index] === null);

const overlapReason = (
overlap: NonNullable<ReturnType<typeof findOverlappingFatSlices>>,
): string =>
`Mach-O slices ${overlap[0].index} and ${overlap[1].index} overlap.`;

/**
* Apple lipo stores one hidden ARM64 row after the declared 32-bit FAT table.
Expand Down Expand Up @@ -321,10 +329,17 @@ const readAppleHiddenArm64Row = async (
return { status: "malformed", reason: row.reason };
const declaration = { ...row.slices[0]!, index: header.count };
if (declaration.cpuType !== CPU_TYPE_ARM64) return null;
const overlap = findOverlappingFatSlices([
...rangeValidSlices(header),
declaration,
]);
return {
status: "declared",
declaration,
rangeIssue: validateFatSlice(declaration, fileSize, end),
rangeIssue:
overlap === null
? validateFatSlice(declaration, fileSize, end)
: overlapReason(overlap),
};
};

Expand All @@ -337,7 +352,6 @@ const readHiddenSlice = async (
throw new MachoFormatIssue(row.status, row.reason);
const { declaration, rangeIssue } = row;
if (rangeIssue !== null) throw new MachoFormatIssue("malformed", rangeIssue);
assertDistinctFatSlices([...header.slices, declaration]);
const slice = await readSlice(readAt, declaration.offset, declaration.size, {
fatCpuType: declaration.cpuType,
fatCpuSubtype: declaration.cpuSubtype,
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.