{"id":"CVE-2026-99521","published":"2026-11-19T14:44:28Z","modified":"2026-11-19T14:44:28Z","title":"rapidio: mport_cdev: fix use-after-free in mport_mm_close()","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nrapidio: mport_cdev: fix use-after-free in mport_mm_close()\n\nA use-after-free vulnerability was identified in mport_mm_close() in\ndrivers/rapidio/devices/rio_mport_cdev.c, identical to the pattern\npreviously addressed in dma_req_free().\n\nThis is observable from userspace when an application creates an mmap\nmapping via the RapidIO character device and subsequently unmaps it (or\nterminates, triggering exit_mmap()).  During munmap, mport_mm_close() is\ninvoked and drops the mapping reference via kref_put().\n\nIf kref_put() drops the last reference, mport_release_mapping() is called,\nwhich frees the underlying rio_mport_mapping structure.  The subsequent\nmutex_unlock() then dereferences map->md to unlock buf_mutex, leading to a\nuse-after-free:\n\n   mport_mm_close()\n     -> mutex_lock(&map->md->buf_mutex);\n     ...\n     -> kref_put(&map->ref, mport_release_mapping); /* map is freed */\n     -> mutex_unlock(&map->md->buf_mutex);          /* UAF: map used */\n\nFix this by caching map->md before kref_put() and using the cached pointer\nfor mutex unlocking, ensuring that freed memory is not accessed.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.00168,"percentile":0.06309,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/df3008607f2c3343f7ad34001af656a185c123ee","tags":[]},{"url":"https://git.kernel.org/stable/c/48157350b24ac0343374ee3fa34188d7ff30be81","tags":[]},{"url":"https://git.kernel.org/stable/c/a0aaf59e7a86312c0272e36f19fb507f91405209","tags":[]},{"url":"https://git.kernel.org/stable/c/0f2cd84858e67cf8e02438bf28243bcdc67aa49a","tags":[]}],"priority":{"score":1.3,"factors":[{"name":"EPSS percentile","points":1.26}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= e8de370188d098bb49483c287b44925957c3c9b6, < df3008607f2c3343f7ad34001af656a185c123ee",">= e8de370188d098bb49483c287b44925957c3c9b6, < 48157350b24ac0343374ee3fa34188d7ff30be81",">= e8de370188d098bb49483c287b44925957c3c9b6, < a0aaf59e7a86312c0272e36f19fb507f91405209",">= e8de370188d098bb49483c287b44925957c3c9b6, < 0f2cd84858e67cf8e02438bf28243bcdc67aa49a"]},{"vendor":"Linux","product":"Linux","versions":["4.6"]}],"euvd":{"id":"EUVD-2026-130242","exploited":false,"provenance":"source"}}