# CVE-2022-49697: bpf: Fix request\_sock leak in sk lookup helpers

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.28% (percentile 14, 2026-11-26)
- **CWE:** CWE-401
- **Published:** 2025-02-26T02:24:18.842Z
- **Modified:** 2026-06-17T05:18:53.663Z

## Who should check

- Anyone running Linux \>= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, \< 8ffe2e50e9678c8373027492035f094b130437f1; \>= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, \< 516760f1d2979903eaad5b437256913c5cd98416; \>= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, \< b03607437ea81b850599f705096b05b85e7a4a71; \>= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, \< 5a62b5ba4c0ce8315b6382cd4ace81b48cd121cd; \>= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, \< 3046a827316c0e55fc563b4fb78c93b9ca5c7c37
- Anyone running Linux 5.2

## Description

In the Linux kernel, the following vulnerability has been resolved:

bpf: Fix request\_sock leak in sk lookup helpers

A customer reported a request\_socket leak in a Calico cloud environment. We
found that a BPF program was doing a socket lookup with takes a refcnt on
the socket and that it was finding the request\_socket but returning the parent
LISTEN socket via sk\_to\_full\_sk() without decrementing the child request socket
1st, resulting in request\_sock slab object leak. This patch retains the
existing behaviour of returning full socks to the caller but it also decrements
the child request\_socket if one is present before doing so to prevent the leak.

Thanks to Curtis Taylor for all the help in diagnosing and testing this. And
thanks to Antoine Tenart for the reproducer and patch input.

v2 of this patch contains, refactor as per Daniel Borkmann's suggestions to
validate RCU flags on the listen socket so that it balances with bpf\_sk\_release()
and update comments as per Martin KaFai Lau's suggestion. One small change to
Daniels suggestion, put "sk = sk2" under "if (sk2 != sk)" to avoid an extra
instruction.

## Affected and fixed versions

- Linux: \>= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, \< 8ffe2e50e9678c8373027492035f094b130437f1; \>= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, \< 516760f1d2979903eaad5b437256913c5cd98416; \>= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, \< b03607437ea81b850599f705096b05b85e7a4a71; \>= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, \< 5a62b5ba4c0ce8315b6382cd4ace81b48cd121cd; \>= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, \< 3046a827316c0e55fc563b4fb78c93b9ca5c7c37 (cvelist)
- Linux: 5.2 (cvelist)

## Mitigation

- Upgrade Linux to 3046a827316c0e55fc563b4fb78c93b9ca5c7c37 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-49697. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49697.md
Affected: Linux >= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, < 8ffe2e50e9678c8373027492035f094b130437f1; >= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, < 516760f1d2979903eaad5b437256913c5cd98416; >= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, < b03607437ea81b850599f705096b05b85e7a4a71; >= edbf8c01de5a104a71ed6df…
Fixed in: Linux 8ffe2e50e9678c8373027492035f094b130437f1, Linux 516760f1d2979903eaad5b437256913c5cd98416, Linux 5a62b5ba4c0ce8315b6382cd4ace81b48cd121cd, Linux 3046a827316c0e55fc563b4fb78c93b9ca5c7c37

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-49697 being exploited?

There is no confirmed exploitation: CVE-2022-49697 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.28% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-49697?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-49697?

Linux \>= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, \< 8ffe2e50e9678c8373027492035f094b130437f1; \>= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, \< 516760f1d2979903eaad5b437256913c5cd98416; \>= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, \< b03607437ea81b850599f705096b05b85e7a4a71; \>= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, \< 5a62b5ba4c0ce8315b6382cd4ace81b48cd121cd; \>= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, \< 3046a827316c0e55fc563b4fb78c93b9ca5c7c37; Linux 5.2.

### Is there a fix for CVE-2022-49697?

Yes. Fixed in Linux 8ffe2e50e9678c8373027492035f094b130437f1, Linux 516760f1d2979903eaad5b437256913c5cd98416, Linux 5a62b5ba4c0ce8315b6382cd4ace81b48cd121cd, Linux 3046a827316c0e55fc563b4fb78c93b9ca5c7c37. Upgrade Linux to 3046a827316c0e55fc563b4fb78c93b9ca5c7c37 or later.

### How do I check if I'm affected by CVE-2022-49697?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/8ffe2e50e9678c8373027492035f094b130437f1>
- patch: <https://git.kernel.org/stable/c/516760f1d2979903eaad5b437256913c5cd98416>
- patch: <https://git.kernel.org/stable/c/b03607437ea81b850599f705096b05b85e7a4a71>
- patch: <https://git.kernel.org/stable/c/5a62b5ba4c0ce8315b6382cd4ace81b48cd121cd>
- patch: <https://git.kernel.org/stable/c/3046a827316c0e55fc563b4fb78c93b9ca5c7c37>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-49697>

HTML: <https://flawdb.com/CVE-2022-49697> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-49697>
