Skip to content

fix: detect cyclic link entries during asar path resolution - #52858

Merged
MarshallOfSound merged 2 commits into
44-x-yfrom
trop/44-x-y-bp-fix-detect-cyclic-link-entries-during-asar-path-resolution-1786878638613
Aug 16, 2026
Merged

MarshallOfSound merged 2 commits into
44-x-yfrom
trop/44-x-y-bp-fix-detect-cyclic-link-entries-during-asar-path-resolution-1786878638613

Conversation

@trop

@trop trop Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Backport of #52825

See that PR for details.

Notes: Fixed a crash when resolving a path inside a malformed ASAR archive that contains cyclic link entries.

trop Bot and others added 2 commits August 16, 2026 11:10
Path resolution in shell/common/asar/archive.cc followed "link" entries
with no bound. A header whose links form a cycle (an entry pointing at
itself, two entries pointing at each other, or a link that resolves back
through its own path) made Archive::GetFileInfo self-recurse and the
GetNodeFromPath/GetFilesNode pair mutually recurse until the stack was
exhausted.

Cap the number of chained link resolutions in both paths and treat an
exceeded limit as a missing entry, so a malformed header fails the lookup
gracefully instead of crashing. Legitimate archives only ever chain a few
links, so the limit does not affect valid lookups.

Notes: none

Co-authored-by: Sam Attard <[email protected]>
@trop
trop Bot requested a review from MarshallOfSound August 16, 2026 11:11
@trop trop Bot added 44-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Aug 16, 2026
@MarshallOfSound
MarshallOfSound enabled auto-merge (squash) August 16, 2026 11:12
@MarshallOfSound
MarshallOfSound merged commit c6ab210 into 44-x-y Aug 16, 2026
90 checks passed
@MarshallOfSound
MarshallOfSound deleted the trop/44-x-y-bp-fix-detect-cyclic-link-entries-during-asar-path-resolution-1786878638613 branch August 16, 2026 13:23
@release-clerk

release-clerk Bot commented Aug 16, 2026

Copy link
Copy Markdown

Release Notes Persisted

Fixed a crash when resolving a path inside a malformed ASAR archive that contains cyclic link entries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

44-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant