{"id":"CVE-2025-40216","state":"PUBLISHED","title":"io_uring/rsrc: don't rely on user vaddr alignment","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nio_uring/rsrc: don't rely on user vaddr alignment\n\nThere is no guaranteed alignment for user pointers, however the\ncalculation of an offset of the first page into a folio after coalescing\nuses some weird bit mask logic, get rid of it.","publishedAt":"2025-12-04T14:14:14.690Z","updatedAt":"2026-10-15T22:02:41.119Z","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":"a8edbb424b1391b077407c75d8f5d2ede77aa70d","status":"affected","lessThan":"50998b0ae7d9d552e96d8b7239981cf05f65eff5","versionType":"git"},{"version":"a8edbb424b1391b077407c75d8f5d2ede77aa70d","status":"affected","lessThan":"f16769241594be59387b56ab525e327f54377e60","versionType":"git"},{"version":"a8edbb424b1391b077407c75d8f5d2ede77aa70d","status":"affected","lessThan":"3a3c6d61577dbb23c09df3e21f6f9eda1ecd634b","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["io_uring/rsrc.c","io_uring/rsrc.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.12","versionType":"semver"},{"version":"6.12.36","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.5","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["io_uring/rsrc.c","io_uring/rsrc.h"]}],"references":["https://git.kernel.org/stable/c/50998b0ae7d9d552e96d8b7239981cf05f65eff5","https://git.kernel.org/stable/c/f16769241594be59387b56ab525e327f54377e60","https://git.kernel.org/stable/c/3a3c6d61577dbb23c09df3e21f6f9eda1ecd634b"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/40xxx/CVE-2025-40216.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-40216","state":"PUBLISHED","datePublished":"2025-12-04T14:14:14.690Z","dateUpdated":"2026-10-15T22:02:41.119Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T07:20:57.179Z"},"containers":{"cna":{"title":"io_uring/rsrc: don't rely on user vaddr alignment","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nio_uring/rsrc: don't rely on user vaddr alignment\n\nThere is no guaranteed alignment for user pointers, however the\ncalculation of an offset of the first page into a folio after coalescing\nuses some weird bit mask logic, get rid of it."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a8edbb424b1391b077407c75d8f5d2ede77aa70d","status":"affected","lessThan":"50998b0ae7d9d552e96d8b7239981cf05f65eff5","versionType":"git"},{"version":"a8edbb424b1391b077407c75d8f5d2ede77aa70d","status":"affected","lessThan":"f16769241594be59387b56ab525e327f54377e60","versionType":"git"},{"version":"a8edbb424b1391b077407c75d8f5d2ede77aa70d","status":"affected","lessThan":"3a3c6d61577dbb23c09df3e21f6f9eda1ecd634b","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["io_uring/rsrc.c","io_uring/rsrc.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.12","versionType":"semver"},{"version":"6.12.36","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.5","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["io_uring/rsrc.c","io_uring/rsrc.h"]}],"references":[{"url":"https://git.kernel.org/stable/c/50998b0ae7d9d552e96d8b7239981cf05f65eff5"},{"url":"https://git.kernel.org/stable/c/f16769241594be59387b56ab525e327f54377e60"},{"url":"https://git.kernel.org/stable/c/3a3c6d61577dbb23c09df3e21f6f9eda1ecd634b"}],"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 vulnerable code is reached only through io_uring syscalls (io_uring_setup/io_uring_register with IORING_REGISTER_BUFFERS), which require local access; there is no network reachability.\nAC:L - The attacker fully controls the trigger — allocating a multi-page folio (mTHP/hugetlb) and creating a VA-vs-folio misalignment, then registering it — with no race or externally-determined condition, making it deterministically reproducible.\nPR:L - IORING_REGISTER_BUFFERS has no capability check and io_uring is available to unprivileged users by default; a basic local user can register a coalescable large-folio buffer.\nUI:N - The entire flow (map memory, register buffer, submit fixed I/O) is performed by the attacker's own process with no victim interaction.\nS:U - The corruption stays within the kernel's own security scope; there is no VM/IOMMU/sandbox boundary being crossed.\nC:H - The wrong bv_offset plus mis-driven seg_skip/nr_segs arithmetic can read out of the bvec array and at unintended folio offsets (including shared file-backed folios), disclosing kernel heap and cross-mapping memory.\nI:H - WRITE_FIXED with the miscomputed offset writes attacker-supplied I/O data at wrong offsets and potential wild page pointers, giving an out-of-bounds write / memory-corruption primitive.\nA:H - Dereferencing a garbage bio_vec / wild bv_page during fixed-buffer I/O readily oopses or panics the kernel."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:08:41.986Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"6.12.36"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"6.15.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"6.16"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2025-40216","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-15T21:58:17.038442Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T22:02:41.119Z"}}]}}}