{"id":"CVE-2025-38538","aliases":["CVE-2025-38538"],"related":[],"kind":"vulnerability","state":"published","title":"dmaengine: nbpfaxi: Fix memory corruption in probe()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ndmaengine: nbpfaxi: Fix memory corruption in probe()\n\nThe nbpf->chan[] array is allocated earlier in the nbpf_probe() function\nand it has \"num_channels\" elements.  These three loops iterate one\nelement farther than they should and corrupt memory.\n\nThe changes to the second loop are more involved.  In this case, we're\ncopying data from the irqbuf[] array into the nbpf->chan[] array.  If\nthe data in irqbuf[i] is the error IRQ then we skip it, so the iterators\nare not in sync.  I added a check to ensure that we don't go beyond the\nend of the irqbuf[] array.  I'm pretty sure this can't happen, but it\nseemed harmless to add a check.\n\nOn the other hand, after the loop has ended there is a check to ensure\nthat the \"chan\" iterator is where we expect it to be.  In the original\ncode we went one element beyond the end of the array so the iterator\nwasn't in the correct place and it would always return -EINVAL.  However,\nnow it will always be in the correct place.  I deleted the check since\nwe know the result.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ndmaengine: nbpfaxi: Fix memory corruption in probe()\n\nThe nbpf->chan[] array is allocated earlier in the nbpf_probe() function\nand it has \"num_channels\" elements.  These three loops iterate one\nelement farther than they should and corrupt memory.\n\nThe changes to the second loop are more involved.  In this case, we're\ncopying data from the irqbuf[] array into the nbpf->chan[] array.  If\nthe data in irqbuf[i] is the error IRQ then we skip it, so the iterators\nare not in sync.  I added a check to ensure that we don't go beyond the\nend of the irqbuf[] array.  I'm pretty sure this can't happen, but it\nseemed harmless to add a check.\n\nOn the other hand, after the loop has ended there is a check to ensure\nthat the \"chan\" iterator is where we expect it to be.  In the original\ncode we went one element beyond the end of the array so the iterator\nwasn't in the correct place and it would always return -EINVAL.  However,\nnow it will always be in the correct place.  I deleted the check since\nwe know the result.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: dmaengine: nbpfaxi: Corrección de corrupción de memoria en probe(). La matriz nbpf-&gt;chan[] se asigna antes en la función nbpf_probe() y contiene elementos \"num_channels\". Estos tres bucles iteran un elemento más allá de lo debido y corrompen la memoria. Los cambios en el segundo bucle son más complejos. En este caso, copiamos datos de la matriz irqbuf[] a la matriz nbpf-&gt;chan[]. Si los datos en irqbuf[i] corresponden a la IRQ de error, la omitimos, por lo que los iteradores no están sincronizados. Añadí una comprobación para asegurar que no se sobrepase el final de la matriz irqbuf[]. Estoy bastante seguro de que esto no puede ocurrir, pero añadir una comprobación parecía inofensivo. Por otro lado, una vez finalizado el bucle, se realiza una comprobación para asegurar que el iterador \"chan\" esté donde esperamos. En el código original, nos extendimos un elemento más allá del final del array, por lo que el iterador no estaba en la posición correcta y siempre devolvía -EINVAL. Sin embargo, ahora siempre estará en la posición correcta. Eliminé la comprobación, ya que conocemos el resultado.","source":"nvd"}],"published":"2025-08-16T11:12:30.878Z","modified":"2026-06-17T09:17:04.103Z","severity":{"scorer":"NVD","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":"NVD","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"}],"cwes":["CWE-787"],"affected":[{"ranges":[{"type":"git","introduced":"b45b262cefd5b8eb2ba88d20e5bd295881293894","fixed":"84fff8e6f11b9af1407e273995b5257d99ff0cff","status":"affected"},{"type":"git","introduced":"b45b262cefd5b8eb2ba88d20e5bd295881293894","fixed":"aec396b4f736f3f8d2c28a9cd2924a4ada57ae87","status":"affected"},{"type":"git","introduced":"b45b262cefd5b8eb2ba88d20e5bd295881293894","fixed":"24861ef8b517a309a4225f2793be0cd8fa0bec9e","status":"affected"},{"type":"git","introduced":"b45b262cefd5b8eb2ba88d20e5bd295881293894","fixed":"f366b36c5e3ce29c9a3c8eed3d1631908e4fc8bb","status":"affected"},{"type":"git","introduced":"b45b262cefd5b8eb2ba88d20e5bd295881293894","fixed":"4bb016438335ec02b01f96bf1367378c2bfe03e5","status":"affected"},{"type":"git","introduced":"b45b262cefd5b8eb2ba88d20e5bd295881293894","fixed":"122160289adf8ebf15060f1cbf6265b55a914948","status":"affected"},{"type":"git","introduced":"b45b262cefd5b8eb2ba88d20e5bd295881293894","fixed":"d6bbd67ab5de37a74ac85c83c5a26664b62034dd","status":"affected"},{"type":"git","introduced":"b45b262cefd5b8eb2ba88d20e5bd295881293894","fixed":"188c6ba1dd925849c5d94885c8bbdeb0b3dcf510","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.17","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.17","status":"unaffected"},{"type":"semver","introduced":"5.4.297","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.241","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.190","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.147","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.100","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.40","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.15.8","lastAffected":"6.15.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.16","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","introduced":"3.17","fixed":"5.4.297"},{"status":"affected","introduced":"5.5","fixed":"5.10.241"},{"status":"affected","introduced":"5.11","fixed":"5.15.190"},{"status":"affected","introduced":"5.16","fixed":"6.1.147"},{"status":"affected","introduced":"6.2","fixed":"6.6.100"},{"status":"affected","introduced":"6.7","fixed":"6.12.40"},{"status":"affected","introduced":"6.13","fixed":"6.15.8"},{"status":"affected","version":"6.16"},{"status":"affected","version":"6.16"},{"status":"affected","version":"6.16"},{"status":"affected","version":"6.16"},{"status":"affected","version":"6.16"},{"status":"affected","version":"6.16"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"11.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/84fff8e6f11b9af1407e273995b5257d99ff0cff","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/aec396b4f736f3f8d2c28a9cd2924a4ada57ae87","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/24861ef8b517a309a4225f2793be0cd8fa0bec9e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f366b36c5e3ce29c9a3c8eed3d1631908e4fc8bb","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4bb016438335ec02b01f96bf1367378c2bfe03e5","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/122160289adf8ebf15060f1cbf6265b55a914948","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d6bbd67ab5de37a74ac85c83c5a26664b62034dd","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/188c6ba1dd925849c5d94885c8bbdeb0b3dcf510","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","tags":["mailing-list","third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html","tags":["mailing-list","third-party-advisory"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-38538","url":"https://www.cve.org/CVERecord?id=CVE-2025-38538","licence":"CVE Terms of Use","modified":"2026-05-11T21:29:57.690Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-38538","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38538","licence":"Public domain","modified":"2026-06-17T09:17:04.103Z"}],"updatedAt":"2026-11-25T22:59:02.634Z","epss":{"score":0.00311,"percentile":0.16458,"date":"2026-11-30T12:00:22.000Z"}}