{"id":"CVE-2025-40364","state":"PUBLISHED","title":"io_uring: fix io_req_prep_async with provided buffers","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nio_uring: fix io_req_prep_async with provided buffers\n\nio_req_prep_async() can import provided buffers, commit the ring state\nby giving up on that before, it'll be reimported later if needed.","publishedAt":"2025-04-18T13:50:24.257Z","updatedAt":"2026-08-05T12:09:55.585Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"c7fb19428d67dd0a2a78a4f237af01d39c78dc5a","status":"affected","lessThan":"233b210a678bddf8b49b02a070074a52b87e6d43","versionType":"git"},{"version":"c7fb19428d67dd0a2a78a4f237af01d39c78dc5a","status":"affected","lessThan":"a1b17713b32c75a90132ea2f92b1257f3bbc20f3","versionType":"git"},{"version":"c7fb19428d67dd0a2a78a4f237af01d39c78dc5a","status":"affected","lessThan":"b86f1d51731e621e83305dc9564ae14c9ef752bf","versionType":"git"},{"version":"c7fb19428d67dd0a2a78a4f237af01d39c78dc5a","status":"affected","lessThan":"a94592ec30ff67dc36c424327f1e0a9ceeeb9bd3","versionType":"git"},{"version":"c7fb19428d67dd0a2a78a4f237af01d39c78dc5a","status":"affected","lessThan":"35ae7910c349fb3c60439992e2e0e79061e95382","versionType":"git"},{"version":"c7fb19428d67dd0a2a78a4f237af01d39c78dc5a","status":"affected","lessThan":"f0ef94553868d07c1b14d7743a7e2553e5a831a3","versionType":"git"},{"version":"c7fb19428d67dd0a2a78a4f237af01d39c78dc5a","status":"affected","lessThan":"d63b0e8a628e62ca85a0f7915230186bb92f8bb4","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["io_uring/io_uring.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.19","versionType":"semver"},{"version":"6.1.129","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.78","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.14","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13.3","status":"unaffected","lessThanOrEqual":"6.13.*","versionType":"semver"},{"version":"6.14","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["io_uring/io_uring.c"]}],"references":["https://git.kernel.org/stable/c/233b210a678bddf8b49b02a070074a52b87e6d43","https://git.kernel.org/stable/c/a1b17713b32c75a90132ea2f92b1257f3bbc20f3","https://git.kernel.org/stable/c/b86f1d51731e621e83305dc9564ae14c9ef752bf","https://git.kernel.org/stable/c/a94592ec30ff67dc36c424327f1e0a9ceeeb9bd3","https://git.kernel.org/stable/c/35ae7910c349fb3c60439992e2e0e79061e95382","https://git.kernel.org/stable/c/f0ef94553868d07c1b14d7743a7e2553e5a831a3","https://git.kernel.org/stable/c/d63b0e8a628e62ca85a0f7915230186bb92f8bb4"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/40xxx/CVE-2025-40364.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-40364","state":"PUBLISHED","datePublished":"2025-04-18T13:50:24.257Z","dateUpdated":"2026-08-05T12:09:55.585Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T07:20:57.187Z"},"containers":{"cna":{"title":"io_uring: fix io_req_prep_async with provided buffers","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nio_uring: fix io_req_prep_async with provided buffers\n\nio_req_prep_async() can import provided buffers, commit the ring state\nby giving up on that before, it'll be reimported later if needed."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"c7fb19428d67dd0a2a78a4f237af01d39c78dc5a","status":"affected","lessThan":"233b210a678bddf8b49b02a070074a52b87e6d43","versionType":"git"},{"version":"c7fb19428d67dd0a2a78a4f237af01d39c78dc5a","status":"affected","lessThan":"a1b17713b32c75a90132ea2f92b1257f3bbc20f3","versionType":"git"},{"version":"c7fb19428d67dd0a2a78a4f237af01d39c78dc5a","status":"affected","lessThan":"b86f1d51731e621e83305dc9564ae14c9ef752bf","versionType":"git"},{"version":"c7fb19428d67dd0a2a78a4f237af01d39c78dc5a","status":"affected","lessThan":"a94592ec30ff67dc36c424327f1e0a9ceeeb9bd3","versionType":"git"},{"version":"c7fb19428d67dd0a2a78a4f237af01d39c78dc5a","status":"affected","lessThan":"35ae7910c349fb3c60439992e2e0e79061e95382","versionType":"git"},{"version":"c7fb19428d67dd0a2a78a4f237af01d39c78dc5a","status":"affected","lessThan":"f0ef94553868d07c1b14d7743a7e2553e5a831a3","versionType":"git"},{"version":"c7fb19428d67dd0a2a78a4f237af01d39c78dc5a","status":"affected","lessThan":"d63b0e8a628e62ca85a0f7915230186bb92f8bb4","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["io_uring/io_uring.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.19","versionType":"semver"},{"version":"6.1.129","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.78","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.14","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13.3","status":"unaffected","lessThanOrEqual":"6.13.*","versionType":"semver"},{"version":"6.14","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["io_uring/io_uring.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/233b210a678bddf8b49b02a070074a52b87e6d43"},{"url":"https://git.kernel.org/stable/c/a1b17713b32c75a90132ea2f92b1257f3bbc20f3"},{"url":"https://git.kernel.org/stable/c/b86f1d51731e621e83305dc9564ae14c9ef752bf"},{"url":"https://git.kernel.org/stable/c/a94592ec30ff67dc36c424327f1e0a9ceeeb9bd3"},{"url":"https://git.kernel.org/stable/c/35ae7910c349fb3c60439992e2e0e79061e95382"},{"url":"https://git.kernel.org/stable/c/f0ef94553868d07c1b14d7743a7e2553e5a831a3"},{"url":"https://git.kernel.org/stable/c/d63b0e8a628e62ca85a0f7915230186bb92f8bb4"}],"metrics":[{"cvssV3_1":{"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"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerability is reached exclusively through the local io_uring interface — io_uring_setup(2), io_uring_register(2) for PBUF_RING register/unregister, and io_uring_enter(2) SQE submission. No network or adjacent-network path exists into io_req_prep_async().\nAC:L - The attacker controls every element: registering the buffer ring, forcing the prep_async path via IOSQE_ASYNC/IOSQE_IO_LINK/IOSQE_IO_DRAIN on a pollable fd, and freeing the io_buffer_list with IORING_UNREGISTER_PBUF_RING at a moment of their choosing. With IOSQE_IO_LINK the stale req->buf_list is held indefinitely while the link head is pending, making the sequence fully deterministic with no race to win.\nPR:L - There is not a single capable() or CAP_* check on any function in the path — io_register_pbuf_ring(), io_unregister_pbuf_ring(), and buffer-select submission are all unprivileged, and io_uring is enabled by default (kernel.io_uring_disabled=0). Any local unprivileged user, including one inside a container or sandbox, can trigger it.\nUI:N - The entire sequence is performed by the attacker's own process against its own io_uring instance; no victim action, mount, or file open is required.\nS:U - The corrupted io_buffer_list and the resulting privilege escalation are both within the kernel's own security authority; no VM, IOMMU, or hypervisor boundary is crossed.\nC:H - __io_put_kbuf_list()/__io_put_kbuf_ring() read bl->bgid from the freed io_buffer_list and return it to userspace in the CQE IORING_CQE_F_BUFFER field, giving a repeatable 16-bit read oracle over reallocated kmalloc-64 slab contents; on 6.12+ the reallocated bl->buf_ring pointer is dereferenced with attacker-chosen head/mask, extending this to broad kernel memory disclosure.\nI:H - The stale pointer yields a write primitive — bl->head++ on freed memory, and via io_kbuf_commit() with IOBL_INC an attacker-controlled bl->buf_ring is dereferenced to perform buf->len -= len / buf->addr += len, an arbitrary-address write. Heap grooming to reallocate the freed io_buffer_list makes this a viable local privilege escalation.\nA:H - Dereferencing and incrementing fields of a kfree'd io_buffer_list, plus unsynchronized bl->head updates from io-wq without uring_lock, corrupts arbitrary slab objects and reliably produces oopses, KASAN splats, or a kernel panic."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:09:55.585Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.1.129"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.1.129"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.6.78"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.6.78"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.12.14"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.13.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.14"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}