CVE-2022-49205

Source
https://nvd.nist.gov/vuln/detail/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
Related
Published
2025-02-26T07:00:57Z
Modified
2025-02-26T18:58:17.177624Z
Summary
[none]
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 inetsockdestruct+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 retfrom_fork+0x22/0x30 </TASK>

References

Affected packages

Debian:11 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.10.113-1

Affected versions

5.*

5.10.46-4
5.10.46-5
5.10.70-1~bpo10+1
5.10.70-1
5.10.84-1
5.10.92-1~bpo10+1
5.10.92-1
5.10.92-2
5.10.103-1~bpo10+1
5.10.103-1
5.10.106-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:12 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.17.3-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:13 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.17.3-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}