← Back to issue list

Symlinks to libc are followed by the dump and copy plugins

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1658774
Type
issue
State
closed
Author
~kyrofa
Labels
Created
Updated
Closed

Current evaluation

Abandoned without resolution. Proposed updating dump and copy plugins to allow dangling libc symlinks to pass through instead of following or rewriting them.

Suggested action:

No scores available.

Issue body

Snapcraft has some special-case code where, if a stage-package is pulled with symlinks to libraries contained within libc, snapcraft allows them to dangle knowing that they'll be pointing to (hopefully) valid locations once run. However, the various plugins in snapcraft also have code that checks for dangling symlinks, and rewrites (or follows) them as necessary to make sure the snap won't be broken once run. This is conflicting logic, and it particularly comes to light when using content sharing. When trying to build a content consumer by tarring the producer's staging area and adding it as a part to the consumer, the plugins follow the symlinks that are dangling in the producer, copying libc in from the system. Which means if any other part in the consumer stages something that has symlinks to libc again (which are left dangling), they conflict with the parts that were already staged. To overcome this whole issue, ideally snapcraft could simply _remove_ symlinks to libc. However, as discussed in the comments below this doesn't work in practice. Therefore, the plugins that rewrite/follow symlinks need to be updated to allow libc symlinks to pass through.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Abandoned without resolution. Proposed updating dump and copy plugins to allow dangling libc symlinks to pass through instead of following or rewriting them.
qwen/qwen3.6-35b-a3b Closed. Fixed by updating dump and copy plugins to allow libc symlinks to pass through, preventing content sharing conflicts.
qwen/qwen3.6-35b-a3b Abandoned. Dump and copy plugins incorrectly followed libc symlinks, causing content sharing conflicts. The proposed fix to allow these symlinks to pass through was never implemented.
qwen3.6-35b-a3b-mtp-q6 Closed without resolution. The dump and copy plugins were not updated to allow libc symlinks to pass through, leaving the content sharing conflict unresolved.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1174 copy, dump plugin: ignore symlinks to libc. snapcraft merged Merged. Updated copy and dump plugins to ignore symlinks to libc instead of removing them, resolving dangling symlink and build bugs from a prior fix. Approved by reviewers and passed CI.
83%