{"id":"CVE-2024-40970","aliases":["CVE-2024-40970"],"related":[],"kind":"vulnerability","state":"published","title":"Avoid hw_desc array overrun in dw-axi-dmac","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nAvoid hw_desc array overrun in dw-axi-dmac\n\nI have a use case where nr_buffers = 3 and in which each descriptor is composed by 3\nsegments, resulting in the DMA channel descs_allocated to be 9. Since axi_desc_put()\nhandles the hw_desc considering the descs_allocated, this scenario would result in a\nkernel panic (hw_desc array will be overrun).\n\nTo fix this, the proposal is to add a new member to the axi_dma_desc structure,\nwhere we keep the number of allocated hw_descs (axi_desc_alloc()) and use it in\naxi_desc_put() to handle the hw_desc array correctly.\n\nAdditionally I propose to remove the axi_chan_start_first_queued() call after completing\nthe transfer, since it was identified that unbalance can occur (started descriptors can\nbe interrupted and transfer ignored due to DMA channel not being enabled).","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nAvoid hw_desc array overrun in dw-axi-dmac\n\nI have a use case where nr_buffers = 3 and in which each descriptor is composed by 3\nsegments, resulting in the DMA channel descs_allocated to be 9. Since axi_desc_put()\nhandles the hw_desc considering the descs_allocated, this scenario would result in a\nkernel panic (hw_desc array will be overrun).\n\nTo fix this, the proposal is to add a new member to the axi_dma_desc structure,\nwhere we keep the number of allocated hw_descs (axi_desc_alloc()) and use it in\naxi_desc_put() to handle the hw_desc array correctly.\n\nAdditionally I propose to remove the axi_chan_start_first_queued() call after completing\nthe transfer, since it was identified that unbalance can occur (started descriptors can\nbe interrupted and transfer ignored due to DMA channel not being enabled).","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: Evitar la saturación de la matriz hw_desc en dw-axi-dmac. Tengo un caso de uso donde nr_buffers = 3 y en el que cada descriptor está compuesto por 3 segmentos, lo que da como resultado que el canal DMA descs_allocated sea 9. Dado que axi_desc_put() maneja hw_desc considerando descs_allocated, este escenario provocaría un pánico en el kernel (la matriz hw_desc se desbordará). Para solucionar este problema, la propuesta es agregar un nuevo miembro a la estructura axi_dma_desc, donde mantenemos el número de hw_descs asignados (axi_desc_alloc()) y lo usamos en axi_desc_put() para manejar la matriz hw_desc correctamente. Además, propongo eliminar la llamada axi_chan_start_first_queued() después de completar la transferencia, ya que se identificó que puede ocurrir un desequilibrio (los descriptores iniciados pueden interrumpirse y la transferencia se ignora debido a que el canal DMA no está habilitado).","source":"nvd"}],"published":"2024-07-12T12:32:08.788Z","modified":"2026-08-05T11:34:18.464Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"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":"ef6fb2d6f1abd56cc067c694253ea362159b5ac3","fixed":"7c3bb96a20cd8db3b8824b2ff08b6cde4505c7e5","status":"affected"},{"type":"git","introduced":"ef6fb2d6f1abd56cc067c694253ea362159b5ac3","fixed":"dd42570018f5962c10f215ad9c21274ed5d3541e","status":"affected"},{"type":"git","introduced":"ef6fb2d6f1abd56cc067c694253ea362159b5ac3","fixed":"e151ae1ee065cf4b8ce4394ddb9d9c8df6370c66","status":"affected"},{"type":"git","introduced":"ef6fb2d6f1abd56cc067c694253ea362159b5ac3","fixed":"9004784e8d68bcd1ac1376407ba296fa28f04dbe","status":"affected"},{"type":"git","introduced":"ef6fb2d6f1abd56cc067c694253ea362159b5ac3","fixed":"333e11bf47fa8d477db90e2900b1ed3c9ae9b697","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.12","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.12","status":"unaffected"},{"type":"semver","introduced":"5.15.162","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.96","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.36","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.9.7","lastAffected":"6.9.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.10","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":"5.15.162"},{"status":"affected","introduced":"5.16","fixed":"6.1.96"},{"status":"affected","introduced":"6.2","fixed":"6.6.36"},{"status":"affected","introduced":"6.7","fixed":"6.9.7"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/7c3bb96a20cd8db3b8824b2ff08b6cde4505c7e5","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/dd42570018f5962c10f215ad9c21274ed5d3541e","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e151ae1ee065cf4b8ce4394ddb9d9c8df6370c66","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9004784e8d68bcd1ac1376407ba296fa28f04dbe","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/333e11bf47fa8d477db90e2900b1ed3c9ae9b697","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-10T17:02:57.618Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-40970","url":"https://www.cve.org/CVERecord?id=CVE-2024-40970","licence":"CVE Terms of Use","modified":"2026-08-05T11:34:18.464Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-40970","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-40970","licence":"Public domain","modified":"2026-08-04T11:19:10.600Z"}],"updatedAt":"2026-11-25T22:58:42.867Z","epss":{"score":0.00301,"percentile":0.24574,"date":"2026-12-01T12:00:22.000Z"}}