Skip to content

[release/2.0] Prevent panic on zero length push#11698

Merged
dmcgowan merged 1 commit intocontainerd:release/2.0from
k8s-infra-cherrypick-robot:cherry-pick-11670-to-release/2.0
Apr 16, 2025
Merged

[release/2.0] Prevent panic on zero length push#11698
dmcgowan merged 1 commit intocontainerd:release/2.0from
k8s-infra-cherrypick-robot:cherry-pick-11670-to-release/2.0

Conversation

@k8s-infra-cherrypick-robot

This is an automated cherry-pick of #11670

/assign dmcgowan

Prevent a panic in the Docker pusher pushWriter, by checking that
the pipe is non nil before attempting to use it.

The panic was found by Moby issue #46746 (moby/moby#46746).
With this fix the panic no longer reproduces.

Signed-off-by: Cesar Talledo <cesar.talledo@docker.com>
@k8s-ci-robot
Copy link

Hi @k8s-infra-cherrypick-robot. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@dmcgowan dmcgowan moved this from Needs Triage to Review In Progress in Pull Request Review Apr 14, 2025
@dmcgowan dmcgowan changed the title [release/2.0] Prevent panic in Docker pusher. [release/2.0] Prevent panic on zero length push Apr 15, 2025
@dmcgowan dmcgowan merged commit ea7be04 into containerd:release/2.0 Apr 16, 2025
54 of 56 checks passed
@github-project-automation github-project-automation bot moved this from Review In Progress to Done in Pull Request Review Apr 16, 2025
@dmcgowan dmcgowan added the area/distribution Image Distribution label Apr 17, 2025
Mengkzhaoyun pushed a commit to open-beagle/containerd that referenced this pull request Jun 12, 2025
containerd 2.0.5

Welcome to the v2.0.5 release of containerd!

The fifth patch release for containerd 2.0 includes various bug fixes and updates.

* Update go to 1.23.8 ([#11717](containerd/containerd#11717))

* Update ImageService to delete images synchronously ([#11599](containerd/containerd#11599))

* Prevent panic on zero length push ([#11698](containerd/containerd#11698))
* Set default differ for the default unpack config of transfer service ([#11688](containerd/containerd#11688))

* Remove invalid error log when stopping container after containerd restart ([#11621](containerd/containerd#11621))
* Update taskOptions based on runtimeOptions when creating a task ([#11618](containerd/containerd#11618))

Please try out the release binaries and report any issues at
https://github.com/containerd/containerd/issues.

* Akihiro Suda
* Akhil Mohan
* Derek McGowan
* Phil Estes
* Wei Fu
* Iceber Gu
* Austin Vazquez
* Maksym Pavlenko
* Cesar Talledo
* Henry Wang
* Jin Dong
* Krisztian Litkey
* Yang Yang
<details><summary>33 commits</summary>
<p>

* Update go to 1.23.8 ([#11717](containerd/containerd#11717))
  * [`5bcf0a95e`](containerd/containerd@5bcf0a9) use go1.23.8 as the default go version
  * [`4838f33f7`](containerd/containerd@4838f33) update to go 1.24.2, 1.23.8
* Prepare release notes for v2.0.5 ([#11713](containerd/containerd#11713))
  * [`a8082cd60`](containerd/containerd@a8082cd) Prepare release notes for v2.0.5
* Disable criu test on arm64 ([#11710](containerd/containerd#11710))
  * [`58b715ad8`](containerd/containerd@58b715a) Disable arm64 criu testing in GH Actions
  * [`b4a53e826`](containerd/containerd@b4a53e8) disable portmap test in ubuntu-22 to make CI happy
  * [`4bcf472de`](containerd/containerd@4bcf472) add option to skip tests in critest
* Prevent panic on zero length push ([#11698](containerd/containerd#11698))
  * [`8a638b71a`](containerd/containerd@8a638b7) Prevent panic in Docker pusher.
* Set default differ for the default unpack config of transfer service ([#11688](containerd/containerd#11688))
  * [`84d9658c3`](containerd/containerd@84d9658) Set default differ for the default unpack config of transfer service
* ci: update GitHub Actions release runner to ubuntu-24.04 ([#11703](containerd/containerd#11703))
  * [`b184a97d3`](containerd/containerd@b184a97) ci: update GitHub Actions release runner to ubuntu-24.04
* Remove invalid error log when stopping container after containerd restart ([#11621](containerd/containerd#11621))
  * [`e04543db0`](containerd/containerd@e04543d) use shimCtx for fifo copy
* Update taskOptions based on runtimeOptions when creating a task ([#11618](containerd/containerd#11618))
  * [`9f46e7a44`](containerd/containerd@9f46e7a) integration/client: add tests for TaskOptions is not empty
  * [`8a16a6a04`](containerd/containerd@8a16a6a) prefer task options for PluginInfo request
  * [`a183b2d23`](containerd/containerd@a183b2d) update taskOptions based on runtimeOptions when creating a task
* Update ImageService to delete images synchronously ([#11599](containerd/containerd#11599))
  * [`091143135`](containerd/containerd@0911431) *: CRIImageService should delete image synchronously
* Update runc binary to v1.2.6 ([#11583](containerd/containerd#11583))
  * [`c2372c072`](containerd/containerd@c2372c0) Update runc binary to v1.2.6
* go.{mod,sum}: bump CDI deps to stable v1.0.0. ([#11566](containerd/containerd#11566))
  * [`e8506511b`](containerd/containerd@e850651) go.{mod,sum}: bump CDI deps to stable v1.0.0.
* silence govulncheck false positives ([#11571](containerd/containerd#11571))
  * [`4cfb89430`](containerd/containerd@4cfb894) go.mod: github.com/go-jose/go-jose/v4
  * [`2b9e6a29d`](containerd/containerd@2b9e6a2) go.mod: golang.org/x/oauth2 v0.28.0
  * [`6df1ea0d9`](containerd/containerd@6df1ea0) go.mod: golang.org/x/net v0.37.0
* Fix CI lint error (cherry-picked #11555) ([#11567](containerd/containerd#11567))
  * [`16f20abdf`](containerd/containerd@16f20ab) Fix CI lint error
</p>
</details>

* **github.com/go-jose/go-jose/v4**                     v4.0.4 -> v4.0.5
* **golang.org/x/crypto**                               v0.31.0 -> v0.36.0
* **golang.org/x/net**                                  v0.33.0 -> v0.37.0
* **golang.org/x/oauth2**                               v0.23.0 -> v0.28.0
* **golang.org/x/sync**                                 v0.10.0 -> v0.12.0
* **golang.org/x/sys**                                  v0.28.0 -> v0.31.0
* **golang.org/x/term**                                 v0.27.0 -> v0.30.0
* **golang.org/x/text**                                 v0.21.0 -> v0.23.0
* **tags.cncf.io/container-device-interface**           v0.8.1 -> v1.0.0
* **tags.cncf.io/container-device-interface/specs-go**  v0.8.0 -> v1.0.0

Previous release can be found at [v2.0.4](https://github.com/containerd/containerd/releases/tag/v2.0.4)
* `containerd-<VERSION>-<OS>-<ARCH>.tar.gz`:         ✅Recommended. Dynamically linked with glibc 2.31 (Ubuntu 20.04).
* `containerd-static-<VERSION>-<OS>-<ARCH>.tar.gz`:  Statically linked. Expected to be used on non-glibc Linux distributions. Not position-independent.

In addition to containerd, typically you will have to install [runc](https://github.com/opencontainers/runc/releases)
and [CNI plugins](https://github.com/containernetworking/plugins/releases) from their official sites too.

See also the [Getting Started](https://github.com/containerd/containerd/blob/main/docs/getting-started.md) documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants