{"id":"CVE-2026-31474","published":"2026-04-22T13:54:03Z","modified":"2026-10-19T18:35:50Z","title":"can: isotp: fix tx.buf use-after-free in isotp_sendmsg()","vendor":"Linux","product":"Linux","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00108,"percentile":0.01235,"provenance":"source"},"cwes":[{"id":"CWE-364","name":"Signal Handler Race Condition"},{"id":"CWE-416","name":"Use After Free"}],"references":[{"url":"https://git.kernel.org/stable/c/cb3d6efa78460e6d50bf68806d0db66265709f64","tags":[]},{"url":"https://git.kernel.org/stable/c/9649d051e54413049c009638ec1dc23962c884a4","tags":[]},{"url":"https://git.kernel.org/stable/c/eec8a1b18a79600bd4419079dc0026c1db72a830","tags":[]},{"url":"https://git.kernel.org/stable/c/2e62e7051eca75a7f2e3d52d62ec10d7d7aa358c","tags":[]},{"url":"https://git.kernel.org/stable/c/424e95d62110cdbc8fd12b40918f37e408e35a92","tags":[]},{"url":"https://access.redhat.com/security/cve/CVE-2026-31474","tags":["vdb-entry","x_refsource_REDHAT"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2460646","tags":["issue-tracking","x_refsource_REDHAT"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31474.json","tags":["x_sadp-csaf-vex"]},{"url":"https://access.redhat.com/errata/RHSA-2026:27731","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:27288","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:27789","tags":["vendor-advisory","x_refsource_REDHAT"]}],"priority":{"score":5.7,"factors":[{"name":"EPSS percentile","points":0.25},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 96d1c81e6a0478535342dff6c730adb076cd84e8, < cb3d6efa78460e6d50bf68806d0db66265709f64",">= 96d1c81e6a0478535342dff6c730adb076cd84e8, < 9649d051e54413049c009638ec1dc23962c884a4",">= 96d1c81e6a0478535342dff6c730adb076cd84e8, < eec8a1b18a79600bd4419079dc0026c1db72a830",">= 96d1c81e6a0478535342dff6c730adb076cd84e8, < 2e62e7051eca75a7f2e3d52d62ec10d7d7aa358c",">= 96d1c81e6a0478535342dff6c730adb076cd84e8, < 424e95d62110cdbc8fd12b40918f37e408e35a92"]},{"vendor":"Linux","product":"Linux","versions":["6.4"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-10-16T15:09:55.947236Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-24827","exploited":false,"provenance":"source"}}