{"id":"CVE-2025-39873","aliases":["CVE-2025-39873"],"related":[],"kind":"vulnerability","state":"published","title":"can: xilinx_can: xcan_write_frame(): fix use-after-free of transmitted SKB","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ncan: xilinx_can: xcan_write_frame(): fix use-after-free of transmitted SKB\n\ncan_put_echo_skb() takes ownership of the SKB and it may be freed\nduring or after the call.\n\nHowever, xilinx_can xcan_write_frame() keeps using SKB after the call.\n\nFix that by only calling can_put_echo_skb() after the code is done\ntouching the SKB.\n\nThe tx_lock is held for the entire xcan_write_frame() execution and\nalso on the can_get_echo_skb() side so the order of operations does not\nmatter.\n\nAn earlier fix commit 3d3c817c3a40 (\"can: xilinx_can: Fix usage of skb\nmemory\") did not move the can_put_echo_skb() call far enough.\n\n[mkl: add \"commit\" in front of sha1 in patch description]\n[mkl: fix indention]","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ncan: xilinx_can: xcan_write_frame(): fix use-after-free of transmitted SKB\n\ncan_put_echo_skb() takes ownership of the SKB and it may be freed\nduring or after the call.\n\nHowever, xilinx_can xcan_write_frame() keeps using SKB after the call.\n\nFix that by only calling can_put_echo_skb() after the code is done\ntouching the SKB.\n\nThe tx_lock is held for the entire xcan_write_frame() execution and\nalso on the can_get_echo_skb() side so the order of operations does not\nmatter.\n\nAn earlier fix commit 3d3c817c3a40 (\"can: xilinx_can: Fix usage of skb\nmemory\") did not move the can_put_echo_skb() call far enough.\n\n[mkl: add \"commit\" in front of sha1 in patch description]\n[mkl: fix indention]","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\ncan: xilinx_can: xcan_write_frame(): corregir uso después de liberación del SKB transmitido\n\ncan_put_echo_skb() toma posesión del SKB y este puede ser liberado durante o después de la llamada.\n\nSin embargo, xilinx_can xcan_write_frame() sigue usando el SKB después de la llamada.\n\nCorregir eso llamando a can_put_echo_skb() solo después de que el código haya terminado de manipular el SKB.\n\nEl tx_lock se mantiene durante toda la ejecución de xcan_write_frame() y también en el lado de can_get_echo_skb(), por lo que el orden de las operaciones no importa.\n\nUn commit de corrección anterior 3d3c817c3a40 ('can: xilinx_can: Corregir el uso de la memoria skb') no movió la llamada a can_put_echo_skb() lo suficientemente lejos.\n\n[mkl: añadir 'commit' delante de sha1 en la descripción del parche]\n[mkl: corregir sangría]","source":"nvd"}],"published":"2025-09-23T06:00:46.157Z","modified":"2026-10-19T21:10:00.160Z","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":"NVD","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-416"],"affected":[{"ranges":[{"type":"git","introduced":"1598efe57b3e768056e4ca56cb9cf33111e68d1c","fixed":"e202ffd9e54538ef67ec301ebd6d9da4823466c9","status":"affected"},{"type":"git","introduced":"1598efe57b3e768056e4ca56cb9cf33111e68d1c","fixed":"1139321161a3ba5e45e61e0738b37f42f20bc57a","status":"affected"},{"type":"git","introduced":"1598efe57b3e768056e4ca56cb9cf33111e68d1c","fixed":"94b050726288a56a6b8ff55aa641f2fedbd3b44c","status":"affected"},{"type":"git","introduced":"1598efe57b3e768056e4ca56cb9cf33111e68d1c","fixed":"725b33deebd6e4c96fe7893f384510a54258f28f","status":"affected"},{"type":"git","introduced":"1598efe57b3e768056e4ca56cb9cf33111e68d1c","fixed":"668cc1e3bb21101d074e430de1b7ba8fd10189e7","status":"affected"},{"type":"git","introduced":"1598efe57b3e768056e4ca56cb9cf33111e68d1c","fixed":"ef79f00be72bd81d2e1e6f060d83cf7e425deee4","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.19","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.19","status":"unaffected"},{"type":"semver","introduced":"5.15.194","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.153","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.107","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.48","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.16.8","lastAffected":"6.16.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.17","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":"4.19","fixed":"5.15.194"},{"status":"affected","introduced":"5.16","fixed":"6.1.153"},{"status":"affected","introduced":"6.2","fixed":"6.6.107"},{"status":"affected","introduced":"6.7","fixed":"6.12.48"},{"status":"affected","introduced":"6.13","fixed":"6.16.8"},{"status":"affected","version":"6.17"},{"status":"affected","version":"6.17"},{"status":"affected","version":"6.17"},{"status":"affected","version":"6.17"},{"status":"affected","version":"6.17"}],"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/e202ffd9e54538ef67ec301ebd6d9da4823466c9","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1139321161a3ba5e45e61e0738b37f42f20bc57a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/94b050726288a56a6b8ff55aa641f2fedbd3b44c","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/725b33deebd6e4c96fe7893f384510a54258f28f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/668cc1e3bb21101d074e430de1b7ba8fd10189e7","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ef79f00be72bd81d2e1e6f060d83cf7e425deee4","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","tags":["mailing-list","third-party-advisory"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-39873","url":"https://www.cve.org/CVERecord?id=CVE-2025-39873","licence":"CVE Terms of Use","modified":"2026-08-05T12:05:49.898Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-39873","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-39873","licence":"Public domain","modified":"2026-10-19T21:10:00.160Z"}],"updatedAt":"2026-11-25T22:59:05.030Z","epss":{"score":0.00168,"percentile":0.06487,"date":"2026-12-01T12:00:22.000Z"}}