CVE-2022-49973

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-49973
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49973.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-49973
Downstream
Published
2025-06-18T11:15:24Z
Modified
2025-06-18T16:01:33Z
Summary
[none]
Details

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

skmsg: Fix wrong last sg check in skmsgrecvmsg()

Fix one kernel NULL pointer dereference as below:

[ 224.462334] Call Trace: [ 224.462394] _tcpbpfrecvmsg+0xd3/0x380 [ 224.462441] ? sockhasperm+0x78/0xa0 [ 224.462463] tcpbpfrecvmsg+0x12e/0x220 [ 224.462494] inetrecvmsg+0x5b/0xd0 [ 224.462534] _sysrecvfrom+0xc8/0x130 [ 224.462574] ? syscalltraceenter+0x1df/0x2e0 [ 224.462606] ? _dopagefault+0x2de/0x500 [ 224.462635] _x64sysrecvfrom+0x24/0x30 [ 224.462660] dosyscall64+0x5d/0x1d0 [ 224.462709] entrySYSCALL64afterhwframe+0x65/0xca

In commit 9974d37ea75f ("skmsg: Fix invalid last sg check in skmsgrecvmsg()"), we change last sg check to sgislast(), but in sockmap redirection case (without streamparser/streamverdict/ skbverdict), we did not mark the end of the scatterlist. Check the skmsgalloc, skmsgpageadd, and bpfmsgpushdata functions, they all do not mark the end of sg. They are expected to use sg.end for end judgment. So the judgment of '(i != msgrx->sg.end)' is added back here.

References

Affected packages

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
6.0.2-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
6.0.2-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}