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

fix: [NPM] [CVEs] Update NPM Linux Dockerfile to Fix Ubuntu Vulnerabilities #3439

Merged
merged 2 commits into from
Feb 25, 2025

Conversation

rayaisaiah
Copy link
Contributor

@rayaisaiah rayaisaiah commented Feb 21, 2025

Reason for Change:
Updated NPM Linux dockerfile to manually run apt-get install to get latest versions of Ubuntu packages (libc-bin, libc6, and libtasn1-6) to resolve the following Ubuntu CVEs in NPM's base image.

Once the base image is updated to fixes we can remove this manually installation.

libc-bin CVE-2025-0395
libc6 CVE-2025-0395
libtasn1-6 CVE-2024-12133

Trivy scan of NPM on current v1.5 release:

mcr.microsoft.com/containernetworking/azure-npm:v1.5.42 (ubuntu 20.04)
======================================================================
Total: 3 (UNKNOWN: 0, LOW: 0, MEDIUM: 3, HIGH: 0, CRITICAL: 0)

┌────────────┬────────────────┬──────────┬────────┬───────────────────┬───────────────────┬───────────────────────────────────────────────────────────┐
│  Library   │ Vulnerability  │ Severity │ Status │ Installed Version │   Fixed Version   │                           Title                           │
├────────────┼────────────────┼──────────┼────────┼───────────────────┼───────────────────┼───────────────────────────────────────────────────────────┤
│ libc-bin   │ CVE-2025-0395  │ MEDIUM   │ fixed  │ 2.31-0ubuntu9.16  │ 2.31-0ubuntu9.17  │ glibc: buffer overflow in the GNU C Library's assert()    │
│            │                │          │        │                   │                   │ https://avd.aquasec.com/nvd/cve-2025-0395                 │
├────────────┤                │          │        │                   │                   │                                                           │
│ libc6      │                │          │        │                   │                   │                                                           │
│            │                │          │        │                   │                   │                                                           │
├────────────┼────────────────┤          │        ├───────────────────┼───────────────────┼───────────────────────────────────────────────────────────┤
│ libtasn1-6 │ CVE-2024-12133 │          │        │ 4.16.0-2          │ 4.16.0-2ubuntu0.1 │ libtasn1: Inefficient DER Decoding in libtasn1 Leading to │
│            │                │          │        │                   │                   │ Potential Remote DoS                                      │
│            │                │          │        │                   │                   │ https://avd.aquasec.com/nvd/cve-2024-12133                │
└────────────┴────────────────┴──────────┴────────┴───────────────────┴───────────────────┴───────────────────────────────────────────────────────────┘

Trivy scan of NPM after dockerfile update:

acnpublic.azurecr.io/azure-npm:CVEFix (ubuntu 20.04)
===========================================================
Total: 0 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 0, CRITICAL: 0)

Issue Fixed:

Requirements:

Notes:

@Copilot Copilot bot review requested due to automatic review settings February 21, 2025 00:14
@rayaisaiah rayaisaiah requested a review from a team as a code owner February 21, 2025 00:14
@rayaisaiah rayaisaiah requested a review from vakalapa February 21, 2025 00:14

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

@rayaisaiah rayaisaiah added npm Related to NPM. linux labels Feb 21, 2025
@rayaisaiah
Copy link
Contributor Author

/azp run Azure Container Networking PR

@rayaisaiah
Copy link
Contributor Author

/azp run NPM Conformance Tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rayaisaiah
Copy link
Contributor Author

/azp run NPM Scale Test

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

1 similar comment
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

huntergregory
huntergregory previously approved these changes Feb 21, 2025
@rayaisaiah rayaisaiah changed the title fix: [NPM] [CVEs] Update NPM Linux Dockerfile to Fix Ubuntu Vulnerabilites fix: [NPM] [CVEs] Update NPM Linux Dockerfile to Fix Ubuntu Vulnerabilities Feb 21, 2025
@rayaisaiah rayaisaiah added this pull request to the merge queue Feb 21, 2025
@rbtr
Copy link
Contributor

rbtr commented Feb 21, 2025

Running a package upgrade in the build is generally a bad idea - you will get something different every time. And if you do a global apt upgrade you will get a lot of different things every time.
If there are packages that need to be updated, you can apt install xxx-v1.2.3 to get specific (ie repeatable) versions of them.

@rayaisaiah rayaisaiah removed this pull request from the merge queue due to a manual request Feb 21, 2025
@rayaisaiah
Copy link
Contributor Author

rayaisaiah commented Feb 21, 2025

Running an package upgrade in the build is generally a bad idea - you will get something different every time. And if you're a global apt upgrade you will get a lot of different things every time. If there are specific packages that need to be update, you can apt install xxx-v1.2.3 to get specific (ie repeatable) versions of them.

I see that makes sense. We needed updates to libc-bin, libc6, and libtasn1-6 packages specifically so I can make that change

RUN apt-get update && apt-get install -y libc-bin=2.31-0ubuntu9.17 libc6=2.31-0ubuntu9.17 libtasn1-6=4.16.0-2ubuntu0.1 iptables ipset ca-certificates && apt-get autoremove -y && apt-get clean

@rayaisaiah
Copy link
Contributor Author

/azp run Azure Container Networking PR

@rayaisaiah
Copy link
Contributor Author

/azp run NPM Conformance Tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rayaisaiah
Copy link
Contributor Author

/azp run NPM Scale Test

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

1 similar comment
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rayaisaiah rayaisaiah added this pull request to the merge queue Feb 21, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 21, 2025
@rayaisaiah rayaisaiah added this pull request to the merge queue Feb 21, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 22, 2025
@rayaisaiah rayaisaiah added this pull request to the merge queue Feb 23, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 24, 2025
@rayaisaiah rayaisaiah added this pull request to the merge queue Feb 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 24, 2025
@rayaisaiah rayaisaiah added this pull request to the merge queue Feb 24, 2025
@rayaisaiah rayaisaiah removed this pull request from the merge queue due to a manual request Feb 24, 2025
@rayaisaiah rayaisaiah added this pull request to the merge queue Feb 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Feb 24, 2025
@rayaisaiah rayaisaiah added this pull request to the merge queue Feb 25, 2025
Merged via the queue into release/v1.5 with commit eec82d9 Feb 25, 2025
153 of 171 checks passed
@rayaisaiah rayaisaiah deleted the isaiahraya/npm-cve-fixes branch February 25, 2025 21:56
rayaisaiah added a commit that referenced this pull request Feb 28, 2025
…lities (#3439)

* updated npm linux dockerfile to run apt-get upgrade to fix ubuntu cves

* updated to install specific packages
github-merge-queue bot pushed a commit that referenced this pull request Mar 3, 2025
* fix: [NPM] [CVEs] Update NPM Linux Dockerfile to Fix Ubuntu Vulnerabilities (#3439)

* updated npm linux dockerfile to run apt-get upgrade to fix ubuntu cves

* updated to install specific packages

* fix: [NPM] [CVEs] Update NPM Linux Dockerfile to Fix Ubuntu CVE-2024-12243  (#3461)

resolved npm CVE-2024-12243
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linux npm Related to NPM.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants