Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/landlock-lsm/go-landlock
  4. ›
  5. GHSA-vv6c-69r6-chg9

GHSA-vv6c-69r6-chg9: Go-Landlock in best-effort mode did not restrict TCP bind and connect operations correctly

October 14, 2024

When using the recommended “best-effort” mode, Go-Landlock did not restrict the TCP bind() and connect() operations any more when they were requested. This affects Go-Landlock users to whom both of the following conditions apply:

  • They use Landlock rulesets that are supposed to restrict networking (through landlock.V4, landlock.V5, or self-configured).
  • These Landlock rulesets are used in best-effort mode.

Typically, affected code uses the Go-Landlock API like this (the crucial part being the combination of V4/V5 and .BestEffort()):

err := landlock.V5.BestEffort().Restrict(...)
  • This is a bug in the Go-Landlock library and does not affect programs that use Landlock via C or other language bindings.
  • The bug only affects networking restrictions. File system restrictions continue to work as expected.

References

  • github.com/advisories/GHSA-vv6c-69r6-chg9
  • github.com/landlock-lsm/go-landlock
  • github.com/landlock-lsm/go-landlock/commit/fb3ad845df462d013f9c8a965c496617c6a5778b
  • github.com/landlock-lsm/go-landlock/security/advisories/GHSA-vv6c-69r6-chg9

Code Behaviors & Features

Detect and mitigate GHSA-vv6c-69r6-chg9 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 0.0.0-20240109 before 0.0.0-20241013234402-fb3ad845df46

Fixed versions

  • 0.0.0-20241013234402-fb3ad845df46

Solution

Upgrade to version 0.0.0-20241013234402-fb3ad845df46 or above.

Source file

go/github.com/landlock-lsm/go-landlock/GHSA-vv6c-69r6-chg9.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:14 +0000.