{"id":"CVE-2022-49275","state":"PUBLISHED","title":"can: m_can: m_can_tx_handler(): fix use after free of skb","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ncan: m_can: m_can_tx_handler(): fix use after free of skb\n\ncan_put_echo_skb() will clone skb then free the skb. Move the\ncan_put_echo_skb() for the m_can version 3.0.x directly before the\nstart of the xmit in hardware, similar to the 3.1.x branch.","publishedAt":"2025-02-26T01:56:20.066Z","updatedAt":"2026-08-05T08:54:32.809Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"80646733f11c2e9de3b6339f7e635047e6087280","status":"affected","lessThan":"d93ed9aff64968f4cdad690712eb4f48ae537bde","versionType":"git"},{"version":"80646733f11c2e9de3b6339f7e635047e6087280","status":"affected","lessThan":"d3892a747ab16b1eb6593a19d29f62c3b3f020ac","versionType":"git"},{"version":"80646733f11c2e9de3b6339f7e635047e6087280","status":"affected","lessThan":"7728d937ec403a1ceff9483023252d2cb8777f81","versionType":"git"},{"version":"80646733f11c2e9de3b6339f7e635047e6087280","status":"affected","lessThan":"08d90846e438ac22dc56fc49ec0b0d195831c5ed","versionType":"git"},{"version":"80646733f11c2e9de3b6339f7e635047e6087280","status":"affected","lessThan":"869016a2938ac44f7b2fb7fc22c89edad99eb9b3","versionType":"git"},{"version":"80646733f11c2e9de3b6339f7e635047e6087280","status":"affected","lessThan":"f43e64076ff1b1dcb893fb77ad1204105f710a29","versionType":"git"},{"version":"80646733f11c2e9de3b6339f7e635047e6087280","status":"affected","lessThan":"4db7d6f481990dd179a9ee7126dc7aa31ea4fff3","versionType":"git"},{"version":"80646733f11c2e9de3b6339f7e635047e6087280","status":"affected","lessThan":"31417073493f302d26ab66b3abc098d43227b835","versionType":"git"},{"version":"80646733f11c2e9de3b6339f7e635047e6087280","status":"affected","lessThan":"2e8e79c416aae1de224c0f1860f2e3350fa171f8","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/can/m_can/m_can.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.18","versionType":"semver"},{"version":"4.9.324","status":"unaffected","lessThanOrEqual":"4.9.*","versionType":"semver"},{"version":"4.14.289","status":"unaffected","lessThanOrEqual":"4.14.*","versionType":"semver"},{"version":"4.19.253","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.207","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.110","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.33","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.16.19","status":"unaffected","lessThanOrEqual":"5.16.*","versionType":"semver"},{"version":"5.17.2","status":"unaffected","lessThanOrEqual":"5.17.*","versionType":"semver"},{"version":"5.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/can/m_can/m_can.c"]}],"references":["https://git.kernel.org/stable/c/d93ed9aff64968f4cdad690712eb4f48ae537bde","https://git.kernel.org/stable/c/d3892a747ab16b1eb6593a19d29f62c3b3f020ac","https://git.kernel.org/stable/c/7728d937ec403a1ceff9483023252d2cb8777f81","https://git.kernel.org/stable/c/08d90846e438ac22dc56fc49ec0b0d195831c5ed","https://git.kernel.org/stable/c/869016a2938ac44f7b2fb7fc22c89edad99eb9b3","https://git.kernel.org/stable/c/f43e64076ff1b1dcb893fb77ad1204105f710a29","https://git.kernel.org/stable/c/4db7d6f481990dd179a9ee7126dc7aa31ea4fff3","https://git.kernel.org/stable/c/31417073493f302d26ab66b3abc098d43227b835","https://git.kernel.org/stable/c/2e8e79c416aae1de224c0f1860f2e3350fa171f8"],"weaknesses":["CWE-416"],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/49xxx/CVE-2022-49275.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-49275","state":"PUBLISHED","datePublished":"2025-02-26T01:56:20.066Z","dateUpdated":"2026-08-05T08:54:32.809Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-02-26T01:49:39.298Z"},"containers":{"cna":{"title":"can: m_can: m_can_tx_handler(): fix use after free of skb","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ncan: m_can: m_can_tx_handler(): fix use after free of skb\n\ncan_put_echo_skb() will clone skb then free the skb. Move the\ncan_put_echo_skb() for the m_can version 3.0.x directly before the\nstart of the xmit in hardware, similar to the 3.1.x branch."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"80646733f11c2e9de3b6339f7e635047e6087280","status":"affected","lessThan":"d93ed9aff64968f4cdad690712eb4f48ae537bde","versionType":"git"},{"version":"80646733f11c2e9de3b6339f7e635047e6087280","status":"affected","lessThan":"d3892a747ab16b1eb6593a19d29f62c3b3f020ac","versionType":"git"},{"version":"80646733f11c2e9de3b6339f7e635047e6087280","status":"affected","lessThan":"7728d937ec403a1ceff9483023252d2cb8777f81","versionType":"git"},{"version":"80646733f11c2e9de3b6339f7e635047e6087280","status":"affected","lessThan":"08d90846e438ac22dc56fc49ec0b0d195831c5ed","versionType":"git"},{"version":"80646733f11c2e9de3b6339f7e635047e6087280","status":"affected","lessThan":"869016a2938ac44f7b2fb7fc22c89edad99eb9b3","versionType":"git"},{"version":"80646733f11c2e9de3b6339f7e635047e6087280","status":"affected","lessThan":"f43e64076ff1b1dcb893fb77ad1204105f710a29","versionType":"git"},{"version":"80646733f11c2e9de3b6339f7e635047e6087280","status":"affected","lessThan":"4db7d6f481990dd179a9ee7126dc7aa31ea4fff3","versionType":"git"},{"version":"80646733f11c2e9de3b6339f7e635047e6087280","status":"affected","lessThan":"31417073493f302d26ab66b3abc098d43227b835","versionType":"git"},{"version":"80646733f11c2e9de3b6339f7e635047e6087280","status":"affected","lessThan":"2e8e79c416aae1de224c0f1860f2e3350fa171f8","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/can/m_can/m_can.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.18","versionType":"semver"},{"version":"4.9.324","status":"unaffected","lessThanOrEqual":"4.9.*","versionType":"semver"},{"version":"4.14.289","status":"unaffected","lessThanOrEqual":"4.14.*","versionType":"semver"},{"version":"4.19.253","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.207","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.110","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.33","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.16.19","status":"unaffected","lessThanOrEqual":"5.16.*","versionType":"semver"},{"version":"5.17.2","status":"unaffected","lessThanOrEqual":"5.17.*","versionType":"semver"},{"version":"5.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/can/m_can/m_can.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/d93ed9aff64968f4cdad690712eb4f48ae537bde"},{"url":"https://git.kernel.org/stable/c/d3892a747ab16b1eb6593a19d29f62c3b3f020ac"},{"url":"https://git.kernel.org/stable/c/7728d937ec403a1ceff9483023252d2cb8777f81"},{"url":"https://git.kernel.org/stable/c/08d90846e438ac22dc56fc49ec0b0d195831c5ed"},{"url":"https://git.kernel.org/stable/c/869016a2938ac44f7b2fb7fc22c89edad99eb9b3"},{"url":"https://git.kernel.org/stable/c/f43e64076ff1b1dcb893fb77ad1204105f710a29"},{"url":"https://git.kernel.org/stable/c/4db7d6f481990dd179a9ee7126dc7aa31ea4fff3"},{"url":"https://git.kernel.org/stable/c/31417073493f302d26ab66b3abc098d43227b835"},{"url":"https://git.kernel.org/stable/c/2e8e79c416aae1de224c0f1860f2e3350fa171f8"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The UAF is in m_can_tx_handler on the ndo_start_xmit/TX work path, reached when a local process sends via AF_CAN (raw_sendmsg → can_send → m_can_start_xmit), not when processing frames received from the CAN bus. Same TX-local scoring as other SocketCAN transmit bugs rather than adjacent bus RX.\nAC:L - On M_CAN IP v3.0.x with CAN_CTRLMODE_FD enabled, every transmit deterministically calls can_put_echo_skb() (which frees the skb) and then can_is_canfd_skb(skb)/cf->flags on the freed pointer; the attacker fully controls when frames are sent and no race is required.\nPR:L - socket(PF_CAN)/bind/sendmsg impose no capability checks, so an unprivileged local user can trigger the path on an already-up m_can interface typical of automotive/industrial deployments; CAP_NET_ADMIN is only needed for bring-up/bitrate, not for TX.\nUI:N - The attacker triggers the UAF solely by sending crafted/ordinary CAN frames on the interface; no separate victim action such as mounting a device or opening a file is required.\nS:U - Impact is use-after-free of a kernel sk_buff within the host SocketCAN/m_can driver under the same OS authority, enabling standard local privilege escalation rather than a VM/IOMMU/sandbox escape.\nC:H - can_put_echo_skb()/can_create_echo_skb() frees the original sk_buff while the TX path still reads skb->len and skb->data; reclaiming that slab object yields a classic UAF read/disclosure primitive scored Confidentiality High.\nI:H - The same sk_buff UAF is heap memory corruption that enables spraying and write/control-flow primitives typical of exploitable kernel use-after-frees, so Integrity is High per UAF guidance even though the immediate post-free accesses are reads.\nA:H - Dereferencing the freed sk_buff in the TX path can oops/panic the kernel (and UAF bugs are scored Availability High even when not fully exploited), fully denying host availability."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T08:54:32.809Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.18","versionEndExcluding":"4.9.324"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.18","versionEndExcluding":"4.14.289"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.18","versionEndExcluding":"4.19.253"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.18","versionEndExcluding":"5.4.207"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.18","versionEndExcluding":"5.10.110"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.18","versionEndExcluding":"5.15.33"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.18","versionEndExcluding":"5.16.19"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.18","versionEndExcluding":"5.17.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.18","versionEndExcluding":"5.18"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.8,"attackVector":"LOCAL","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"id":"CVE-2022-49275","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2025-03-04T18:03:19.289491Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-416","lang":"en","type":"CWE","description":"CWE-416 Use After Free"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-03-04T18:07:17.587Z"}}]}}}