CVE-2022-49205

Source
https://cve.org/CVERecord?id=CVE-2022-49205
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49205.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-49205
Downstream
Related
Published
2025-02-26T01:55:45.177Z
Modified
2026-04-02T08:27:23.815203Z
Summary
bpf, sockmap: Fix double uncharge the mem of sk_msg
Details

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

bpf, sockmap: Fix double uncharge the mem of sk_msg

If tcpbpfsendmsg is running during a tear down operation, psock may be freed.

tcpbpfsendmsg() tcpbpfsendverdict() skmsgreturn() tcpbpfsendmsgredir() unlikely(!psock)) skmsgfree()

The mem of msg has been uncharged in tcpbpfsendverdict() by skmsgreturn(), and would be uncharged by skmsgfree() again. When psock is null, we can simply returning an error code, this would then trigger the skmsgfreenocharge in the error path of _SKREDIRECT 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/afinet.c:155 inetsock_destruct+0x13c/0x260 Call Trace: <TASK> _skdestruct+0x24/0x1f0 skpsockdestroy+0x19b/0x1c0 processonework+0x1b3/0x3c0 workerthread+0x30/0x350 ? processonework+0x3c0/0x3c0 kthread+0xe6/0x110 ? kthreadcompleteandexit+0x20/0x20 retfromfork+0x22/0x30 </TASK>

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49205.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
604326b41a6fb9b4a78b6179335decee0365cd8c
Fixed
94c6ac22abcdede72bfaa0f4c22fb370891f4002
Fixed
cd84ea3920aef936c559b63099ef0013ce6b2325
Fixed
cb6f141ae705af0101e819065a79e6d029f6e393
Fixed
223f3c51ab163852dd4819d357dcf33039929434
Fixed
ac3ecb7760c750c8e4fc09c719241d8e6e88028c
Fixed
2486ab434b2c2a14e9237296db00b1e1b7ae3273

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49205.json"