CVE-2022-49205·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: bpf, sockmap: Fix double uncharge the mem of sk_msg If tcp_bpf_sendmsg is running during a tear down operation, psock may be freed. tcp_bpf_sendmsg() tcp_bpf_send_verdict() sk_msg_return() tcp_bpf_sendmsg_redir() unlikely(!psock)) sk_msg_free() The mem of msg has been uncharged in tcp_bpf_send_verdict() by sk_msg_return(), and would be uncharged by sk_msg_free() again. When psock is null, we can simply returning an error code, this would then trigger the sk_msg_free_nocharge in the error path of __SK_REDIRECT and would have the side effect of throwing an error up to user space. This would be a slight change in behavior from user side but would look the same as an error if the redirect on the socket threw an error. This issue can cause the following info: WARNING: CPU: 0 PID: 2136 at net/ipv4/af_inet.c:155 inet_sock_destruct+0x13c/0x260 Call Trace: <TASK> __sk_destruct+0x24/0x1f0 sk_psock_destroy+0x19b/0x1c0 process_one_work+0x1b3/0x3c0 worker_thread+0x30/0x350 ? process_one_work+0x3c0/0x3c0 kthread+0xe6/0x110 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x22/0x30 </TASK>
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.17.2
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at <0.1% — higher than 16% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Read the two together. CVE-2022-49205 scores 7.8 on CVSS, so a successful attack would be serious — but at <0.1%, almost nobody is currently attempting it. That is a different situation from a flaw under mass exploitation, and it is usually the difference between patching on your next maintenance window and patching tonight.
Affected versions
From: 5.17
Until: 5.17.2
Fixed in: 5.17.2
How to fix this CVE
Update your Linux kernel to version 5.17.2 or later to resolve this double-uncharge memory issue in the BPF sockmap subsystem. This vulnerability causes kernel memory accounting errors when TCP BPF redirect operations race with socket teardown, leading to potential system instability. Apply the kernel update through your distribution's package manager and reboot to activate the patched version.
sudo dnf update kernel kernel-devel && sudo rebootDefensia detects this vulnerability
How to check if you are affected
- Check your current kernel version: uname -r
- Verify if BPF sockmap is loaded: grep -i bpf /proc/modules or check if BPF programs are attached with bpftool prog list
- Search for exploitation signs in kernel logs: dmesg | grep -i 'WARNING.*inet_sock_destruct' or journalctl -k | grep 'inet_sock_destruct'
- Confirm the patch is applied by checking kernel release notes: cat /proc/version and verify the build date is after the CVE-2022-49205 fix date (late 2022)
FAQ
What is CVE-2022-49205?
CVE-2022-49205 is a kernel memory accounting bug in the BPF sockmap implementation where socket memory is incorrectly freed twice when TCP BPF redirect operations race with socket teardown, causing memory accounting corruption and potential denial of service.
Is CVE-2022-49205 being actively exploited?
No, CVE-2022-49205 is not listed in the CISA Known Exploited Vulnerabilities catalog and no public exploits are currently available.
What versions of Kernel are affected by CVE-2022-49205?
Linux kernel versions 5.17 through 5.17.2 are affected. The vulnerability was fixed in kernel 5.17.2.
How do I check if my server is vulnerable to CVE-2022-49205?
Run 'uname -r' to check your kernel version; if it reports 5.17, 5.17.1, or 5.17.2, your system is vulnerable. If it reports 5.17.2 or higher, verify the exact patch with 'cat /proc/version' to confirm the build includes the fix.
Does Defensia detect CVE-2022-49205?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2022-49205 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/223f3c51ab163852dd4819d357dcf33039929434
- https://git.kernel.org/stable/c/2486ab434b2c2a14e9237296db00b1e1b7ae3273
- https://git.kernel.org/stable/c/94c6ac22abcdede72bfaa0f4c22fb370891f4002
- https://git.kernel.org/stable/c/ac3ecb7760c750c8e4fc09c719241d8e6e88028c
- https://git.kernel.org/stable/c/cb6f141ae705af0101e819065a79e6d029f6e393
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2022-49205. Free for 1 server.
Get started free