CVE-2024-26638

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-26638
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-26638.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-26638
Downstream
Related
Published
2024-03-18T10:14:48.970Z
Modified
2025-11-28T02:34:31.073549Z
Severity
  • 4.4 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
nbd: always initialize struct msghdr completely
Details

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

nbd: always initialize struct msghdr completely

syzbot complains that msg->msggetinq value can be uninitialized [1]

struct msghdr got many new fields recently, we should always make sure their values is zero by default.

[1] BUG: KMSAN: uninit-value in tcprecvmsg+0x686/0xac0 net/ipv4/tcp.c:2571 tcprecvmsg+0x686/0xac0 net/ipv4/tcp.c:2571 inetrecvmsg+0x131/0x580 net/ipv4/afinet.c:879 sockrecvmsgnosec net/socket.c:1044 [inline] sockrecvmsg+0x12b/0x1e0 net/socket.c:1066 _sockxmit+0x236/0x5c0 drivers/block/nbd.c:538 nbdreadreply drivers/block/nbd.c:732 [inline] recvwork+0x262/0x3100 drivers/block/nbd.c:863 processonework kernel/workqueue.c:2627 [inline] processscheduledworks+0x104e/0x1e70 kernel/workqueue.c:2700 workerthread+0xf45/0x1490 kernel/workqueue.c:2781 kthread+0x3ed/0x540 kernel/kthread.c:388 retfromfork+0x66/0x80 arch/x86/kernel/process.c:147 retfromforkasm+0x11/0x20 arch/x86/entry/entry_64.S:242

Local variable msg created at: _sockxmit+0x4c/0x5c0 drivers/block/nbd.c:513 nbdreadreply drivers/block/nbd.c:732 [inline] recv_work+0x262/0x3100 drivers/block/nbd.c:863

CPU: 1 PID: 7465 Comm: kworker/u5:1 Not tainted 6.7.0-rc7-syzkaller-00041-gf016f7547aee #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Workqueue: nbd5-recv recv_work

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/26xxx/CVE-2024-26638.json"
}
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
f94fd25cb0aaf77fd7453f31c5d394a1a68ecf60
Fixed
d9c54763e5cdbbd3f81868597fe8aca3c96e6387
Fixed
1960f2b534da1e6c65fb96f9e98bda773495f406
Fixed
b0028f333420a65a53a63978522db680b37379dd
Fixed
78fbb92af27d0982634116c7a31065f24d092826

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.19.0
Fixed
6.1.76
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.15
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.7.3