{"id":"CVE-2026-31474","aliases":["CVE-2026-31474"],"related":[],"kind":"vulnerability","state":"published","title":"can: isotp: fix tx.buf use-after-free in isotp_sendmsg()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ncan: isotp: fix tx.buf use-after-free in isotp_sendmsg()\n\nisotp_sendmsg() uses only cmpxchg() on so->tx.state to serialize access\nto so->tx.buf. isotp_release() waits for ISOTP_IDLE via\nwait_event_interruptible() and then calls kfree(so->tx.buf).\n\nIf a signal interrupts the wait_event_interruptible() inside close()\nwhile tx.state is ISOTP_SENDING, the loop exits early and release\nproceeds to force ISOTP_SHUTDOWN and continues to kfree(so->tx.buf)\nwhile sendmsg may still be reading so->tx.buf for the final CAN frame\nin isotp_fill_dataframe().\n\nThe so->tx.buf can be allocated once when the standard tx.buf length needs\nto be extended. Move the kfree() of this potentially extended tx.buf to\nsk_destruct time when either isotp_sendmsg() and isotp_release() are done.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ncan: isotp: fix tx.buf use-after-free in isotp_sendmsg()\n\nisotp_sendmsg() uses only cmpxchg() on so->tx.state to serialize access\nto so->tx.buf. isotp_release() waits for ISOTP_IDLE via\nwait_event_interruptible() and then calls kfree(so->tx.buf).\n\nIf a signal interrupts the wait_event_interruptible() inside close()\nwhile tx.state is ISOTP_SENDING, the loop exits early and release\nproceeds to force ISOTP_SHUTDOWN and continues to kfree(so->tx.buf)\nwhile sendmsg may still be reading so->tx.buf for the final CAN frame\nin isotp_fill_dataframe().\n\nThe so->tx.buf can be allocated once when the standard tx.buf length needs\nto be extended. Move the kfree() of this potentially extended tx.buf to\nsk_destruct time when either isotp_sendmsg() and isotp_release() are done.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\ncan: isotp: corregir el uso después de liberación de tx.buf en isotp_sendmsg()\n\nisotp_sendmsg() usa solo cmpxchg() en so  ->  tx.state para serializar el acceso a so  ->  tx.buf. isotp_release() espera por ISOTP_IDLE a través de wait_event_interruptible() y luego llama a kfree(so  ->  tx.buf).\n\nSi una señal interrumpe wait_event_interruptible() dentro de close() mientras tx.state es ISOTP_SENDING, el bucle sale prematuramente y la liberación procede a forzar ISOTP_SHUTDOWN y continúa con kfree(so  ->  tx.buf) mientras sendmsg aún puede estar leyendo so  ->  tx.buf para el frame CAN final en isotp_fill_dataframe().\n\nEl so  ->  tx.buf puede ser asignado una vez cuando la longitud estándar de tx.buf necesita ser extendida. Mover el kfree() de este tx.buf potencialmente extendido al momento de sk_destruct cuando isotp_sendmsg() e isotp_release() hayan terminado.","source":"nvd"}],"published":"2026-04-22T13:54:03.100Z","modified":"2026-11-11T23:10:00.263Z","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":"redhat-SADP","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-364","CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"96d1c81e6a0478535342dff6c730adb076cd84e8","fixed":"cb3d6efa78460e6d50bf68806d0db66265709f64","status":"affected"},{"type":"git","introduced":"96d1c81e6a0478535342dff6c730adb076cd84e8","fixed":"9649d051e54413049c009638ec1dc23962c884a4","status":"affected"},{"type":"git","introduced":"96d1c81e6a0478535342dff6c730adb076cd84e8","fixed":"eec8a1b18a79600bd4419079dc0026c1db72a830","status":"affected"},{"type":"git","introduced":"96d1c81e6a0478535342dff6c730adb076cd84e8","fixed":"2e62e7051eca75a7f2e3d52d62ec10d7d7aa358c","status":"affected"},{"type":"git","introduced":"96d1c81e6a0478535342dff6c730adb076cd84e8","fixed":"424e95d62110cdbc8fd12b40918f37e408e35a92","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.4","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.4","status":"unaffected"},{"type":"semver","introduced":"6.6.131","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.80","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.21","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"6.19.11","lastAffected":"6.19.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.0","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"0:6.12.0-211.26.1.el10_2","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 10","package":"kernel","cpe":"cpe:/o:redhat:enterprise_linux:10.2","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"0:6.12.0-55.82.1.el10_0","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 10.0 Extended Update Support","package":"kernel","cpe":"cpe:/o:redhat:enterprise_linux_eus:10.0","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"0:5.14.0-687.17.1.el9_8","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"kernel","cpe":"cpe:/a:redhat:enterprise_linux:9","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 6","package":"kernel","cpe":"cpe:/o:redhat:enterprise_linux:6","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 7","package":"kernel","cpe":"cpe:/o:redhat:enterprise_linux:7","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 7","package":"kernel-rt","cpe":"cpe:/o:redhat:enterprise_linux:7","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8","package":"kernel","cpe":"cpe:/o:redhat:enterprise_linux:8","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8","package":"kernel-rt","cpe":"cpe:/o:redhat:enterprise_linux:8","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"kernel-rt","cpe":"cpe:/o:redhat:enterprise_linux:9","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.4.1","fixed":"6.6.131"},{"status":"affected","introduced":"6.7","fixed":"6.12.80"},{"status":"affected","introduced":"6.13","fixed":"6.18.21"},{"status":"affected","introduced":"6.19","fixed":"6.19.11"},{"status":"affected","version":"6.4"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/cb3d6efa78460e6d50bf68806d0db66265709f64","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9649d051e54413049c009638ec1dc23962c884a4","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/eec8a1b18a79600bd4419079dc0026c1db72a830","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2e62e7051eca75a7f2e3d52d62ec10d7d7aa358c","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/424e95d62110cdbc8fd12b40918f37e408e35a92","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-31474","tags":["vdb-entry","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2460646","tags":["issue-tracking","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31474.json","tags":["x-sadp-csaf-vex"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:27731","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:27288","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:27789","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-10-16T15:09:55.947Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31474","url":"https://www.cve.org/CVERecord?id=CVE-2026-31474","licence":"CVE Terms of Use","modified":"2026-10-19T18:35:50.370Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31474","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31474","licence":"Public domain","modified":"2026-11-11T23:10:00.263Z"}],"updatedAt":"2026-11-25T22:59:19.280Z","epss":{"score":0.00147,"percentile":0.02004,"date":"2026-11-29T12:00:22.000Z"}}