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

- Severity: Low (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2024-10-14T20:30:25.000Z
- Modified: 2024-10-15T16:12:13.340Z
- Also known as: GO-2024-3199

## Description

### Impact
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.

### Patches
Patched in: https://github.com/landlock-lsm/go-landlock/commit/fb3ad845df462d013f9c8a965c496617c6a5778b
Users should upgrade to: v0.0.0-20241013234402-fb3ad845df46

Go package dependencies can be updated using `go get -u` from the project directory.

Projects on Github might get notified by Dependabot, once this advisory is public.

### Workarounds
None.

### References
Currently none.

[The existing users of Go-Landlock on Github](https://pkg.go.dev/github.com/landlock-lsm/go-landlock/landlock?tab=importedby) have the following bugs filed:
* https://github.com/Foxboron/ssh-the-planet/issues/1
* https://github.com/ngergs/websrv/issues/15
* https://github.com/pufferffish/wireproxy/issues/142

(As written by GitHub Advisory Database.)

## Affected

- github.com/landlock-lsm/go-landlock (Go): from 0.0.0-20240109 before 0.0.0-20241013234402-fb3ad845df46; before 0.0.0-20241013234402-fb3ad845df46

## References

- <https://github.com/landlock-lsm/go-landlock/security/advisories/GHSA-vv6c-69r6-chg9> (advisory, web)
- <https://github.com/landlock-lsm/go-landlock/commit/fb3ad845df462d013f9c8a965c496617c6a5778b> (fix, web)
- <https://github.com/landlock-lsm/go-landlock> (package)

## Sources

- GitHub Advisory Database: [GHSA-vv6c-69r6-chg9](https://github.com/advisories/GHSA-vv6c-69r6-chg9), CC-BY-4.0, modified 2024-10-15
- Go Vulnerability Database: [GO-2024-3199](https://pkg.go.dev/vuln/GO-2024-3199), CC-BY-4.0, modified 2024-10-15

---

Page: https://cve.day/GHSA-vv6c-69r6-chg9 · Whole record: https://cve.day/GHSA-vv6c-69r6-chg9.json · Rebuilt by cve.day 2026-11-25T22:56:23.876Z
