CVE-2026-22983

Source
https://cve.org/CVERecord?id=CVE-2026-22983
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-22983.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-22983
Downstream
Published
2026-01-23T15:24:05.394Z
Modified
2026-03-13T04:06:41.499174Z
Summary
net: do not write to msg_get_inq in callee
Details

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

net: do not write to msggetinq in callee

NULL pointer dereference fix.

msggetinq is an input field from caller to callee. Don't set it in the callee, as the caller may not clear it on struct reuse.

This is a kernel-internal variant of msghdr only, and the only user does reinitialize the field. So this is not critical for that reason. But it is more robust to avoid the write, and slightly simpler code. And it fixes a bug, see below.

Callers set msggetinq to request the input queue length to be returned in msginq. This is equivalent to but independent from the SOINQ request to return that same info as a cmsg (tp->recvmsginq). To reduce branching in the hot path the second also sets the msginq. That is WAI.

This is a fix to commit 4d1442979e4a ("afunix: don't post cmsg for SOINQ unless explicitly asked for"), which fixed the inverse.

Also avoid NULL pointer dereference in unixstreamreadgeneric if state->msg is NULL and msg->msggetinq is written. A NULL state->msg can happen when splicing as of commit 2b514574f7e8 ("net: afunix: implement splice for stream af_unix sockets").

Also collapse two branches using a bitwise or.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/22xxx/CVE-2026-22983.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
089e50f29eeec8eef6ae1450fc88138d719291cb
Fixed
ffa2be496ef65055b28b39c6bd9a7d66943ee89a
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
4d1442979e4a53b9457ce1e373e187e1511ff688
Fixed
7d11e047eda5f98514ae62507065ac961981c025

Database specific

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