Commit Graph

4620 Commits

Author SHA1 Message Date
openshift-merge-bot[bot] f540694315
Merge pull request #6262 from cevich/release-1.29-add_release_test
[release-1.29] Add conditional release-checking system test
2025-07-09 09:40:26 +00:00
Chris Evich 313ada6b7a
[release-1.29] Add conditional release-checking system test
Unfortunately on a number of occasions, Buildah has been released
officially with a `-dev` suffix in the version number.  Assist in
catching this mistake at release time by the addition of a simple
conditional test.  Note that it must be positively enabled by a
magic env. var. before executing the system tests.

Ref: original PR https://github.com/containers/buildah/pull/6243

Signed-off-by: Chris Evich <cevich@redhat.com>
2025-07-02 15:19:14 -04:00
openshift-merge-bot[bot] 4aa392be7f
Merge pull request #6026 from TomSweeneyRedHat/dev/tsweeney/conftest-release-1.29
[release-1.29] tests/conformance/testdata/Dockerfile.add:...
2025-03-04 23:19:48 +00:00
Nalin Dahyabhai e92c524400 [release-1.29] tests/conformance/testdata/Dockerfile.add:...
update some URLs

The origin repository renamed its "master" branch to "main", so we need
to update our references to items in that branch.

[NO NEW TESTS NEEDED]

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-03-04 15:41:20 -05:00
openshift-merge-bot[bot] 13729c2f0f
Merge pull request #5977 from TomSweeneyRedHat/dev/tsweeney/release1.29.5
[release-1.29] Bump to Buildah v1.29.5
2025-02-06 23:30:24 +00:00
tomsweeneyredhat c939b9307c [release-1.29] Bump to Buildah v1.29.5
Bump to Buildah v1.29.5.  This will contain a fix for CVE-2024-11218 and
will be vendored into the Podman 4.4-rhel release branch to address the
issue there for RHEL 8.6, RHEL 9.0, and a variety of OCP versions.

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-02-06 15:29:02 -05:00
openshift-merge-bot[bot] 15a3495f81
Merge pull request #5955 from cevich/cevich-1.29-CVE-2024-11218
[release-1.29] Fix CVE-2024-11218
2025-02-06 18:50:10 +00:00
Nalin Dahyabhai e7420a6bae
Backport testing of CVE-2024-9407 fix
Cherry picked from commit 732f770648

Signed-off-by: Chris Evich <cevich@redhat.com>
2025-02-06 10:38:56 -05:00
Chris Evich 5d78f4db17
Changes based on review feedback
- Fix nits spotted by @TomSweeneyRedHat and @nalind
- Include 2nd component of fix for CVE-2024-9407
  so `GetBindMount()` and `GetCacheMount()` handling
  of bind-propagation flags concurr.

Signed-off-by: Chris Evich <cevich@redhat.com>
2025-02-06 10:33:26 -05:00
Chris Evich bd84c1c801
Disable windows cross-build in CI
At the time of this commit, the Windows cross-build check is failing.
It is believed there is little actual need for this testing, nor support
for buildah as a library on Windows. Disable it.

Signed-off-by: Chris Evich <cevich@redhat.com>
2025-02-06 09:55:39 -05:00
Nalin Dahyabhai d580388018
Fix TOCTOU error when bind and cache mounts use "src" values
Fix a time-of-check/time-of-use error when mounting type=bind and
type=cache directories that use a "src" flag.  A hostile writer could
use a concurrently-running stage or build to replace that "src" location
between the point when we had resolved possible symbolic links and when
runc/crun/whatever actually went to create the bind mount
(CVE-2024-11218).

Stop ignoring the "src" option for cache mounts when there's no "from"
option.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Signed-off-by: Vivek Naruka <vnaruka@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
2025-02-06 09:55:38 -05:00
Nalin Dahyabhai 30ac3fabe8
define.TempDirForURL(): always use an intermediate subdirectory
Ensure that the temporary directory that we create is never itself the
top-level directory of the content that we're downloading, in case it's
an archive which includes a "." with weird permissions.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Signed-off-by: David Shea <dshea@redhat.com>
2025-02-06 09:52:25 -05:00
Nalin Dahyabhai 432cf3cf6b
internal/volume.GetBindMount(): discard writes in bind mounts
When handling RUN --mount=type=bind, where the mount is read-write,
instead of a simple bind mount, create an overlay mount with an upper
directory that will be discarded after the overlay mount is unmounted.
This brings us in line with the expected behavior, wherein writes to
bind mounts should be discarded.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Signed-off-by: Vivek Naruka <vnaruka@redhat.com>
2025-02-06 09:52:24 -05:00
Nalin Dahyabhai b9b2969bb6
pkg/overlay: add a MountLabel flag to Options
Add a way to pass a "set the SELinux contexts" labels to
MountWithOptions.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Signed-off-by: David Shea <dshea@redhat.com>
Signed-off-by: Vivek Naruka <vnaruka@redhat.com>
2025-02-06 09:52:23 -05:00
Nalin Dahyabhai 6015a6929c
pkg/overlay: add a ForceMount flag to Options
Add a ForceMount flag to pkg/overlay.Options that forces mounting the
overlay filesystem and returning a bind mount to it instead of trying to
leave that for later in cases where we're able to have the kernel do it.

This is mainly for the sake of callers that want to do more things with
the mounted overlay filesystem before passing them to the (presumably)
OCI runtime.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Signed-off-by: David Shea <dshea@redhat.com>
2025-02-06 09:52:22 -05:00
Nalin Dahyabhai 643538e463
Add internal/volumes.bindFromChroot()
Add a helper that uses the new internal/open package to bind mount a
location inside of a chroot direct to a new temporary location, for
ensuring that the latter is not bind-mounted from outside of the chroot.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-02-06 09:52:21 -05:00
Nalin Dahyabhai c6d1064cee
Add an internal/open package
Add a package that lets us open a directory in a chroot, pass its
descriptor up, and then bind mount that directory to a specified
location.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-02-06 09:52:20 -05:00
Nalin Dahyabhai 250174ede2
Allow cache mounts to be stages or additional build contexts
Allow cache mounts (RUN --mount=type=cache) to refer to other stages or
additional build contexts.

Update the build-check-cve-2024-9675 integration test to use different
directories for its main build context and the additional build context
that it uses for its final run.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Signed-off-by: David Shea <dshea@redhat.com>
Signed-off-by: Vivek Naruka <vnaruka@redhat.com>
2025-02-06 09:45:40 -05:00
openshift-merge-bot[bot] b294434927
Merge pull request #5787 from dashea/1.29-cve-2024-9675
[release-1.29] Properly validate cache IDs and sources
2024-10-18 14:03:00 +00:00
David Shea 0175881927 [release-1.29] Bump to v1.29.4
Signed-off-by: David Shea <dshea@redhat.com>
2024-10-17 14:53:22 -04:00
Matt Heon a5e489351f Properly validate cache IDs and sources
The `--mount type=cache` argument to the `RUN` instruction in
Dockerfiles was using `filepath.Join` on user input, allowing
crafted paths to be used to gain access to paths on the host,
when the command should normally be limited only to Buildah;s own
cache and context directories. Switch to `filepath.SecureJoin` to
resolve the issue.

Fixes CVE-2024-9675

Signed-off-by: Matt Heon <mheon@redhat.com>
Signed-off-by: David Shea <dshea@redhat.com>
2024-10-17 14:49:38 -04:00
openshift-merge-bot[bot] 28a3bb1e57
Merge pull request #5434 from TomSweeneyRedHat/dev/tsweeney/cve-1.29-2
[release-1.29] bump to v1.29.3, fix conformance, CVE-2024-1753, CVE-2024-24786
2024-03-27 17:34:31 +00:00
tomsweeneyredhat 79aede6205 [release-1.29] Bump to v1.29.3
As the title says.

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-03-26 16:37:56 -04:00
tomsweeneyredhat 51859ab02d [release-1.29] Bump google.golang.org/protobuf to v1.33.0
Bump protobuf to address CVE-2024-24786

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-03-26 16:34:10 -04:00
Nalin Dahyabhai 1ada2013f2 [release-1.29] conformance tests: don't break on trailing zeroes
When analyzing a layer blob's contents, don't break if the blob has more
zeroes padding it out even after the tar reader thinks it's hit the end
of the archive.

Add more detail to the diagnostic error we print when there's a digest
or length mismatch, too, in case it's triggered by something other than
zero padding.

Don't ignore errors which might be encountered when we try to use skopeo
to copy an image to a directory.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-03-26 16:03:02 -04:00
tomsweeneyredhat f29043c5c7 [release-1.29] CVE-2024-1753 container escape fix
Addresses CVE-2024-1753 which allowed a user to write files to the
`/` directory of the host machine if selinux was not enabled.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-03-26 15:56:04 -04:00
openshift-merge-bot[bot] 3977093ac0
Merge pull request #5244 from lsm5/release-1.29-crypto-bump
[release-1.29] bump golang.org/x/crypto to v0.17.0
2024-01-15 18:22:14 +00:00
Lokesh Mandvekar f7279cb09c
bump golang.org/x/crypto to v0.17.0
Manual bump because of failed automated cherrypick of #5232.

Fixes: GHSA-45x7-px36-x8w8 CVE-2023-48795

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-01-15 18:33:28 +05:30
openshift-merge-bot[bot] aa7cc2e4e9
Merge pull request #5257 from nalind/conformance-bit-masking-1.29
[release-1.29] conformance test: ignore file type bits when comparing layers
2024-01-10 15:31:31 +00:00
Nalin Dahyabhai 32ebf99436 conformance test: ignore file type bits when comparing layers
When comparing layer payloads during conformance tests, mask off any
file type bits that the tar headers in the layers might have included.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-01-09 16:49:23 -05:00
openshift-ci[bot] d79c93bec0
Merge pull request #5121 from nalind/v1.29.2
[release-1.29] bump version to v1.29.2
2023-10-31 16:45:42 +00:00
Nalin Dahyabhai b98e39b006 Bump version to v1.29.2
[NO NEW TESTS NEEDED]

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2023-10-31 09:30:28 -04:00
openshift-ci[bot] b0c73eca95
Merge pull request #5118 from openshift-cherrypick-robot/cherry-pick-5116-to-release-1.29
[release-1.29] Mask /sys/devices/virtual/powercap by default
2023-10-31 07:55:48 +00:00
Matt Heon 971c368baf Mask /sys/devices/virtual/powercap by default
This mimics #5111 but without the vendor update, which is very
large on this branch.

[NO NEW TESTS NEEDED] This cannot be tested in CI as cloud
providers already don't provide these interfaces in their VMs.

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-10-30 20:53:25 +00:00
OpenShift Merge Robot a5f0750915
Merge pull request #4825 from edsantiago/excise-centos-registry-1.29
[release-1.29] remove registry.centos.org
2023-05-30 13:55:38 -04:00
Aditya R a16485c274 [release-1.29] remove registry.centos.org
registry.centos.org is now decommissioned

Ref: https://lists.centos.org/pipermail/centos-devel/2023-May/142956.html

Cherry-pick of #4819, with one minor conflict

Signed-off-by: Aditya R <arajan@redhat.com>
Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-30 08:03:22 -06:00
OpenShift Merge Robot 0dd218781c
Merge pull request #4808 from cevich/release-1.29_increase_timeout
[release-1.29] Cirrus: Increase conformance-test timeout
2023-05-20 06:15:32 -04:00
Chris Evich bc84394586
Cirrus: Increase conformance-test timeout
The overlay 'flavor' of this task seems to complete successfully in
about 22 minutes.  This is aweful close to the task-timeout, and
certainly for the slower 'VFS' flavor of the task.  Increase the task
timeout to 30 minutes.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-05-19 11:02:42 -04:00
OpenShift Merge Robot f01e5f9500
Merge pull request #4771 from cevich/release-1.29_ci_support_self-destruct
[release-1.29] Cirrus: Add CI self-destruct condition on EOL date
2023-05-02 19:21:37 -04:00
Chris Evich 4af264ee88
Cirrus: Add CI self-destruct condition on EOL date
This branch will never receive any security-backports when the
associated RHEL release reaches EOL.  Add a condition to force CI to
break with a helpful message, after this RHEL EOL date.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-05-02 15:46:45 -04:00
OpenShift Merge Robot f07d2c9c09
Merge pull request #4701 from TomSweeneyRedHat/dev/tsweeney/common0512_1.29
[release-1.29] Bump to c/common v0.51.2
2023-04-02 19:23:56 -04:00
tomsweeneyredhat 464edac10b [release-1.29] Bump to c/common v0.51.2
Bump to containers/common v0.51.2.  This addresses:
https://bugzilla.redhat.com/show_bug.cgi?id=2178263

[NO NEW TESTS NEEDED]
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2023-04-01 20:00:12 -04:00
OpenShift Merge Robot 7fa17a8428
Merge pull request #4597 from TomSweeneyRedHat/dev/tsweeney/cimagebump_1.29
[release-1.29] Bump to Buildah v1.29.1
2023-02-16 00:10:45 -05:00
tomsweeneyredhat faf0d4fcba [release-1.29] Bump to Buildah v1.29.1
As the title says.  In preparation for RHEL 8.8/9.2

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2023-02-15 16:11:40 -05:00
OpenShift Merge Robot c822cc6afa
Merge pull request #4574 from mtrmac/c-image-eof-1.29
[release-1.29] Update to c/image 5.24.1
2023-02-09 19:47:59 -05:00
Miloslav Trmač 7d5ff30123 Update to c/image 5.24.1
... to include an unexpected EOF workaround.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-02-09 21:16:44 +01:00
tomsweeneyredhat 94b723cb5b Bump to v1.29.0
As the title says.

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2023-01-25 18:22:54 -05:00
Daniel J Walsh 9133547b7b
Merge pull request #4539 from containers/dependabot/go_modules/github.com/onsi/gomega-1.26.0
build(deps): bump github.com/onsi/gomega from 1.25.0 to 1.26.0
2023-01-25 08:24:26 -05:00
Daniel J Walsh 68d3b0ab76
Merge pull request #4531 from sstosh/test-proxy
tests: improve build-with-network-test
2023-01-25 08:24:05 -05:00
Toshiki Sonoda c9cbc6d7d2 tests: improve build-with-network-test
This test could be failed when we enable firewall.
To reduce the impact of firewall, we use "curl".

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2023-01-25 16:20:09 +09:00