CVE-2022-49697
bpf: Fix request_sock leak in sk lookup helpers
Mitigation
- Upgrade Linux to 3046a827316c0e55fc563b4fb78c93b9ca5c7c37 or later.
Who should check
- Anyone running Linux >= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, < 8ffe2e50e9678c8373027492035f094b130437f1; >= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, < 516760f1d2979903eaad5b437256913c5cd98416; >= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, < b03607437ea81b850599f705096b05b85e7a4a71; >= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, < 5a62b5ba4c0ce8315b6382cd4ace81b48cd121cd; >= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, < 3046a827316c0e55fc563b4fb78c93b9ca5c7c37
- Anyone running Linux 5.2
Vulnerability facts
- Affected
- Linux >= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, < 8ffe2e50e9678c8373027492035f094b130437f1; >= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, < 516760f1d2979903eaad5b437256913c5cd98416; >= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, < b03607437ea81b850599f705096b05b85e7a4a71; >= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, < 5a62b5ba4c0ce8315b6382cd4ace81b48cd121cd; >= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, < 3046a827316c0e55fc563b4fb78c93b9ca5c7c37; Linux 5.2
- Fixed in
- Linux 8ffe2e50e9678c8373027492035f094b130437f1, Linux 516760f1d2979903eaad5b437256913c5cd98416, Linux 5a62b5ba4c0ce8315b6382cd4ace81b48cd121cd, Linux 3046a827316c0e55fc563b4fb78c93b9ca5c7c37
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 5.5 (v3.1, NVD)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HOpen in CVSS calculator
Show all 8 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
- EPSS
- 0.28% chance of exploitation in 30 days (percentile 14, 2026-11-26)
- CWE
- CWE-401
- Modified
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
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, < 8ffe2e50e9678c8373027492035f094b130437f1; >= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, < 516760f1d2979903eaad5b437256913c5cd98416; >= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, < b03607437ea81b850599f705096b05b85e7a4a71; >= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, < 5a62b5ba4c0ce8315b6382cd4ace81b48cd121cd; >= edbf8c01de5a104a71ed6df2bf6421ceb2836a8e, < 3046a827316c0e55fc563b4fb78c93b9ca5c7c37 | — | cvelist |
| Linux | 5.2 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
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.
References
Patches
- https://git.kernel.org/stable/c/8ffe2e50e9678c8373027492035f094b130437f1
- https://git.kernel.org/stable/c/516760f1d2979903eaad5b437256913c5cd98416
- https://git.kernel.org/stable/c/b03607437ea81b850599f705096b05b85e7a4a71
- https://git.kernel.org/stable/c/5a62b5ba4c0ce8315b6382cd4ace81b48cd121cd
- https://git.kernel.org/stable/c/3046a827316c0e55fc563b4fb78c93b9ca5c7c37
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.