{"id":"CVE-2026-138850","sourceIdentifier":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","published":"2026-11-30T14:17:40.823","lastModified":"2026-12-01T06:17:28.733","vulnStatus":"Received","cveTags":[],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmisc: fastrpc: fix double-free in fastrpc_map_attach() error path\n\nmap->table is assigned right after dma_buf_map_attachment_unlocked()\nsucceeds. The two failure checks that follow, the len > map->size test\nand, where subsystem VMIDs are configured, a failed qcom_scm_assign_mem(),\njump to map_err with map->table already set.\n\nmap_err manually calls dma_buf_detach() and dma_buf_put() and then falls\nthrough to fastrpc_map_put(). Since that change the error path tail is\nfastrpc_map_put() -> fastrpc_free_map(), and fastrpc_free_map() already\nunmaps, detaches and puts the dma-buf whenever map->table is set.\nThe two operations therefore run twice: the second dma_buf_put() drops an\nextra reference on map->buf, and dma_buf_unmap_attachment_unlocked()\ndereferences the map->attach already freed by the manual dma_buf_detach().\nkref_init() sets the refcount to 1 with no intervening get, so the final\nfastrpc_map_put() frees the map synchronously and the redundant cleanup is\ndeterministic.\n\nThe len > map->size branch is reachable by an unprivileged process via\nFASTRPC_IOCTL_MEM_MAP with an fd whose dma-buf is smaller than the\nrequested length, before any DSP invocation.\n\nRoute both map->table-is-set failure branches to get_err instead of\nmap_err, so fastrpc_free_map() is the single owner of the\nunmap/detach/put sequence. map_err is retained for the\ndma_buf_map_attachment_unlocked() failure, which is reached with\nmap->table still NULL and an attachment that fastrpc_free_map() will not\nclean up, so its dma_buf_detach()/dma_buf_put() must still run manually."}],"affected":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","affectedData":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","programFiles":["drivers/misc/fastrpc.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"334f1a1cbe032d85fd58e771629e3a3b373b96d5","lessThan":"3a05f8579fc0a3d04e1e9de766630a722d7ca6b6","versionType":"git","status":"affected"},{"version":"334f1a1cbe032d85fd58e771629e3a3b373b96d5","lessThan":"0bde6e438035a3bb80ba4f735b8c61a68001f8aa","versionType":"git","status":"affected"},{"version":"334f1a1cbe032d85fd58e771629e3a3b373b96d5","lessThan":"5ba8a7ebd96d2e271905348e8aed19fe726e3648","versionType":"git","status":"affected"},{"version":"334f1a1cbe032d85fd58e771629e3a3b373b96d5","lessThan":"51731e49fe9a7359d4dd17e77189a21b29115233","versionType":"git","status":"affected"},{"version":"334f1a1cbe032d85fd58e771629e3a3b373b96d5","lessThan":"09fa66ec1b4896ab841da085ca58b6433f28f07f","versionType":"git","status":"affected"}]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","programFiles":["drivers/misc/fastrpc.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"6.2","status":"affected"},{"version":"0","lessThan":"6.2","versionType":"semver","status":"unaffected"},{"version":"6.6.163","lessThanOrEqual":"6.6.*","versionType":"semver","status":"unaffected"},{"version":"6.12.118","lessThanOrEqual":"6.12.*","versionType":"semver","status":"unaffected"},{"version":"6.18.64","lessThanOrEqual":"6.18.*","versionType":"semver","status":"unaffected"},{"version":"7.3.4","lessThanOrEqual":"7.3.*","versionType":"semver","status":"unaffected"},{"version":"7.4-rc1","lessThanOrEqual":"*","versionType":"original_commit_for_fix","status":"unaffected"}]}]}],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"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","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":5.9}]},"references":[{"url":"https://git.kernel.org/stable/c/09fa66ec1b4896ab841da085ca58b6433f28f07f","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/0bde6e438035a3bb80ba4f735b8c61a68001f8aa","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/3a05f8579fc0a3d04e1e9de766630a722d7ca6b6","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/51731e49fe9a7359d4dd17e77189a21b29115233","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/5ba8a7ebd96d2e271905348e8aed19fe726e3648","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"}]}