Skip to content
Medium 5.5

rapidio: mport_cdev: fix use-after-free in mport_mm_close()

CVE-2026-99521 First seen on SecPulse

Affected packages

PackageAffected → Fixed
LinuxLinux —
LinuxKernel
≥ 4.6.0, < 5.10.275→ 5.10.275
≥ 5.11.0, < 5.15.226→ 5.15.226
≥ 5.16.0, < 6.1.193→ 6.1.193
≥ 6.2.0, < 6.6.163→ 6.6.163
≥ 6.7.0, < 6.12.117→ 6.12.117
≥ 6.13.0, < 6.18.61→ 6.18.61
≥ 6.19.0, < 7.3.2→ 7.3.2

Fix status by distribution

Records published by each distribution for this CVE. Fixed versions differ by release; check each link.

Original description The description as published by the source.

In the Linux kernel, the following vulnerability has been resolved:

rapidio: mport_cdev: fix use-after-free in mport_mm_close()

A use-after-free vulnerability was identified in mport_mm_close() in
drivers/rapidio/devices/rio_mport_cdev.c, identical to the pattern
previously addressed in dma_req_free().

This is observable from userspace when an application creates an mmap
mapping via the RapidIO character device and subsequently unmaps it (or
terminates, triggering exit_mmap()). During munmap, mport_mm_close() is
invoked and drops the mapping reference via kref_put().

If kref_put() drops the last reference, mport_release_mapping() is called,
which frees the underlying rio_mport_mapping structure. The subsequent
mutex_unlock() then dereferences map->md to unlock buf_mutex, leading to a
use-after-free:

mport_mm_close()
-> mutex_lock(&map->md->buf_mutex);
...
-> kref_put(&map->ref, mport_release_mapping); /* map is freed /
-> mutex_unlock(&map->md->buf_mutex); /
UAF: map used */

Fix this by caching map->md before kref_put() and using the cached pointer
for mutex unlocking, ensuring that freed memory is not accessed.

Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details