{"id":"CVE-2021-47040","state":"PUBLISHED","title":"io_uring: fix overflows checks in provide buffers","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nio_uring: fix overflows checks in provide buffers\n\nColin reported before possible overflow and sign extension problems in\nio_provide_buffers_prep(). As Linus pointed out previous attempt did nothing\nuseful, see d81269fecb8ce (\"io_uring: fix provide_buffers sign extension\").\n\nDo that with help of check_<op>_overflow helpers. And fix struct\nio_provide_buf::len type, as it doesn't make much sense to keep it\nsigned.","publishedAt":"2024-02-28T08:13:46.557Z","updatedAt":"2026-08-05T08:45:40.950Z","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":"efe68c1ca8f49e8c06afd74b699411bfbb8ba1ff","status":"affected","lessThan":"cbbc13b115b8f18e0a714d89f87fbdc499acfe2d","versionType":"git"},{"version":"efe68c1ca8f49e8c06afd74b699411bfbb8ba1ff","status":"affected","lessThan":"51bf90901952aaac564bbdb36b2b503050c53dd9","versionType":"git"},{"version":"efe68c1ca8f49e8c06afd74b699411bfbb8ba1ff","status":"affected","lessThan":"84b8c266c4bfe9ed5128e13253c388deb74b1b03","versionType":"git"},{"version":"efe68c1ca8f49e8c06afd74b699411bfbb8ba1ff","status":"affected","lessThan":"38134ada0ceea3e848fe993263c0ff6207fd46e7","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/io_uring.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.8","versionType":"semver"},{"version":"5.10.37","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.11.21","status":"unaffected","lessThanOrEqual":"5.11.*","versionType":"semver"},{"version":"5.12.4","status":"unaffected","lessThanOrEqual":"5.12.*","versionType":"semver"},{"version":"5.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/io_uring.c"]}],"references":["https://git.kernel.org/stable/c/cbbc13b115b8f18e0a714d89f87fbdc499acfe2d","https://git.kernel.org/stable/c/51bf90901952aaac564bbdb36b2b503050c53dd9","https://git.kernel.org/stable/c/84b8c266c4bfe9ed5128e13253c388deb74b1b03","https://git.kernel.org/stable/c/38134ada0ceea3e848fe993263c0ff6207fd46e7"],"weaknesses":[],"ingestedAt":"2026-10-29T19:49:19.404Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2021/47xxx/CVE-2021-47040.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2021-47040","state":"PUBLISHED","datePublished":"2024-02-28T08:13:46.557Z","dateUpdated":"2026-08-05T08:45:40.950Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-02-27T18:42:55.968Z"},"containers":{"cna":{"title":"io_uring: fix overflows checks in provide buffers","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nio_uring: fix overflows checks in provide buffers\n\nColin reported before possible overflow and sign extension problems in\nio_provide_buffers_prep(). As Linus pointed out previous attempt did nothing\nuseful, see d81269fecb8ce (\"io_uring: fix provide_buffers sign extension\").\n\nDo that with help of check_<op>_overflow helpers. And fix struct\nio_provide_buf::len type, as it doesn't make much sense to keep it\nsigned."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"efe68c1ca8f49e8c06afd74b699411bfbb8ba1ff","status":"affected","lessThan":"cbbc13b115b8f18e0a714d89f87fbdc499acfe2d","versionType":"git"},{"version":"efe68c1ca8f49e8c06afd74b699411bfbb8ba1ff","status":"affected","lessThan":"51bf90901952aaac564bbdb36b2b503050c53dd9","versionType":"git"},{"version":"efe68c1ca8f49e8c06afd74b699411bfbb8ba1ff","status":"affected","lessThan":"84b8c266c4bfe9ed5128e13253c388deb74b1b03","versionType":"git"},{"version":"efe68c1ca8f49e8c06afd74b699411bfbb8ba1ff","status":"affected","lessThan":"38134ada0ceea3e848fe993263c0ff6207fd46e7","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/io_uring.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.8","versionType":"semver"},{"version":"5.10.37","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.11.21","status":"unaffected","lessThanOrEqual":"5.11.*","versionType":"semver"},{"version":"5.12.4","status":"unaffected","lessThanOrEqual":"5.12.*","versionType":"semver"},{"version":"5.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/io_uring.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/cbbc13b115b8f18e0a714d89f87fbdc499acfe2d"},{"url":"https://git.kernel.org/stable/c/51bf90901952aaac564bbdb36b2b503050c53dd9"},{"url":"https://git.kernel.org/stable/c/84b8c266c4bfe9ed5128e13253c388deb74b1b03"},{"url":"https://git.kernel.org/stable/c/38134ada0ceea3e848fe993263c0ff6207fd46e7"}],"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 bug is reached only through local io_uring syscalls (io_uring_setup/io_uring_enter) submitting IORING_OP_PROVIDE_BUFFERS; it is not reachable from network packet processing.\nAC:L - The attacker fully controls sqe addr/len/nbufs and can reliably choose values that overflow len*nbufs (especially on 32-bit, e.g. size wrapping to 0) so the access_ok check validates far less than the registered range.\nPR:L - An unprivileged local user can create an io_uring instance and submit PROVIDE_BUFFERS with no capability requirement; the later io_uring_disabled sysctl did not exist in the affected versions.\nUI:N - Exploitation requires no victim action; the attacker triggers the bug entirely with their own io_uring submissions and subsequent BUFFER_SELECT I/O.\nS:U - Impact is limited to the local kernel's authority (local privilege escalation / memory safety), with no VM, IOMMU, or other security-authority boundary crossed.\nC:H - Overflow bypasses the sole access_ok validation for provided buffers that BUFFER_SELECT paths later trust, enabling registration of ranges that can include kernel addresses and yield arbitrary kernel memory disclosure when used for reads.\nI:H - The same access_ok bypass lets attacker-controlled provided-buffer addresses/lengths be used for kernel writes via BUFFER_SELECT recv/read paths, which is memory corruption exploitable for integrity compromise and code execution.\nA:H - Invalid provided-buffer ranges and signed-length mishandling can cause kernel faults, oopses, or otherwise crash/hang the system when the corrupted buffers are selected for I/O."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T08:45:40.950Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"5.10.37"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"5.11.21"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"5.12.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"5.13"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/cbbc13b115b8f18e0a714d89f87fbdc499acfe2d","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/51bf90901952aaac564bbdb36b2b503050c53dd9","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/84b8c266c4bfe9ed5128e13253c388deb74b1b03","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/38134ada0ceea3e848fe993263c0ff6207fd46e7","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-04T05:24:39.700Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2021-47040","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T15:57:48.348526Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-11T17:32:49.892Z"}}]}}}