# GHSA-34vw-m4rh-r36p: Talos vulnerable dependency due to race condition in Linux kernel's IP framework XFRM

> A local attacker with NET_ADMIN capability can exploit a race condition in the Linux kernel XFRM subsystem to achieve code execution or leak memory.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 16 Sep 2022

## What is GHSA-34vw-m4rh-r36p?

GHSA-34vw-m4rh-r36p is a vulnerability in github.com/talos-systems/talos, published on 16 Sep 2022. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

### Impact
A race condition was found in the Linux kernel's IP framework for transforming packets (XFRM subsystem) when multiple calls to xfrm_probe_algs occurred simultaneously. This flaw could allow a local attacker to potentially trigger an out-of-bounds write or leak kernel heap memory by performing an out-of-bounds read and copying it into a socket.

### Patches
The fix has been backported to [5.15.64](https://www.linuxkernelcves.com/cves/CVE-2022-3028) version of the upstream Linux kernel (5.15 is the upstream Kernel long term version Talos ships with). Talos >= v1.2.0 is shipped with Linux Kernel 5.15.64 fixing the above issue.

Kubernetes workloads running in Talos are not affected since user namespaces are disabled in Talos kernel config. So an unprivileged user cannot obtain CAP_NET_ADMIN by unsharing. However untrusted workloads that run with privileged: true or having NET_ADMIN capability poses a risk.

### Workarounds
Audit kubernetes workloads running in the cluster with privileged: true set or having NET_ADMIN capability and assess the threat vector.

### References
- https://nvd.nist.gov/vuln/detail/CVE-2022-3028
- https://access.redhat.com/security/cve/CVE-2022-3028

### For more information
- Email us at [security@siderolabs.com](mailto:security@siderolabs.com)

## Which versions are affected by GHSA-34vw-m4rh-r36p?

2 open source packages ship an affected version, including github.com/talos-systems/talos.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/talos-systems/talos` | Go | All versions | 1.2.0 |
| `github.com/talos-systems/talos` | Go | All versions | 1.2.0 |

## How do I fix GHSA-34vw-m4rh-r36p?

Upgrade github.com/talos-systems/talos to 1.2.0 or later.

## Is GHSA-34vw-m4rh-r36p being exploited?

There is no known exploitation of GHSA-34vw-m4rh-r36p in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-34vw-m4rh-r36p and fix it if it is affected.

What it is: GHSA-34vw-m4rh-r36p is a vulnerability in github.com/talos-systems/talos, published on 16 Sep 2022. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-34vw-m4rh-r36p in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/talos-systems/talos (Go): affected all versions; fixed in 1.2.0
- github.com/talos-systems/talos (Go): affected all versions; fixed in 1.2.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-34vw-m4rh-r36p/ (Markdown: https://insights.sbomify.com/GHSA-34vw-m4rh-r36p/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-34vw-m4rh-r36p

---
From sbomify Insights: https://insights.sbomify.com/GHSA-34vw-m4rh-r36p/
Summaries are generated and may contain mistakes; the official description above is the record.
