{"id":"CVE-2026-23206","aliases":["CVE-2026-23206"],"related":[],"kind":"vulnerability","state":"published","title":"dpaa2-switch: prevent ZERO_SIZE_PTR dereference when num_ifs is zero","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ndpaa2-switch: prevent ZERO_SIZE_PTR dereference when num_ifs is zero\n\nThe driver allocates arrays for ports, FDBs, and filter blocks using\nkcalloc() with ethsw->sw_attr.num_ifs as the element count. When the\ndevice reports zero interfaces (either due to hardware configuration\nor firmware issues), kcalloc(0, ...) returns ZERO_SIZE_PTR (0x10)\ninstead of NULL.\n\nLater in dpaa2_switch_probe(), the NAPI initialization unconditionally\naccesses ethsw->ports[0]->netdev, which attempts to dereference\nZERO_SIZE_PTR (address 0x10), resulting in a kernel panic.\n\nAdd a check to ensure num_ifs is greater than zero after retrieving\ndevice attributes. This prevents the zero-sized allocations and\nsubsequent invalid pointer dereference.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ndpaa2-switch: prevent ZERO_SIZE_PTR dereference when num_ifs is zero\n\nThe driver allocates arrays for ports, FDBs, and filter blocks using\nkcalloc() with ethsw->sw_attr.num_ifs as the element count. When the\ndevice reports zero interfaces (either due to hardware configuration\nor firmware issues), kcalloc(0, ...) returns ZERO_SIZE_PTR (0x10)\ninstead of NULL.\n\nLater in dpaa2_switch_probe(), the NAPI initialization unconditionally\naccesses ethsw->ports[0]->netdev, which attempts to dereference\nZERO_SIZE_PTR (address 0x10), resulting in a kernel panic.\n\nAdd a check to ensure num_ifs is greater than zero after retrieving\ndevice attributes. This prevents the zero-sized allocations and\nsubsequent invalid pointer dereference.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\ndpaa2-switch: evitar la desreferencia de ZERO_SIZE_PTR cuando num_ifs es cero\n\nEl controlador asigna arreglos para puertos, FDBs y bloques de filtro usando kcalloc() con ethsw-&gt;sw_attr.num_ifs como el recuento de elementos. Cuando el dispositivo reporta cero interfaces (ya sea debido a la configuración del hardware o a problemas de firmware), kcalloc(0, ...) devuelve ZERO_SIZE_PTR (0x10) en lugar de NULL.\n\nMás tarde en dpaa2_switch_probe(), la inicialización de NAPI accede incondicionalmente a ethsw-&gt;ports[0]-&gt;netdev, lo que intenta desreferenciar ZERO_SIZE_PTR (dirección 0x10), resultando en un pánico del kernel.\n\nAñadir una verificación para asegurar que num_ifs sea mayor que cero después de recuperar los atributos del dispositivo. Esto evita las asignaciones de tamaño cero y la subsiguiente desreferencia de puntero inválido.","source":"nvd"}],"published":"2026-02-14T16:27:29.095Z","modified":"2026-11-05T22:18:06.850Z","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":["CWE-476"],"affected":[{"ranges":[{"type":"git","introduced":"0b1b71370458860579831e77485883fcf2e8fbbe","fixed":"2fcccca88456b592bd668db13aa1d29ed257ca2b","status":"affected"},{"type":"git","introduced":"0b1b71370458860579831e77485883fcf2e8fbbe","fixed":"80165ff16051448d6f840585ebe13f2400415df3","status":"affected"},{"type":"git","introduced":"0b1b71370458860579831e77485883fcf2e8fbbe","fixed":"b97415c4362f739e25ec6f71012277086fabdf6f","status":"affected"},{"type":"git","introduced":"0b1b71370458860579831e77485883fcf2e8fbbe","fixed":"4acc40db06ffd0fd92683505342b00c8a7394c60","status":"affected"},{"type":"git","introduced":"0b1b71370458860579831e77485883fcf2e8fbbe","fixed":"155eb99aff2920153bf21217ae29565fff81e6af","status":"affected"},{"type":"git","introduced":"0b1b71370458860579831e77485883fcf2e8fbbe","fixed":"ed48a84a72fefb20a82dd90a7caa7807e90c6f66","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.13","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.13","status":"unaffected"},{"type":"semver","introduced":"5.15.200","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.163","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.124","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.70","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.10","lastAffected":"6.18.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.19","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":"5.13","fixed":"5.15.200"},{"status":"affected","introduced":"5.16","fixed":"6.1.163"},{"status":"affected","introduced":"6.2","fixed":"6.6.124"},{"status":"affected","introduced":"6.7","fixed":"6.12.70"},{"status":"affected","introduced":"6.13","fixed":"6.18.10"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/2fcccca88456b592bd668db13aa1d29ed257ca2b","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/80165ff16051448d6f840585ebe13f2400415df3","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b97415c4362f739e25ec6f71012277086fabdf6f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4acc40db06ffd0fd92683505342b00c8a7394c60","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/155eb99aff2920153bf21217ae29565fff81e6af","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ed48a84a72fefb20a82dd90a7caa7807e90c6f66","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-05T21:22:17.004Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-23206","url":"https://www.cve.org/CVERecord?id=CVE-2026-23206","licence":"CVE Terms of Use","modified":"2026-11-05T21:23:21.989Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-23206","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-23206","licence":"Public domain","modified":"2026-11-05T22:18:06.850Z"}],"updatedAt":"2026-11-25T22:59:13.921Z","epss":{"score":0.00137,"percentile":0.03332,"date":"2026-12-01T12:00:22.000Z"}}