{"id":"CVE-2024-35944","aliases":["CVE-2024-35944"],"related":[],"kind":"vulnerability","state":"published","title":"VMCI: Fix memcpy() run-time warning in dg_dispatch_as_host()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nVMCI: Fix memcpy() run-time warning in dg_dispatch_as_host()\n\nSyzkaller hit 'WARNING in dg_dispatch_as_host' bug.\n\nmemcpy: detected field-spanning write (size 56) of single field \"&dg_info->msg\"\nat drivers/misc/vmw_vmci/vmci_datagram.c:237 (size 24)\n\nWARNING: CPU: 0 PID: 1555 at drivers/misc/vmw_vmci/vmci_datagram.c:237\ndg_dispatch_as_host+0x88e/0xa60 drivers/misc/vmw_vmci/vmci_datagram.c:237\n\nSome code commentry, based on my understanding:\n\n544 #define VMCI_DG_SIZE(_dg) (VMCI_DG_HEADERSIZE + (size_t)(_dg)->payload_size)\n/// This is 24 + payload_size\n\nmemcpy(&dg_info->msg, dg, dg_size);\n\tDestination = dg_info->msg ---> this is a 24 byte\n\t\t\t\t\tstructure(struct vmci_datagram)\n\tSource = dg --> this is a 24 byte structure (struct vmci_datagram)\n\tSize = dg_size = 24 + payload_size\n\n{payload_size = 56-24 =32} -- Syzkaller managed to set payload_size to 32.\n\n 35 struct delayed_datagram_info {\n 36         struct datagram_entry *entry;\n 37         struct work_struct work;\n 38         bool in_dg_host_queue;\n 39         /* msg and msg_payload must be together. */\n 40         struct vmci_datagram msg;\n 41         u8 msg_payload[];\n 42 };\n\nSo those extra bytes of payload are copied into msg_payload[], a run time\nwarning is seen while fuzzing with Syzkaller.\n\nOne possible way to fix the warning is to split the memcpy() into\ntwo parts -- one -- direct assignment of msg and second taking care of payload.\n\nGustavo quoted:\n\"Under FORTIFY_SOURCE we should not copy data across multiple members\nin a structure.\"","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nVMCI: Fix memcpy() run-time warning in dg_dispatch_as_host()\n\nSyzkaller hit 'WARNING in dg_dispatch_as_host' bug.\n\nmemcpy: detected field-spanning write (size 56) of single field \"&dg_info->msg\"\nat drivers/misc/vmw_vmci/vmci_datagram.c:237 (size 24)\n\nWARNING: CPU: 0 PID: 1555 at drivers/misc/vmw_vmci/vmci_datagram.c:237\ndg_dispatch_as_host+0x88e/0xa60 drivers/misc/vmw_vmci/vmci_datagram.c:237\n\nSome code commentry, based on my understanding:\n\n544 #define VMCI_DG_SIZE(_dg) (VMCI_DG_HEADERSIZE + (size_t)(_dg)->payload_size)\n/// This is 24 + payload_size\n\nmemcpy(&dg_info->msg, dg, dg_size);\n\tDestination = dg_info->msg ---> this is a 24 byte\n\t\t\t\t\tstructure(struct vmci_datagram)\n\tSource = dg --> this is a 24 byte structure (struct vmci_datagram)\n\tSize = dg_size = 24 + payload_size\n\n{payload_size = 56-24 =32} -- Syzkaller managed to set payload_size to 32.\n\n 35 struct delayed_datagram_info {\n 36         struct datagram_entry *entry;\n 37         struct work_struct work;\n 38         bool in_dg_host_queue;\n 39         /* msg and msg_payload must be together. */\n 40         struct vmci_datagram msg;\n 41         u8 msg_payload[];\n 42 };\n\nSo those extra bytes of payload are copied into msg_payload[], a run time\nwarning is seen while fuzzing with Syzkaller.\n\nOne possible way to fix the warning is to split the memcpy() into\ntwo parts -- one -- direct assignment of msg and second taking care of payload.\n\nGustavo quoted:\n\"Under FORTIFY_SOURCE we should not copy data across multiple members\nin a structure.\"","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se resolvió la siguiente vulnerabilidad: VMCI: corrigió la advertencia de tiempo de ejecución de memcpy() en dg_dispatch_as_host() Syzkaller presionó el error 'ADVERTENCIA en dg_dispatch_as_host'. memcpy: se detectó escritura que abarca todos los campos (tamaño 56) de un solo campo \"&amp;dg_info-&gt;msg\" en drivers/misc/vmw_vmci/vmci_datagram.c:237 (tamaño 24) ADVERTENCIA: CPU: 0 PID: 1555 en drivers/misc/vmw_vmci /vmci_datagram.c:237 dg_dispatch_as_host+0x88e/0xa60 drivers/misc/vmw_vmci/vmci_datagram.c:237 Algunos comentarios de código, según tengo entendido: 544 #define VMCI_DG_SIZE(_dg) (VMCI_DG_HEADERSIZE + (size_t)(_dg)-&gt;payload_size ) /// Esto es 24 + payload_size memcpy(&amp;dg_info-&gt;msg, dg, dg_size); Destino = dg_info-&gt;msg ---&gt; esta es una estructura de 24 bytes (struct vmci_datagram) Fuente = dg --&gt; esta es una estructura de 24 bytes (struct vmci_datagram) Tamaño = dg_size = 24 + payload_size {payload_size = 56-24 = 32} -- Syzkaller logró establecer payload_size en 32. 35 struct delay_datagram_info { 36 struct datagram_entry *entry; 37 struct work_struct work; 38 bool in_dg_host_queue; 39 /* msg y msg_payload deben estar juntos. */ 40 struct vmci_datagram mensaje; 41 u8 msg_payload[]; 42}; Entonces, esos bytes adicionales de payload se copian en msg_payload[], se ve una advertencia de tiempo de ejecución mientras se utiliza Syzkaller. Una forma posible de solucionar la advertencia es dividir memcpy() en dos partes: una, asignación directa del mensaje y la segunda, encargada del payload. Gustavo citó: \"Bajo FORTIFY_SOURCE no debemos copiar datos entre varios miembros de una estructura\".","source":"nvd"}],"published":"2024-05-19T10:10:48.183Z","modified":"2026-10-15T01:17:54.707Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"a110b7ebb9c674a2b591af2780dd512ad0198d50","fixed":"e87bb99d2df6512d8ee37a5d63d2ca9a39a8c051","status":"affected"},{"type":"git","introduced":"a110b7ebb9c674a2b591af2780dd512ad0198d50","fixed":"f15eca95138b3d4ec17b63c3c1937b0aa0d3624b","status":"affected"},{"type":"git","introduced":"a110b7ebb9c674a2b591af2780dd512ad0198d50","fixed":"ad78c5047dc4076d0b3c4fad4f42ffe9c86e8100","status":"affected"},{"type":"git","introduced":"a110b7ebb9c674a2b591af2780dd512ad0198d50","fixed":"130b0cd064874e0d0f58e18fb00e6f3993e90c74","status":"affected"},{"type":"git","introduced":"a110b7ebb9c674a2b591af2780dd512ad0198d50","fixed":"feacd430b42bbfa9ab3ed9e4f38b86c43e348c75","status":"affected"},{"type":"git","introduced":"a110b7ebb9c674a2b591af2780dd512ad0198d50","fixed":"dae70a57565686f16089737adb8ac64471570f73","status":"affected"},{"type":"git","introduced":"a110b7ebb9c674a2b591af2780dd512ad0198d50","fixed":"491a1eb07c2bd8841d63cb5263455e185be5866f","status":"affected"},{"type":"git","introduced":"a110b7ebb9c674a2b591af2780dd512ad0198d50","fixed":"19b070fefd0d024af3daa7329cbc0d00de5302ec","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.9","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.9","status":"unaffected"},{"type":"semver","introduced":"4.19.312","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.274","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.215","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.155","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.86","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.27","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.8.6","lastAffected":"6.8.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.9","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"4.19.312"},{"status":"affected","introduced":"4.20","fixed":"5.4.274"},{"status":"affected","introduced":"5.5","fixed":"5.10.215"},{"status":"affected","introduced":"5.11","fixed":"5.15.155"},{"status":"affected","introduced":"5.16","fixed":"6.1.86"},{"status":"affected","introduced":"6.2","fixed":"6.6.27"},{"status":"affected","introduced":"6.7","fixed":"6.8.6"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"10.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/e87bb99d2df6512d8ee37a5d63d2ca9a39a8c051","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f15eca95138b3d4ec17b63c3c1937b0aa0d3624b","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ad78c5047dc4076d0b3c4fad4f42ffe9c86e8100","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/130b0cd064874e0d0f58e18fb00e6f3993e90c74","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/feacd430b42bbfa9ab3ed9e4f38b86c43e348c75","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/dae70a57565686f16089737adb8ac64471570f73","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/491a1eb07c2bd8841d63cb5263455e185be5866f","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/19b070fefd0d024af3daa7329cbc0d00de5302ec","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html","tags":["mailing-list","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html","tags":["mailing-list","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-398330.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-265688.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-05-20T14:30:02.800Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-35944","url":"https://www.cve.org/CVERecord?id=CVE-2024-35944","licence":"CVE Terms of Use","modified":"2026-10-15T00:41:37.801Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-35944","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-35944","licence":"Public domain","modified":"2026-10-15T01:17:54.707Z"}],"updatedAt":"2026-11-25T22:58:40.615Z","epss":{"score":0.00234,"percentile":0.1538,"date":"2026-12-01T12:00:22.000Z"}}