{"id":"CVE-2026-31474","revision":"08cb5051e106463b9b78a4c4897f32c0","records":[{"revision":"08cb5051e106463b9b78a4c4897f32c0","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-31474","aliases":[],"title":"can: isotp: fix tx.buf use-after-free in isotp_sendmsg()","description":"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.","state":0,"publishedAt":"2026-04-22T13:54:03.1+00:00","modifiedAt":"2026-10-19T18:35:50.37+00:00","affected":[{"ecosystem":"Vendor product","name":"Linux","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"Linux\",\n                    \"vendor\": \"Linux\",\n                    \"defaultStatus\": \"unaffected\",\n                    \"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\n                    \"programFiles\": [\n                        \"net/can/isotp.c\"\n                    ],\n                    \"versions\": [\n                        {\n                            \"version\": \"96d1c81e6a0478535342dff6c730adb076cd84e8\",\n                            \"lessThan\": \"cb3d6efa78460e6d50bf68806d0db66265709f64\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"96d1c81e6a0478535342dff6c730adb076cd84e8\",\n                            \"lessThan\": \"9649d051e54413049c009638ec1dc23962c884a4\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"96d1c81e6a0478535342dff6c730adb076cd84e8\",\n                            \"lessThan\": \"eec8a1b18a79600bd4419079dc0026c1db72a830\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"96d1c81e6a0478535342dff6c730adb076cd84e8\",\n                            \"lessThan\": \"2e62e7051eca75a7f2e3d52d62ec10d7d7aa358c\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"96d1c81e6a0478535342dff6c730adb076cd84e8\",\n                            \"lessThan\": \"424e95d62110cdbc8fd12b40918f37e408e35a92\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        }\n                    ]\n                }"},{"ecosystem":"Vendor product","name":"Linux","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"Linux\",\n                    \"vendor\": \"Linux\",\n                    \"defaultStatus\": \"affected\",\n                    \"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\n                    \"programFiles\": [\n                        \"net/can/isotp.c\"\n                    ],\n                    \"versions\": [\n                        {\n                            \"version\": \"6.4\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \"0\",\n                            \"lessThan\": \"6.4\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.6.131\",\n                            \"lessThanOrEqual\": \"6.6.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.12.80\",\n                            \"lessThanOrEqual\": \"6.12.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.18.21\",\n                            \"lessThanOrEqual\": \"6.18.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.19.11\",\n                            \"lessThanOrEqual\": \"6.19.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"7.0\",\n                            \"lessThanOrEqual\": \"*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"original_commit_for_fix\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"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,"severity":"HIGH"}],"references":["https://git.kernel.org/stable/c/cb3d6efa78460e6d50bf68806d0db66265709f64","https://git.kernel.org/stable/c/9649d051e54413049c009638ec1dc23962c884a4","https://git.kernel.org/stable/c/eec8a1b18a79600bd4419079dc0026c1db72a830","https://git.kernel.org/stable/c/2e62e7051eca75a7f2e3d52d62ec10d7d7aa358c","https://git.kernel.org/stable/c/424e95d62110cdbc8fd12b40918f37e408e35a92"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-31474","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-31474","identifiers":["CVE-2026-31474"]},"retained":false,"historicalAffected":[]}],"coverage":[]}