Skip to content

fix: Upgrade containerd to v2.1.5 to address CVE-2024-25621 and CVE-2025-64329 - #1770

Merged
Andriy Knysh (aknysh) merged 2 commits into
mainfrom
containerd-cve-fixes
Nov 8, 2025
Merged

Andriy Knysh (aknysh) merged 2 commits into
mainfrom
containerd-cve-fixes

Conversation

@osterman

@osterman Erik Osterman (Cloud Posse) (osterman) commented Nov 8, 2025 •

Copy link
Copy Markdown
Member

Summary

Upgrades github.com/containerd/containerd/v2 from v2.1.4 to v2.1.5 to address two security vulnerabilities.

Security Fixes

CVE-2024-25621 (High Severity)

Local privilege escalation via wide permissions on CRI directory

  • Impact: Directory permissions were overly broad, allowing local users to access sensitive data
    • /var/lib/containerd created with 0o711 instead of 0o700
    • /run/containerd/io.containerd.grpc.v1.cri created with 0o755 instead of 0o700
    • /run/containerd/io.containerd.sandbox.controller.v1.shim created with 0o711 instead of 0o700
  • Risk: Local users could access metadata store, content store, and Kubernetes local volumes
  • Fix: v2.1.5 automatically updates existing directory permissions on upgrade

CVE-2025-64329 (Moderate Severity)

Host memory exhaustion through Attach goroutine leak

  • Impact: Repetitive CRI Attach calls (e.g., kubectl attach) could leak goroutines
  • Risk: Memory exhaustion on the host over time
  • Fix: Proper goroutine cleanup in CRI Attach implementation

Changes

  • Upgraded github.com/containerd/containerd/v2 from v2.1.4 to v2.1.5
  • Updated go.mod and go.sum

Testing

  • ✅ make build - Build successful
  • ✅ make test-short - Tests pass (pre-existing failures unrelated to this change)

References

🤖 Generated with Claude Code

Co-Authored-By: Claude [email protected]

Summary by CodeRabbit

  • Chores
    • Updated containerd dependency to version 2.1.5

   1 fix: Upgrade containerd to v2.1.5 to address security vulnerabilities
   2
   3 This upgrade fixes two containerd security vulnerabilities:
   4
   5 - CVE-2024-25621 (High): Local privilege escalation via wide permissions on CRI directory
   6   - /var/lib/containerd created with 0o711 instead of 0o700
   7   - /run/containerd/io.containerd.grpc.v1.cri created with 0o755 instead of 0o700
   8   - /run/containerd/io.containerd.sandbox.controller.v1.shim created with 0o711 instead of 0o700
   9   - Allowed local users to access metadata/content stores and Kubernetes volumes
  10   - Fixed by automatically updating directory permissions on upgrade
  11
  12 - CVE-2025-64329 (Moderate): Host memory exhaustion through Attach goroutine leak
  13   - Repetitive CRI Attach calls (kubectl attach) could leak goroutines
  14   - Could exhaust host memory over time
  15   - Fixed by proper goroutine cleanup in CRI implementation
  16
  17 Upgraded github.com/containerd/containerd/v2 from v2.1.4 to v2.1.5
  18
  19 Resolves Dependabot alerts #128 and #129
  20
  21 🤖 Generated with [Claude Code](https://claude.com/claude-code)
  22
  23 Co-Authored-By: Claude <[email protected]>
@github-actions github-actions Bot added the size/xs Extra small size PR label Nov 8, 2025
@coderabbitai

coderabbitai Bot commented Nov 8, 2025 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Containerd/v2 dependency bumped from v2.1.4 to v2.1.5, with corresponding license URL updated. No logic changes, structure modifications, or exported entity alterations involved.

Changes

Cohort / File(s) Summary
Dependency Version Update
go.mod
Bumped indirect dependency github.com/containerd/containerd/v2 from v2.1.4 to v2.1.5
License URL Update
NOTICE
Updated license URL reference for containerd/v2 from v2.1.4/LICENSE to v2.1.5/LICENSE

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: upgrading containerd to v2.1.5 to address specific security vulnerabilities (CVE-2024-25621 and CVE-2025-64329).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch containerd-cve-fixes

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between af04688 and f0e5cdc.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • NOTICE (1 hunks)
  • go.mod (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
go.{mod,sum}

📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)

go.{mod,sum}: Manage dependencies with Go modules
Keep dependencies up to date

Files:

  • go.mod
🧠 Learnings (4)
📓 Common learnings
Learnt from: aknysh
Repo: cloudposse/atmos PR: 944
File: go.mod:206-206
Timestamp: 2025-01-17T00:18:57.769Z
Learning: For indirect dependencies with license compliance issues in the cloudposse/atmos repository, the team prefers to handle them in follow-up PRs rather than blocking the current changes, as these issues often require deeper investigation of the dependency tree.
Learnt from: Listener430
Repo: cloudposse/atmos PR: 934
File: tests/fixtures/scenarios/docs-generate/README.md.gotmpl:99-118
Timestamp: 2025-01-25T03:51:57.689Z
Learning: For the cloudposse/atmos repository, changes to template contents should be handled in dedicated PRs and are typically considered out of scope for PRs focused on other objectives.
Learnt from: osterman
Repo: cloudposse/atmos PR: 801
File: examples/quick-start-advanced/Dockerfile:9-9
Timestamp: 2024-11-23T00:13:22.004Z
Learning: When updating the `ATMOS_VERSION` in Dockerfiles, the team prefers to pin to the next future version when the PR merges, even if the version is not yet released.
📚 Learning: 2025-09-23T02:30:42.362Z
Learnt from: CR
Repo: cloudposse/atmos PR: 0
File: .cursor/rules/atmos-rules.mdc:0-0
Timestamp: 2025-09-23T02:30:42.362Z
Learning: Applies to go.{mod,sum} : Keep dependencies up to date

Applied to files:

  • go.mod
📚 Learning: 2025-09-23T02:30:42.362Z
Learnt from: CR
Repo: cloudposse/atmos PR: 0
File: .cursor/rules/atmos-rules.mdc:0-0
Timestamp: 2025-09-23T02:30:42.362Z
Learning: Applies to go.{mod,sum} : Manage dependencies with Go modules

Applied to files:

  • go.mod
📚 Learning: 2025-11-01T20:24:29.557Z
Learnt from: osterman
Repo: cloudposse/atmos PR: 1714
File: NOTICE:0-0
Timestamp: 2025-11-01T20:24:29.557Z
Learning: In the cloudposse/atmos repository, the NOTICE file is programmatically generated and should not be manually edited. Issues with dependency license URLs in NOTICE will be resolved when upstream package metadata is corrected.

Applied to files:

  • NOTICE
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Build (macos)
  • GitHub Check: Build (linux)
  • GitHub Check: Build (windows)
  • GitHub Check: Review Dependency Licenses
  • GitHub Check: autofix
  • GitHub Check: Analyze (go)
  • GitHub Check: Lint (golangci)
  • GitHub Check: Summary
🔇 Additional comments (2)
go.mod (1)

184-184: Solid patch-level security update.

The bump from v2.1.4 to v2.1.5 is a focused patch addressing two CVEs (CVE-2024-25621 and CVE-2025-64329). Since this is an indirect dependency in the require block and testing confirmed no breakage, the change looks good.

NOTICE (1)

198-198: License URL updated to match dependency version.

The URL correctly points to v2.1.5, keeping it in sync with the go.mod upgrade. Clean and necessary.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (2)
  • CVE-2024: Entity not found: Issue - Could not find referenced Issue.
  • CVE-2025: Entity not found: Issue - Could not find referenced Issue.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@osterman Erik Osterman (Cloud Posse) (osterman) added patch A minor, backward compatible change dependencies Pull requests that update a dependency file bugfix Change that restores intended behavior labels Nov 8, 2025
@github-actions

github-actions Bot commented Nov 8, 2025 •

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
gomod/github.com/containerd/containerd/v2 2.1.5 🟢 9.4
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Maintained🟢 1030 commit(s) and 9 issue activity found in the last 90 days -- score normalized to 10
License🟢 10license file detected
CII-Best-Practices🟢 5badge detected: Passing
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Fuzzing🟢 10project is fuzzed
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Security-Policy🟢 9security policy file detected
Branch-Protection🟢 8branch protection is not maximal on development and all release branches
Binary-Artifacts🟢 10no binaries found in the repo
Signed-Releases🟢 104 out of the last 4 releases have a total of 4 signed artifacts.
SAST🟢 10SAST tool is run on all commits
Vulnerabilities🟢 100 existing vulnerabilities detected
Pinned-Dependencies🟢 6dependency not pinned by hash detected -- score normalized to 6

Scanned Files

  • go.mod

@codecov

codecov Bot commented Nov 8, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.90%. Comparing base (af04688) to head (f0e5cdc).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1770   +/-   ##
=======================================
  Coverage   69.89%   69.90%           
=======================================
  Files         398      398           
  Lines       36487    36487           
=======================================
+ Hits        25503    25505    +2     
+ Misses       8675     8674    -1     
+ Partials     2309     2308    -1     
Flag Coverage Δ
unittests 69.90% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aknysh
Andriy Knysh (aknysh) merged commit e50ed36 into main Nov 8, 2025
@aknysh
Andriy Knysh (aknysh) deleted the containerd-cve-fixes branch November 8, 2025 23:18
@github-actions

github-actions Bot commented Nov 9, 2025

Copy link
Copy Markdown

These changes were released in v1.198.0-rc.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Change that restores intended behavior dependencies Pull requests that update a dependency file patch A minor, backward compatible change size/xs Extra small size PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants