CVE-2024-35944: VMCI: Fix memcpy() run-time warning in dg_dispatch_as_host()

Published May 19, 2024
·
Updated

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

VMCI: Fix memcpy() run-time warning in dgdispatchashost()

Syzkaller hit 'WARNING in dgdispatchashost' bug.

memcpy: detected field-spanning write (size 56) of single field "&dginfo->msg" at drivers/misc/vmwvmci/vmcidatagram.c:237 (size 24)

WARNING: CPU: 0 PID: 1555 at drivers/misc/vmwvmci/vmcidatagram.c:237 dgdispatchashost+0x88e/0xa60 drivers/misc/vmwvmci/vmcidatagram.c:237

Some code commentry, based on my understanding:

544 #define VMCIDGSIZE(dg) (VMCIDGHEADERSIZE + (sizet)(dg)->payloadsize) /// This is 24 + payloadsize

memcpy(&dginfo->msg, dg, dgsize); Destination = dginfo->msg ---> this is a 24 byte structure(struct vmcidatagram) Source = dg --> this is a 24 byte structure (struct vmcidatagram) Size = dgsize = 24 + payloadsize

{payloadsize = 56-24 =32} -- Syzkaller managed to set payloadsize to 32.

35 struct delayeddatagraminfo { 36 struct datagramentry entry; 37 struct workstruct work; 38 bool indghostqueue; 39 / msg and msgpayload must be together. / 40 struct vmcidatagram msg; 41 u8 msgpayload[]; 42 };

So those extra bytes of payload are copied into msgpayload[], a run time warning is seen while fuzzing with Syzkaller.

One possible way to fix the warning is to split the memcpy() into two parts -- one -- direct assignment of msg and second taking care of payload.

Gustavo quoted: "Under FORTIFYSOURCE we should not copy data across multiple members in a structure."

Other sources

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

VMCI: Fix memcpy() run-time warning in dgdispatchashost()

The Linux kernel CVE team has assigned CVE-2024-35944 to this issue.

Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024051920-CVE-2024-35944-a860@gregkh/T

Red Hat

Affected Software

17 affected componentsFixes available
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.25-16.12.27-1
redhat/kernel<4.19.312
4.19.312
redhat/kernel<5.4.274
5.4.274
redhat/kernel<5.10.215
5.10.215
redhat/kernel<5.15.155
5.15.155
redhat/kernel<6.1.86
6.1.86
redhat/kernel<6.6.27
6.6.27
redhat/kernel<6.8.6
6.8.6
redhat/kernel<6.9
6.9
Linux Linux kernel<4.19.312
Linux Linux kernel>=4.20<5.4.274
Linux Linux kernel>=5.5<5.10.215
Linux Linux kernel>=5.11<5.15.155
Linux Linux kernel>=5.16<6.1.86
Linux Linux kernel>=6.2<6.6.27
Linux Linux kernel>=6.7<6.8.6
Debian Debian Linux=10.0

Event History

May 19, 2024
CVE Published
via MITRE·10:10 AM
Data Sourced
via MITRE·10:10 AM
Description
Data Sourced
via NVD·11:15 AM
Description
Data Sourced
via NVD·11:15 AM
RemedySeverityAffected Software
May 20, 2024
Data Sourced
via Red Hat·03:20 PM
DescriptionSeverityAffected Software
Jul 11, 2024
Data Sourced
via Launchpad·07:47 PM
Description
May 5, 2025
Data Sourced
via Ubuntu·12:24 AM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-35944?

CVE-2024-35944 has been categorized with a severity that may lead to runtime warnings affecting the Linux kernel's VMCI subsystem.

2

How do I fix CVE-2024-35944?

To remediate CVE-2024-35944, update the Linux kernel to versions 4.19.312, 5.4.274, 5.10.215, 5.15.155, 6.1.86, 6.6.27, 6.8.6, or 6.9 as specified.

3

Which systems are affected by CVE-2024-35944?

CVE-2024-35944 impacts certain versions of the Linux kernel across various distributions such as Red Hat and Debian.

4

What does the fix for CVE-2024-35944 address?

The fix for CVE-2024-35944 addresses a memcpy runtime warning in the dg_dispatch_as_host function in the Linux kernel.

5

Is it safe to continue using vulnerable versions related to CVE-2024-35944?

It is not safe to continue using vulnerable versions associated with CVE-2024-35944 due to potential runtime warnings and instability issues.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203