Not scored
io_uring: fix filename leak in __io_openat_prep()
- Severity
- Not scored
- Exploit likelihood
- 0.22% (higher than 12% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: io_uring: fix filename leak in __io_openat_prep() __io_openat_prep() allocates a struct filename using getname(). However, for the condition of the file being installed in the fixed file table as well as having O_CLOEXEC flag set, the function returns early. At that point, the request doesn't have REQ_F_NEED_CLEANUP flag set. Due to this, the memory for the newly allocated struct filename is not cleaned up, causing a memory leak. Fix this by setting the REQ_F_NEED_CLEANUP for the request just after the successful getname() call, so that when the request is torn down, the filename will be cleaned up, along with other resources needing cleanup.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from b9445598d8c60a1379887b957024b71343965f74 before 2420ef01b2e836fbc05a0a8c73a1016504eb0458, from b9445598d8c60a1379887b957024b71343965f74 before 8f44c4a550570cd5903625133f938c6b51310c9b, from b9445598d8c60a1379887b957024b71343965f74 before 18b99fa603d0df5e1c898699c17d3b92ddc80746, from b9445598d8c60a1379887b957024b71343965f74 before e232269d511566b1f80872256a48593acc1becf4, from b9445598d8c60a1379887b957024b71343965f74 before 7fbfb85b05bc960cc50e09d03e5e562131e48d45, from b9445598d8c60a1379887b957024b71343965f74 before b14fad555302a2104948feaff70503b64c80ac01, 5.15 Not affected: before 5.15, from 5.15.198 up to 5.15.*, from 6.1.160 up to 6.1.*, from 6.6.120 up to 6.6.*, from 6.12.64 up to 6.12.*, from 6.18.3 up to 6.18.* | CVE List |
What each source says
CVE List
In the Linux kernel, the following vulnerability has been resolved: io_uring: fix filename leak in __io_openat_prep() __io_openat_prep() allocates a struct filename using getname(). However, for the condition of the file being installed in the fixed file table as well as having O_CLOEXEC flag set, the function returns early. At that point, the request doesn't have REQ_F_NEED_CLEANUP flag set. Due to this, the memory for the newly allocated struct filename is not cleaned up, causing a memory leak. Fix this by setting the REQ_F_NEED_CLEANUP for the request just after the successful getname() call, so that when the request is torn down, the filename will be cleaned up, along with other resources needing cleanup.
NVD (es)
En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: io_uring: corregir fuga de filename en __io_openat_prep() __io_openat_prep() asigna una estructura filename usando getname(). Sin embargo, para la condición de que el archivo esté instalado en la tabla de archivos fija, así como de tener la bandera O_CLOEXEC establecida, la función retorna prematuramente. En ese punto, la solicitud no tiene la bandera REQ_F_NEED_CLEANUP establecida. Debido a esto, la memoria para la estructura filename recién asignada no se limpia, causando una fuga de memoria. Solucione esto estableciendo la bandera REQ_F_NEED_CLEANUP para la solicitud justo después de la llamada exitosa a getname(), de modo que cuando la solicitud sea desmantelada, el filename será limpiado, junto con otros recursos que necesiten limpieza.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-68814 changed 2026-11-10 | CVE Terms of Use |
| NVD | CVE-2025-68814 changed 2026-11-10 | Public domain |