{"id":"CVE-2025-38665","aliases":["CVE-2025-38665"],"related":[],"kind":"vulnerability","state":"published","title":"can: netlink: can_changelink(): fix NULL pointer deref of struct can_priv::do_set_mode","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ncan: netlink: can_changelink(): fix NULL pointer deref of struct can_priv::do_set_mode\n\nAndrei Lalaev reported a NULL pointer deref when a CAN device is\nrestarted from Bus Off and the driver does not implement the struct\ncan_priv::do_set_mode callback.\n\nThere are 2 code path that call struct can_priv::do_set_mode:\n- directly by a manual restart from the user space, via\n  can_changelink()\n- delayed automatic restart after bus off (deactivated by default)\n\nTo prevent the NULL pointer deference, refuse a manual restart or\nconfigure the automatic restart delay in can_changelink() and report\nthe error via extack to user space.\n\nAs an additional safety measure let can_restart() return an error if\ncan_priv::do_set_mode is not set instead of dereferencing it\nunchecked.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ncan: netlink: can_changelink(): fix NULL pointer deref of struct can_priv::do_set_mode\n\nAndrei Lalaev reported a NULL pointer deref when a CAN device is\nrestarted from Bus Off and the driver does not implement the struct\ncan_priv::do_set_mode callback.\n\nThere are 2 code path that call struct can_priv::do_set_mode:\n- directly by a manual restart from the user space, via\n  can_changelink()\n- delayed automatic restart after bus off (deactivated by default)\n\nTo prevent the NULL pointer deference, refuse a manual restart or\nconfigure the automatic restart delay in can_changelink() and report\nthe error via extack to user space.\n\nAs an additional safety measure let can_restart() return an error if\ncan_priv::do_set_mode is not set instead of dereferencing it\nunchecked.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: can: netlink: can_changelink(): corrige la desreferencia del puntero NULL de struct can_priv::do_set_mode Andrei Lalaev informó de una desreferencia del puntero NULL cuando un dispositivo CAN se reinicia desde Bus Off y el controlador no implementa la devolución de llamada struct can_priv::do_set_mode. Hay 2 rutas de código que llaman a struct can_priv::do_set_mode: - directamente mediante un reinicio manual desde el espacio de usuario, a través de can_changelink() - reinicio automático retrasado después de apagar el bus (desactivado de forma predeterminada) Para evitar la deferencia del puntero NULL, rechace un reinicio manual o configure el retraso del reinicio automático en can_changelink() e informe del error a través de extack al espacio de usuario. Como medida de seguridad adicional, deje que can_restart() devuelva un error si can_priv::do_set_mode no está configurado en lugar de desreferenciarlo sin marcar.","source":"nvd"}],"published":"2025-08-22T16:02:57.458Z","modified":"2026-11-05T22:17:22.847Z","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":"39549eef3587f1c1e8c65c88a2400d10fd30ea17","fixed":"6bbcf37c5114926c99a1d1e6993a5b35689d2599","status":"affected"},{"type":"git","introduced":"39549eef3587f1c1e8c65c88a2400d10fd30ea17","fixed":"cf81a60a973358dea163f6b14062f17831ceb894","status":"affected"},{"type":"git","introduced":"39549eef3587f1c1e8c65c88a2400d10fd30ea17","fixed":"0ca816a96fdcf32644c80cbe7a82c7b6ce6ddda5","status":"affected"},{"type":"git","introduced":"39549eef3587f1c1e8c65c88a2400d10fd30ea17","fixed":"6acceb46180f9e160d4f0c56fcaf39ba562822ae","status":"affected"},{"type":"git","introduced":"39549eef3587f1c1e8c65c88a2400d10fd30ea17","fixed":"c1f3f9797c1f44a762e6f5f72520b2e520537b52","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.31","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.31","status":"unaffected"},{"type":"semver","introduced":"6.1.148","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.101","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.41","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.15.9","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":"2.6.31","fixed":"6.1.148"},{"status":"affected","introduced":"6.2","fixed":"6.6.101"},{"status":"affected","introduced":"6.7","fixed":"6.12.41"},{"status":"affected","introduced":"6.13","fixed":"6.15.9"},{"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"},{"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/6bbcf37c5114926c99a1d1e6993a5b35689d2599","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cf81a60a973358dea163f6b14062f17831ceb894","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0ca816a96fdcf32644c80cbe7a82c7b6ce6ddda5","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6acceb46180f9e160d4f0c56fcaf39ba562822ae","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c1f3f9797c1f44a762e6f5f72520b2e520537b52","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","tags":["third-party-advisory"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-05T21:06:10.332Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-38665","url":"https://www.cve.org/CVERecord?id=CVE-2025-38665","licence":"CVE Terms of Use","modified":"2026-11-05T21:12:51.130Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-38665","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38665","licence":"Public domain","modified":"2026-11-05T22:17:22.847Z"}],"updatedAt":"2026-11-25T22:59:03.551Z","epss":{"score":0.00265,"percentile":0.11355,"date":"2026-11-30T12:00:22.000Z"}}