Commit Graph

8073 Commits

Author SHA1 Message Date
lfbzhm da3d022b06 Merge pull request #5319 from cyphar/changelog-forward-port
CHANGELOG: forward-port v1.3.6 / v1.4.3 / v1.5.0-rc.3 releases
2026-06-15 17:42:22 +08:00
Rodrigo Campos Catelin 49551071ea Merge pull request #5321 from opencontainers/dependabot/go_modules/github.com/urfave/cli/v3-3.10.0
build(deps): bump github.com/urfave/cli/v3 from 3.9.1 to 3.10.0
2026-06-15 11:32:30 +02:00
dependabot[bot] 8c112e2f63 build(deps): bump github.com/urfave/cli/v3 from 3.9.1 to 3.10.0
Bumps [github.com/urfave/cli/v3](https://github.com/urfave/cli) from 3.9.1 to 3.10.0.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v3.9.1...v3.10.0)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v3
  dependency-version: 3.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-15 04:52:27 +00:00
Aleksa Sarai f71b58d827 CHANGELOG: forward-port v1.3.6 / v1.4.3 / v1.5.0-rc.3 releases
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2026-06-13 19:56:56 +02:00
Aleksa Sarai 122fb7a642 merge CVE-2026-41579 fixes into runc:main
Aleksa Sarai (3):
  rootfs: make cgroupv1 subsystem symlinks fd-based
  rootfs: make /dev initialisation code fd-based
  rootfs: switch createDevices argument order

LGTMs: lifubang kolyshkin rata
2026-06-13 14:27:57 +02:00
Aleksa Sarai 66acd48f9d rootfs: make cgroupv1 subsystem symlinks fd-based
As with /dev symlinks, this was missed in commit d40b3439a9 ("rootfs:
switch to fd-based handling of mountpoint targets"). It's not really
clear to what extent this was exploitable (/sys/fs/cgroup is a tmpfs we
create) but it's better to just fix this anyway.

Fixes: d40b3439a9 ("rootfs: switch to fd-based handling of mountpoint targets")
Signed-off-by: Aleksa Sarai <aleksa@amutable.com>
2026-06-13 00:26:52 +02:00
Aleksa Sarai 864db8042d rootfs: make /dev initialisation code fd-based
These codepaths are very old and operate on pure paths but before
pivot_root(2), meaning that a bad image with a malicious /dev symlink
could cause us to operate on host paths instead.

In practice this means that we could be tricked into removing a file
called "ptmx" (note that /dev/pts/ptmx and /dev/ptmx are both immune for
different reasons) or creating a very restricted set of symlinks (with
fixed targets and names). The scope of these bugs is thus quite limited,
but we definitely need to harden against it.

These codepaths were unfortunately missed during the fd-based rework in
commit d40b3439a9 ("rootfs: switch to fd-based handling of mountpoint
targets") -- I must've assumed they were called after pivot_root(2)...

Fixes: GHSA-xjvp-4fhw-gc47
Fixes: CVE-2026-41579
Fixes: d40b3439a9 ("rootfs: switch to fd-based handling of mountpoint targets")
Signed-off-by: Aleksa Sarai <aleksa@amutable.com>
2026-06-12 18:12:37 +02:00
Aleksa Sarai fcf04eb41b rootfs: switch createDevices argument order
This argument order matches most other helpers we have and will also
match the changes we are about to make to setupPtmx and
setupDevSymlinks.

Signed-off-by: Aleksa Sarai <aleksa@amutable.com>
2026-06-12 18:12:37 +02:00
lfbzhm 20628648e0 Merge pull request #5316 from opencontainers/dependabot/go_modules/github.com/urfave/cli/v3-3.9.1
build(deps): bump github.com/urfave/cli/v3 from 3.9.0 to 3.9.1
2026-06-11 18:28:38 +08:00
dependabot[bot] 7e988a0279 build(deps): bump github.com/urfave/cli/v3 from 3.9.0 to 3.9.1
Bumps [github.com/urfave/cli/v3](https://github.com/urfave/cli) from 3.9.0 to 3.9.1.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v3.9.0...v3.9.1)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v3
  dependency-version: 3.9.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-11 10:16:36 +00:00
lfbzhm ba09e7ff06 Merge pull request #5315 from opencontainers/dependabot/go_modules/golang.org/x/net-0.56.0
build(deps): bump golang.org/x/net from 0.55.0 to 0.56.0
2026-06-11 18:14:44 +08:00
dependabot[bot] e6e4767529 build(deps): bump golang.org/x/net from 0.55.0 to 0.56.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.55.0 to 0.56.0.
- [Commits](https://github.com/golang/net/compare/v0.55.0...v0.56.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.56.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-11 04:52:27 +00:00
Kir Kolyshkin 27354cd3d8 Merge pull request #5314 from opencontainers/dependabot/go_modules/golang.org/x/sys-0.46.0
build(deps): bump golang.org/x/sys from 0.45.0 to 0.46.0
2026-06-09 11:02:07 -07:00
dependabot[bot] 5198de1cfb build(deps): bump golang.org/x/sys from 0.45.0 to 0.46.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.45.0 to 0.46.0.
- [Commits](https://github.com/golang/sys/compare/v0.45.0...v0.46.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-version: 0.46.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-09 04:52:30 +00:00
Rodrigo Campos Catelin a7e766484c Merge pull request #5311 from opencontainers/dependabot/go_modules/github.com/opencontainers/selinux-1.15.1
build(deps): bump github.com/opencontainers/selinux from 1.14.1 to 1.15.1
2026-06-05 11:27:59 +02:00
Rodrigo Campos Catelin 0f0ca6dd24 Merge pull request #5313 from kolyshkin/go-criu-v8
deps: bump go-criu to v8.2.0
2026-06-05 11:04:09 +02:00
Kir Kolyshkin 269405107f deps: bump go-criu to v8.2.0
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2026-06-04 10:48:15 -07:00
dependabot[bot] 9ffc42622a build(deps): bump github.com/opencontainers/selinux
Bumps [github.com/opencontainers/selinux](https://github.com/opencontainers/selinux) from 1.14.1 to 1.15.1.
- [Release notes](https://github.com/opencontainers/selinux/releases)
- [Commits](https://github.com/opencontainers/selinux/compare/v1.14.1...v1.15.1)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/selinux
  dependency-version: 1.15.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-03 22:17:11 +00:00
Akihiro Suda 3047d61ff9 Merge pull request #5302 from pstoeckle/main
chore: fix some typos in comments
2026-05-28 13:51:25 +09:00
Patrick Stoeckle e44aa440d9 chore: fix some typos in comments
Signed-off-by: Patrick Stoeckle <patrick.stoeckle@siemens.com>
2026-05-27 13:49:23 +02:00
Rodrigo Campos Catelin 3cb21b9246 Merge pull request #5295 from ricardobranco777/busybox138
Update `busybox:glibc` in integration tests to latest (1.38.0) builds
2026-05-27 09:02:58 +02:00
Ricardo Branco c7c2920db0 Update busybox:glibc in integration tests to latest (1.38.0) builds
This release fixes tests on ppc64le in busybox commit 3621595939e43:
"nsenter,unshare: don't use xvfork_parent_waits_and_exits(), it SEGVs
on ppc64le".

Fixes: https://github.com/opencontainers/runc/issues/4836

Signed-off-by: Ricardo Branco <rbranco@suse.de>
2026-05-26 17:38:12 +02:00
Rodrigo Campos Catelin a271890df2 Merge pull request #5297 from kolyshkin/fix-5203
runc list: fix error reporting for non-existent root
2026-05-26 17:18:47 +02:00
Ricardo Branco de39d5e79b tests/int: relax testPids fork error match string
The test checked for the exact BusyBox ash diagnostic "sh: can't fork".
With BusyBox 1.38, ash reports the failure as:

  /bin/sh: line 0: can't fork: Resource temporarily unavailable

Match the stable "can't fork" part of the error message instead.

Signed-off-by: Ricardo Branco <rbranco@suse.de>
2026-05-25 21:52:19 +02:00
Ricardo Branco 3acb097f93 tests/int: build TestPids pipelines programmatically
TestPids used long hand-written /bin/true pipelines for the 4-, 32- and
64-command cases. This made the test easy to typo and hard to review, as
seen by the earlier "bin/true" entries.

Build the shell pipelines instead, preserving the existing test coverage
while making the command counts explicit.

Signed-off-by: Ricardo Branco <rbranco@suse.de>
2026-05-25 21:52:19 +02:00
Kir Kolyshkin 98c442a0e6 runc list: fix error reporting for non-existent root
The idea of commit d1fca8e was right (report errors for non-existent
root, unless using the default root dir) but the logic was inverted.

Fix the logic.

Test case for default root requires non-existent /root/runc, which is
not always possible.

Reported-by: RedMakeUp <girafeeblue@gmail.com>
Co-authored-by: RedMakeUp <girafeeblue@gmail.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2026-05-22 17:31:42 -07:00
Rodrigo Campos Catelin d0aeb9e3e2 Merge pull request #5292 from opencontainers/dependabot/go_modules/golang.org/x/net-0.55.0
build(deps): bump golang.org/x/net from 0.54.0 to 0.55.0
2026-05-22 10:24:32 +02:00
dependabot[bot] 3003d0163c build(deps): bump golang.org/x/net from 0.54.0 to 0.55.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.54.0 to 0.55.0.
- [Commits](https://github.com/golang/net/compare/v0.54.0...v0.55.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.55.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-22 04:52:43 +00:00
Kir Kolyshkin 3e802d13d7 Merge pull request #5184 from lifubang/use-urfave-cli-v3
chore(deps): upgrade urfave/cli from v1 to v3
2026-05-19 22:40:02 -07:00
lifubang 098a2b4f49 remove urfave_cli_no_docs from build tags
After migrate from urfave/cli v1 (maintenance mode) to v3,
we don't need this build tag anymore.

Signed-off-by: lifubang <lifubang@acmcoder.com>
2026-05-20 05:26:57 +00:00
lifubang 57fad01d52 chore(deps): upgrade urfave/cli from v1 to v3
Migrate from urfave/cli v1 (maintenance mode) to v3 to benefit from
active development, improved features, and long-term support.

Signed-off-by: lifubang <lifubang@acmcoder.com>
2026-05-20 05:26:51 +00:00
Kir Kolyshkin 84762a5c1a Merge pull request #5285 from lifubang/followup-5275-maskpath
libct: Clean up and refactor maskPaths logic
2026-05-18 11:13:16 -07:00
lfbzhm 544621ae88 Merge pull request #5261 from kolyshkin/aa
Use sync.OnceFunc, sync.OnceValue[s]
2026-05-18 20:19:44 +08:00
lfbzhm e7b5943642 Merge pull request #5269 from kolyshkin/fix-5264
tests/int: fix flake in "resources.unified override"
2026-05-18 20:17:53 +08:00
lifubang b88635e57e libct: close rootFd ASAP in maskPaths
Close the root file descriptor immediately after use in maskPaths to
reduce the window during which an attacker could potentially exploit
an open fd to access or manipulate the root filesystem. This follows
the principle of least privilege and mitigates risks in compromised
or malicious container scenarios.

Co-authored-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: lifubang <lifubang@acmcoder.com>
2026-05-17 02:26:10 +00:00
lifubang e7e2f00248 libct: optimize maskPaths for single-directory case
This is a follow-up to #5275. That change reused a single tmpfs mount
to mask multiple directories, which is efficient when masking more than
one path. However, it introduced unnecessary overhead when only one
directory is masked. This commit restores the original behavior for the
single-path case while preserving shared tmpfs logic for multiple paths.

Signed-off-by: lifubang <lifubang@acmcoder.com>
2026-05-16 05:50:01 +00:00
Kir Kolyshkin 16dde3befc libct/intelrdt: use sync.OnceFunc and sync.OnceValues
Switch from sync.Once to sync.OnceFunc and sync.OnceValues.

Keep Root a function (rather than a variable) because godoc
renders function doc better than a variable doc.

Switch to using internal function root internally.

Modify tests accordingly (and simplify NewIntelRdtTestUtil to
fakeRoot).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2026-05-15 17:14:15 -07:00
Kir Kolyshkin 2d2ae8809c libct/configs/validate: simplify intelrtd tests
The whole struct intelRdtStatus with its methods and a sync.Once is not
needed, since intelrtd.Is*Enabled methods are already run-once (or use
run-once and a simple comparison).

Yet it is still needed for the test to fake values returned by *Enabled.

Simplify to use func pointers which a test case overwrites.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2026-05-15 17:14:15 -07:00
Kir Kolyshkin 5cd0cb6d51 libct/intelrdt: remove newManager
It is not doing anything, and tests can just instantiate the &Manager{}.

Suggested-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2026-05-15 17:14:15 -07:00
Kir Kolyshkin 48c7e83b91 libcontainer/configs/validate: use early return
...in intelrdtCheck, like all other checks already do.

Best reviewed with --ignore-all-space.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2026-05-15 17:14:15 -07:00
Kir Kolyshkin 8d1ebab374 libct/utils: use sync.OnceValue
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2026-05-15 17:14:15 -07:00
Kir Kolyshkin 2ae07a45d6 libct/apparmor: simplify isEnabled
1. Use sync.OnceValue.

2. Fix the len(buf) check -- we only need 1 byte. Real kernel output
   is "Y\n" so practically this change is a no-op.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2026-05-15 17:14:15 -07:00
Kir Kolyshkin 3fabb4d070 tests/int: fix flake in "resources.unified override"
As runc binary grows in size over time (new features, more
dependencies) some tests start to flake because of low memory limits.

One such test is "runc run (cgroup v2 resources.unified override)";
it obviously fails because of 1M memory limit:

> runc run failed: unable to start container process: container init was OOM-killed (memory limit too low?)

Increase the limits 4x. Do the same for the "unified only" test.

Fixes issue 5264.

Reported-by: Kevin Berry <kpberry11@gmail.com>
Reported-by: Ricardo Branco <rbranco@suse.de>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2026-05-13 11:16:08 -07:00
Kir Kolyshkin 95998b8a7f Merge pull request #5278 from opencontainers/dependabot/go_modules/github.com/opencontainers/selinux-1.14.1
build(deps): bump github.com/opencontainers/selinux from 1.13.1 to 1.14.1
2026-05-13 11:10:22 -07:00
lfbzhm df814a1d56 Merge pull request #5274 from opencontainers/dependabot/go_modules/golang.org/x/net-0.54.0
build(deps): bump golang.org/x/net from 0.53.0 to 0.54.0
2026-05-13 22:44:39 +08:00
dependabot[bot] 7fe4e42686 build(deps): bump golang.org/x/net from 0.53.0 to 0.54.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.53.0 to 0.54.0.
- [Commits](https://github.com/golang/net/compare/v0.53.0...v0.54.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.54.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-13 14:31:11 +00:00
lfbzhm 4d18d6f09e Merge pull request #5273 from opencontainers/dependabot/go_modules/golang.org/x/sys-0.44.0
build(deps): bump golang.org/x/sys from 0.43.0 to 0.44.0
2026-05-13 22:25:54 +08:00
dependabot[bot] a8c5fcbc7e build(deps): bump github.com/opencontainers/selinux
Bumps [github.com/opencontainers/selinux](https://github.com/opencontainers/selinux) from 1.13.1 to 1.14.1.
- [Release notes](https://github.com/opencontainers/selinux/releases)
- [Commits](https://github.com/opencontainers/selinux/compare/v1.13.1...v1.14.1)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/selinux
  dependency-version: 1.14.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-13 21:31:07 +08:00
dependabot[bot] 22986abb5f build(deps): bump golang.org/x/sys from 0.43.0 to 0.44.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.43.0 to 0.44.0.
- [Commits](https://github.com/golang/sys/compare/v0.43.0...v0.44.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-version: 0.44.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-13 21:29:34 +08:00
Sebastiaan van Stijn 5847157c82 Merge pull request #5275 from lifubang/maskdir-with-shared-tmpfs
[Carry #5262] libct: reuse tmpfs for directory masks
2026-05-13 09:37:43 +02:00