Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bitnami/wordpress] opencontainers runc upgrade (CVE-2022-29162) #7419

Closed
tsands2 opened this issue Sep 22, 2022 · 13 comments
Closed

[bitnami/wordpress] opencontainers runc upgrade (CVE-2022-29162) #7419

tsands2 opened this issue Sep 22, 2022 · 13 comments
Assignees
Labels
feature-request solved stale 15 days without activity triage Triage is needed wordpress

Comments

@tsands2
Copy link

tsands2 commented Sep 22, 2022

Name and Version

bitnami/wordpress:6.0.2-debian-11-r8

What is the problem this feature will solve?

We are getting vulnerability reports when scanning images built with this image for opencontainers/runc. The specific details are:

Security update has been released for github.com/opencontainers/runc to fix the vulnerability.

The patch for this is d72d057ba794164c3cce9451a00b72a78b25e1ae and runc 1.0.3 was released with this bug fixed.Workaround: To the extent this is exploitable, disallowing untrusted namespace paths in container configuration should eliminate all practical ways of exploiting this bug. It should be noted that untrusted namespace paths would allow the attacker to disable namespace protections entirely even in the absence of this bug.

Patch:
Following are links for downloading patches to fix the vulnerabilities: GHSA-v95c-p5hm-xq8f

What is the feature you are proposing to solve the problem?

I believe this would be foundational to all images - not just the wordpress one I am using.

What alternatives have you considered?

None.

@bitnami-bot bitnami-bot added this to Triage in Support Sep 22, 2022
@github-actions github-actions bot added the triage Triage is needed label Sep 22, 2022
@javsalgar javsalgar changed the title opencontainers runc upgrade [bitnami/wordpress] opencontainers runc upgrade Sep 23, 2022
@javsalgar
Copy link
Contributor

Hi,

Thank you so much for creating the issue. There is something that I don't fully understand. If the issue is in runc itself, then updating runc should fix the issue, right? It's more about the engine that runs the container that the container itself, is that correct?

@github-actions github-actions bot moved this from Triage to Pending in Support Sep 23, 2022
@tsands2
Copy link
Author

tsands2 commented Sep 23, 2022

In general that is correct. But, this vulnerability is seen when the image itself is scanned - not when it is running in a container. I hoped someone on this team would know how that may be possible. I also ran the image using docker and logged into the container to try and find a runc binary but couldn't locate it on the container. So, I wasn't sure how the scan was picking it up.

@bitnami-bot bitnami-bot moved this from Pending to Triage in Support Sep 23, 2022
@javsalgar
Copy link
Contributor

Which is the scanner you are using to see this vulnerability?

@github-actions github-actions bot moved this from Triage to Pending in Support Sep 27, 2022
@github-actions
Copy link

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@github-actions github-actions bot added the stale 15 days without activity label Oct 13, 2022
@tsands2
Copy link
Author

tsands2 commented Oct 13, 2022

It is the Azure Cloud Defender service that scans our container registries where we deploy our images based on this image.

@bitnami-bot bitnami-bot moved this from Pending to Triage in Support Oct 13, 2022
@recena
Copy link
Contributor

recena commented Oct 13, 2022

@tsands2 Could you add the CVE identifier to the issue description?

@github-actions github-actions bot moved this from Triage to Pending in Support Oct 13, 2022
@pablogalegoc
Copy link
Contributor

pablogalegoc commented Oct 13, 2022

Hey @tsands2!

CVE-2021-43784 comes from gosu, which we use here:

# Run as web server user to avoid having to change permissions/ownership afterwards
if am_i_root; then
gosu "$WEB_SERVER_DAEMON_USER" "${env[@]}" "${cmd[@]}"

The severity of the vulnerability is medium and gosu hasn't released a new version fixing it. It is one of the packages that we automatically track, so once there is a new version, we will use it:
"gosu-1.14.0-155-linux-${OS_ARCH}-debian-11" \

@recena
Copy link
Contributor

recena commented Oct 13, 2022

More information from the upstream project about CVEs and false-positives.

@github-actions github-actions bot removed the stale 15 days without activity label Oct 14, 2022
This was referenced Oct 14, 2022
@github-actions
Copy link

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@github-actions github-actions bot added the stale 15 days without activity label Oct 30, 2022
@github-actions
Copy link

github-actions bot commented Nov 4, 2022

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

@github-actions github-actions bot added the solved label Nov 4, 2022
@bitnami-bot bitnami-bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2022
@bitnami-bot bitnami-bot moved this from Pending to Solved in Support Nov 4, 2022
@IAbuElRuzz
Copy link

IAbuElRuzz commented Dec 7, 2022

Aqua Scanner and Trivy(cli tool) both from aquasec.com flag runc as vulnerable.
This occurs with any image using runc with version v1.0.1 (CVE-2022-29162).
Should be fixed with runc v1.1.2 (https://avd.aquasec.com/nvd/cve-2022-29162)

More details here:
https://nvd.nist.gov/vuln/detail/CVE-2022-29162

@IAbuElRuzz
Copy link

@tsands2 Could you add the CVE identifier to the issue description?
This is the CVE-2022-29162
https://nvd.nist.gov/vuln/detail/CVE-2022-29162

@tsands2 tsands2 changed the title [bitnami/wordpress] opencontainers runc upgrade [bitnami/wordpress] opencontainers runc upgrade (CVE-2022-29162) Dec 7, 2022
@fmulero fmulero removed this from Solved in Support Jan 25, 2023
@carrodher
Copy link
Member

Hi, we are glad to announce that we got rid of gosu in all Bitnami container images, so the false positives previously reported by some CVE scanners will not appear anymore:

$ trivy image --ignore-unfixed bitnami/postgresql:15.2.0-debian-11-r22

bitnami/postgresql:15.2.0-debian-11-r22 (debian 11.6)

Total: 0 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 0, CRITICAL: 0)

opt/bitnami/common/bin/gosu (gobinary)

Total: 3 (UNKNOWN: 0, LOW: 0, MEDIUM: 1, HIGH: 2, CRITICAL: 0)

┌────────────────────────────────┬────────────────┬──────────┬───────────────────┬───────────────┬────────────────────────────────────────────────────────────┐
│            Library             │ Vulnerability  │ Severity │ Installed Version │ Fixed Version │                           Title                            │
├────────────────────────────────┼────────────────┼──────────┼───────────────────┼───────────────┼────────────────────────────────────────────────────────────┤
│ github.com/opencontainers/runc │ CVE-2022-29162 │ HIGH     │ v1.1.0            │ v1.1.2        │ runc: incorrect handling of inheritable capabilities       │
│                                │                │          │                   │               │ https://avd.aquasec.com/nvd/cve-2022-29162                 │
│                                ├────────────────┤          │                   ├───────────────┼────────────────────────────────────────────────────────────┤
│                                │ CVE-2023-27561 │          │                   │ v1.1.5        │ runc: volume mount race condition (regression of           │
│                                │                │          │                   │               │ CVE-2019-19921)                                            │
│                                │                │          │                   │               │ https://avd.aquasec.com/nvd/cve-2023-27561                 │
│                                ├────────────────┼──────────┤                   ├───────────────┼────────────────────────────────────────────────────────────┤
│                                │ CVE-2022-24769 │ MEDIUM   │                   │ v1.1.2        │ moby: Default inheritable capabilities for linux container │
│                                │                │          │                   │               │ should be empty                                            │
│                                │                │          │                   │               │ https://avd.aquasec.com/nvd/cve-2022-24769                 │
└────────────────────────────────┴────────────────┴──────────┴───────────────────┴───────────────┴────────────────────────────────────────────────────────────┘

Total: 0 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 0, CRITICAL: 0)

VS

$ trivy image --ignore-unfixed bitnami/postgresql:15.2.0-debian-11-r23

bitnami/postgresql:15.2.0-debian-11-r23 (debian 11.6)

Total: 0 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 0, CRITICAL: 0)

From now on, gosu functionalities were replaced by chroot. In this PR you can find an example of this implementation.

@github-actions github-actions bot added this to Pending in Support May 3, 2023
@carrodher carrodher moved this from Pending to Solved in Support May 3, 2023
@github-actions github-actions bot removed this from Solved in Support May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request solved stale 15 days without activity triage Triage is needed wordpress
Projects
None yet
Development

No branches or pull requests

7 participants