{"id":"CVE-2022-48782","state":"PUBLISHED","title":"mctp: fix use after free","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmctp: fix use after free\n\nClang static analysis reports this problem\nroute.c:425:4: warning: Use of memory after it is freed\n  trace_mctp_key_acquire(key);\n  ^~~~~~~~~~~~~~~~~~~~~~~~~~~\nWhen mctp_key_add() fails, key is freed but then is later\nused in trace_mctp_key_acquire().  Add an else statement\nto use the key only when mctp_key_add() is successful.","publishedAt":"2024-07-16T11:13:19.141Z","updatedAt":"2026-08-05T08:52:14.211Z","severity":{"score":8.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:A/AC:L/PR:N/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":"4f9e1ba6de45aa8797a83f1fe5b82ec4bac16899","status":"affected","lessThan":"1dd3ecbec5f606b2a526c47925c8634b1a6bb81e","versionType":"git"},{"version":"4f9e1ba6de45aa8797a83f1fe5b82ec4bac16899","status":"affected","lessThan":"7e5b6a5c8c44310784c88c1c198dde79f6402f7b","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/mctp/route.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.16","versionType":"semver"},{"version":"5.16.11","status":"unaffected","lessThanOrEqual":"5.16.*","versionType":"semver"},{"version":"5.17","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/mctp/route.c"]}],"references":["https://git.kernel.org/stable/c/1dd3ecbec5f606b2a526c47925c8634b1a6bb81e","https://git.kernel.org/stable/c/7e5b6a5c8c44310784c88c1c198dde79f6402f7b"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/48xxx/CVE-2022-48782.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-48782","state":"PUBLISHED","datePublished":"2024-07-16T11:13:19.141Z","dateUpdated":"2026-08-05T08:52:14.211Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-06-20T11:09:39.068Z"},"containers":{"cna":{"title":"mctp: fix use after free","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmctp: fix use after free\n\nClang static analysis reports this problem\nroute.c:425:4: warning: Use of memory after it is freed\n  trace_mctp_key_acquire(key);\n  ^~~~~~~~~~~~~~~~~~~~~~~~~~~\nWhen mctp_key_add() fails, key is freed but then is later\nused in trace_mctp_key_acquire().  Add an else statement\nto use the key only when mctp_key_add() is successful."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"4f9e1ba6de45aa8797a83f1fe5b82ec4bac16899","status":"affected","lessThan":"1dd3ecbec5f606b2a526c47925c8634b1a6bb81e","versionType":"git"},{"version":"4f9e1ba6de45aa8797a83f1fe5b82ec4bac16899","status":"affected","lessThan":"7e5b6a5c8c44310784c88c1c198dde79f6402f7b","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/mctp/route.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.16","versionType":"semver"},{"version":"5.16.11","status":"unaffected","lessThanOrEqual":"5.16.*","versionType":"semver"},{"version":"5.17","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/mctp/route.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/1dd3ecbec5f606b2a526c47925c8634b1a6bb81e"},{"url":"https://git.kernel.org/stable/c/7e5b6a5c8c44310784c88c1c198dde79f6402f7b"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":8.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:A - The bug is in mctp_route_input(), reached when ETH_P_MCTP packets are received on MCTP netdevs (I2C/SMBus or serial bindings). Those transports are chassis/management-fabric or link-local interconnects, not Internet-routable L3, so Adjacent matches the highest realistic exposure.\nAC:L - mctp_key_add() fails on a duplicate (src,dest,tag) key, which the code documents as a race with another SOM packet; an attacker who sends concurrent matching fragmented SOM frames controls both sides of that race and can trigger the UAF reliably.\nPR:N - Packet delivery into mctp_pkttype_receive()/mctp_route_input() performs no authentication or capability check on the sender. An on-bus peer needs no local account; CAP_NET_* checks apply only to AF_MCTP bind/sendto, not to wire reception.\nUI:N - Exploitation requires only attacker-sent MCTP frames toward a host with MCTP routing/sockets configured; no victim user action is required.\nS:U - Impact is memory corruption in the receiving kernel’s MCTP stack and does not cross a separate security authority such as a guest-to-host or IOMMU boundary.\nC:H - Use-after-free of struct mctp_sk_key (trace read plus mctp_key_unref on freed storage) enables heap reuse and disclosure of attacker-controlled or adjacent kernel memory.\nI:H - The same UAF/double-free path yields a heap corruption primitive that can be turned into arbitrary write or control-flow hijacking via standard slab shaping.\nA:H - Dereferencing and re-freeing the dropped key causes kernel oops/panic or heap allocator corruption, so availability impact is High even without full exploitation."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T08:52:14.211Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"5.16.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"5.17"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/1dd3ecbec5f606b2a526c47925c8634b1a6bb81e","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/7e5b6a5c8c44310784c88c1c198dde79f6402f7b","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-03T15:25:01.615Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2022-48782","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T17:00:14.462603Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-11T17:34:16.927Z"}}]}}}