{"id":"CVE-2026-99521","aliases":[],"title":"rapidio: mport_cdev: fix use-after-free in mport_mm_close()","originalDescription":"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.","severity":{"cvss":null,"vector":null,"label":null},"exploitation":{"kev":null,"epss":{"score":0.00218,"percentile":0.13123},"exploitDb":null},"affected":[{"ecosystem":"Linux","name":"Kernel","range":">=4.6.0, <6.12.117","fixed":"6.12.117"},{"ecosystem":"Linux","name":"Kernel","range":">=6.13.0, <6.18.61","fixed":"6.18.61"},{"ecosystem":"Linux","name":"Kernel","range":">=6.19.0, <7.3.2","fixed":"7.3.2"},{"ecosystem":"vendor","name":"Linux","range":">=e8de370188d098bb49483c287b44925957c3c9b6, <0f2cd84858e67cf8e02438bf28243bcdc67aa49a","fixed":"0f2cd84858e67cf8e02438bf28243bcdc67aa49a"},{"ecosystem":"vendor","name":"Linux","range":">=e8de370188d098bb49483c287b44925957c3c9b6, <1c66d8e8fc67f2471675e361b16200d419e40ef3","fixed":"1c66d8e8fc67f2471675e361b16200d419e40ef3"},{"ecosystem":"vendor","name":"Linux","range":">=e8de370188d098bb49483c287b44925957c3c9b6, <3dc409ad1865d68f884611f7503c409071499067","fixed":"3dc409ad1865d68f884611f7503c409071499067"},{"ecosystem":"vendor","name":"Linux","range":">=e8de370188d098bb49483c287b44925957c3c9b6, <40f37f710ef220286600bae75456977f3629629f","fixed":"40f37f710ef220286600bae75456977f3629629f"},{"ecosystem":"vendor","name":"Linux","range":">=e8de370188d098bb49483c287b44925957c3c9b6, <48157350b24ac0343374ee3fa34188d7ff30be81","fixed":"48157350b24ac0343374ee3fa34188d7ff30be81"},{"ecosystem":"vendor","name":"Linux","range":">=e8de370188d098bb49483c287b44925957c3c9b6, <4fd7df6e7040fad99fee8989783748afefcee6ce","fixed":"4fd7df6e7040fad99fee8989783748afefcee6ce"},{"ecosystem":"vendor","name":"Linux","range":">=e8de370188d098bb49483c287b44925957c3c9b6, <a0aaf59e7a86312c0272e36f19fb507f91405209","fixed":"a0aaf59e7a86312c0272e36f19fb507f91405209"},{"ecosystem":"vendor","name":"Linux","range":">=e8de370188d098bb49483c287b44925957c3c9b6, <df3008607f2c3343f7ad34001af656a185c123ee","fixed":"df3008607f2c3343f7ad34001af656a185c123ee"}],"references":[{"url":"https://git.kernel.org/stable/c/df3008607f2c3343f7ad34001af656a185c123ee","type":"other"},{"url":"https://git.kernel.org/stable/c/48157350b24ac0343374ee3fa34188d7ff30be81","type":"other"},{"url":"https://git.kernel.org/stable/c/a0aaf59e7a86312c0272e36f19fb507f91405209","type":"other"},{"url":"https://git.kernel.org/stable/c/0f2cd84858e67cf8e02438bf28243bcdc67aa49a","type":"other"},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","type":"package"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99521.json","type":"advisory"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99521","type":"advisory"},{"url":"https://git.kernel.org/stable/c/4fd7df6e7040fad99fee8989783748afefcee6ce","type":"other"},{"url":"https://git.kernel.org/stable/c/1c66d8e8fc67f2471675e361b16200d419e40ef3","type":"other"},{"url":"https://git.kernel.org/stable/c/40f37f710ef220286600bae75456977f3629629f","type":"other"},{"url":"https://git.kernel.org/stable/c/3dc409ad1865d68f884611f7503c409071499067","type":"other"}],"sources":[{"name":"nvd","at":"2026-11-23T08:46:27.322Z","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99521","license":"NVD terms of use","firstSeenAt":"2026-11-19T15:43:48.212Z"},{"name":"osv","at":"2026-11-19T17:23:45.290Z","url":"https://osv.dev/vulnerability/CVE-2026-99521","license":"CC-BY 4.0","firstSeenAt":"2026-11-19T17:23:45.176Z"},{"name":"cvelistV5","at":"2026-11-23T21:30:55.222Z","url":"https://www.cve.org/CVERecord?id=CVE-2026-99521","license":"CVE Terms of Use","firstSeenAt":"2026-11-19T15:00:34.038Z"}],"firstSeenAt":"2026-11-19T15:00:34.038Z","publishedAt":"2026-11-19T14:44:28.194Z","modifiedAt":"2026-11-23T08:17:54.450Z"}