Skip to content

fix: handle gzip-compressed and bsdtar-produced OCI RemoteURL layers - #1911

Merged
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:oci
Aug 10, 2026
Merged

fix: handle gzip-compressed and bsdtar-produced OCI RemoteURL layers#1911
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:oci

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

RemoteURL's oci:// path had two gaps that caused real-world OCI artifacts to fail or get misread:

  1. Gzip-compressed layers weren't decompressed. A gzip-compressed tar fails the tar parse and falls through to the raw-blob branch, so the compressed bytes were handed downstream as if they were YAML and died with yaml: control characters are not allowed.

  2. AppleDouble and PAX header entries weren't filtered. The extraction loop matched any tar.TypeReg entry by extension alone. A tar built with macOS's default bsdtar writes extended-attribute sidecar files like ._ns.yaml next to ns.yaml; these match the .yaml filter and inject binary AppleDouble data into the concatenated manifest. Some tar implementations also materialize PAX extended headers as ordinary path entries (e.g. under a PaxHeader/ prefix) instead of merging them into the following entry, which could get swept in the same way.

`RemoteURL`'s `oci://` path  had two gaps that caused real-world OCI
artifacts to fail or get misread:

1. **Gzip-compressed layers weren't decompressed.** A gzip-compressed tar
   fails the tar parse and falls through to the raw-blob branch, so the
   compressed bytes were handed downstream as if they were YAML and died
   with `yaml: control characters are not allowed`.

2. **AppleDouble and PAX header entries weren't filtered.** The extraction
   loop matched any `tar.TypeReg` entry by extension alone. A tar built with
   macOS's default `bsdtar` writes extended-attribute sidecar files like
   `._ns.yaml` next to `ns.yaml`; these match the `.yaml` filter and inject
   binary AppleDouble data into the concatenated manifest. Some tar
   implementations also materialize PAX extended headers as ordinary path
   entries (e.g. under a `PaxHeader/` prefix) instead of merging them into
   the following entry, which could get swept in the same way.
@gianlucam76
gianlucam76 merged commit 9401ba3 into projectsveltos:main Aug 10, 2026
18 of 20 checks passed
@gianlucam76
gianlucam76 deleted the oci branch August 10, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant