{"id":"CVE-2026-143173","state":"PUBLISHED","title":"aio: don't let exit_aio() return before complete() is done","description":"In the Linux kernel, the following vulnerability has been resolved:\n\naio: don't let exit_aio() return before complete() is done\n\nexit_aio() kills all contexts in one go and waits for them with a\nsingle on-stack struct ctx_rq_wait. The count starts at table->nr, each\nkilled context drops one count in free_ioctx_reqs() and exit_aio()\nsubtracts the empty slots afterwards. Whoever drops the last count\neither calls complete() or, if it is exit_aio(), skips the wait.\n\nWith a full table skipped is zero and atomic_sub_and_test(0, ...) only\ntells us whether the count already hit zero. free_ioctx_reqs() runs from\nthe percpu_ref RCU callback, so if exit_aio() is off the CPU long enough\nthe last callback can have done its atomic_dec_and_test() but not yet\ncalled complete():\n\n    free_ioctx_reqs()                    exit_aio()\n    atomic_dec_and_test() // 1 -> 0\n                                         atomic_sub_and_test(0) // true\n                                         kfree(table)\n                                         return\n    complete(&wait.comp)\n\ncomplete() then locks and writes a completion on a stack frame that is\ngone. So hold an extra count for exit_aio() itself. Then the last count\nis always dropped by exit_aio() after it waited, or by a callback while\nexit_aio() waits for it. An unprivileged user gets there with four\nio_setup() calls and an exit without io_destroy().","publishedAt":"2026-12-03T09:20:08.250Z","updatedAt":"2026-12-03T09:20:08.250Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"dc48e56d761610da4ea1088d1bea0a030b8e3e43","status":"affected","lessThan":"8a8b40a5fc1f0ccf2e41d36ca64e22b5aab76389","versionType":"git"},{"version":"dc48e56d761610da4ea1088d1bea0a030b8e3e43","status":"affected","lessThan":"59bb5ecfd2fcfcfd5e7c97f6e68442dd7cb65c6f","versionType":"git"},{"version":"dc48e56d761610da4ea1088d1bea0a030b8e3e43","status":"affected","lessThan":"16bcb0f363328d80e03b0c93ffbda548a17a1fe1","versionType":"git"},{"version":"dc48e56d761610da4ea1088d1bea0a030b8e3e43","status":"affected","lessThan":"eac29989106057e848dfd435e9a20a907436adba","versionType":"git"},{"version":"dc48e56d761610da4ea1088d1bea0a030b8e3e43","status":"affected","lessThan":"12710a697096e51c66b988bb47b3c5aef2d7349c","versionType":"git"},{"version":"dc48e56d761610da4ea1088d1bea0a030b8e3e43","status":"affected","lessThan":"ac4b449b39e605123c12ea10042cafc9b6f39603","versionType":"git"},{"version":"0b8b97704fbe442b3bba7a2c7eba9113122abafd","status":"affected","versionType":"git"},{"version":"147c00b31dfeaeb83f917b29a4c05b605b68a8e0","status":"affected","versionType":"git"},{"version":"b393b2aa50b3f85cab80fd11de00849917861b93","status":"affected","versionType":"git"},{"version":"3.12.44","status":"affected","lessThan":"3.13","versionType":"semver"},{"version":"3.16.57","status":"affected","lessThan":"3.17","versionType":"semver"},{"version":"4.0.6","status":"affected","lessThan":"4.1","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/aio.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.1","versionType":"semver"},{"version":"5.10.276","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.227","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/aio.c"]}],"references":["https://git.kernel.org/stable/c/8a8b40a5fc1f0ccf2e41d36ca64e22b5aab76389","https://git.kernel.org/stable/c/59bb5ecfd2fcfcfd5e7c97f6e68442dd7cb65c6f","https://git.kernel.org/stable/c/16bcb0f363328d80e03b0c93ffbda548a17a1fe1","https://git.kernel.org/stable/c/eac29989106057e848dfd435e9a20a907436adba","https://git.kernel.org/stable/c/12710a697096e51c66b988bb47b3c5aef2d7349c","https://git.kernel.org/stable/c/ac4b449b39e605123c12ea10042cafc9b6f39603"],"weaknesses":[],"ingestedAt":"2026-12-03T09:40:06.136Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/143xxx/CVE-2026-143173.json","commit":"9e309c7c0f08856e2558a1df33f75dca027fab70","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-143173","state":"PUBLISHED","datePublished":"2026-12-03T09:20:08.250Z","dateUpdated":"2026-12-03T09:20:08.250Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-12-03T03:10:28.357Z"},"containers":{"cna":{"title":"aio: don't let exit_aio() return before complete() is done","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\naio: don't let exit_aio() return before complete() is done\n\nexit_aio() kills all contexts in one go and waits for them with a\nsingle on-stack struct ctx_rq_wait. The count starts at table->nr, each\nkilled context drops one count in free_ioctx_reqs() and exit_aio()\nsubtracts the empty slots afterwards. Whoever drops the last count\neither calls complete() or, if it is exit_aio(), skips the wait.\n\nWith a full table skipped is zero and atomic_sub_and_test(0, ...) only\ntells us whether the count already hit zero. free_ioctx_reqs() runs from\nthe percpu_ref RCU callback, so if exit_aio() is off the CPU long enough\nthe last callback can have done its atomic_dec_and_test() but not yet\ncalled complete():\n\n    free_ioctx_reqs()                    exit_aio()\n    atomic_dec_and_test() // 1 -> 0\n                                         atomic_sub_and_test(0) // true\n                                         kfree(table)\n                                         return\n    complete(&wait.comp)\n\ncomplete() then locks and writes a completion on a stack frame that is\ngone. So hold an extra count for exit_aio() itself. Then the last count\nis always dropped by exit_aio() after it waited, or by a callback while\nexit_aio() waits for it. An unprivileged user gets there with four\nio_setup() calls and an exit without io_destroy()."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"dc48e56d761610da4ea1088d1bea0a030b8e3e43","status":"affected","lessThan":"8a8b40a5fc1f0ccf2e41d36ca64e22b5aab76389","versionType":"git"},{"version":"dc48e56d761610da4ea1088d1bea0a030b8e3e43","status":"affected","lessThan":"59bb5ecfd2fcfcfd5e7c97f6e68442dd7cb65c6f","versionType":"git"},{"version":"dc48e56d761610da4ea1088d1bea0a030b8e3e43","status":"affected","lessThan":"16bcb0f363328d80e03b0c93ffbda548a17a1fe1","versionType":"git"},{"version":"dc48e56d761610da4ea1088d1bea0a030b8e3e43","status":"affected","lessThan":"eac29989106057e848dfd435e9a20a907436adba","versionType":"git"},{"version":"dc48e56d761610da4ea1088d1bea0a030b8e3e43","status":"affected","lessThan":"12710a697096e51c66b988bb47b3c5aef2d7349c","versionType":"git"},{"version":"dc48e56d761610da4ea1088d1bea0a030b8e3e43","status":"affected","lessThan":"ac4b449b39e605123c12ea10042cafc9b6f39603","versionType":"git"},{"version":"0b8b97704fbe442b3bba7a2c7eba9113122abafd","status":"affected","versionType":"git"},{"version":"147c00b31dfeaeb83f917b29a4c05b605b68a8e0","status":"affected","versionType":"git"},{"version":"b393b2aa50b3f85cab80fd11de00849917861b93","status":"affected","versionType":"git"},{"version":"3.12.44","status":"affected","lessThan":"3.13","versionType":"semver"},{"version":"3.16.57","status":"affected","lessThan":"3.17","versionType":"semver"},{"version":"4.0.6","status":"affected","lessThan":"4.1","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/aio.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.1","versionType":"semver"},{"version":"5.10.276","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.227","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/aio.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/8a8b40a5fc1f0ccf2e41d36ca64e22b5aab76389"},{"url":"https://git.kernel.org/stable/c/59bb5ecfd2fcfcfd5e7c97f6e68442dd7cb65c6f"},{"url":"https://git.kernel.org/stable/c/16bcb0f363328d80e03b0c93ffbda548a17a1fe1"},{"url":"https://git.kernel.org/stable/c/eac29989106057e848dfd435e9a20a907436adba"},{"url":"https://git.kernel.org/stable/c/12710a697096e51c66b988bb47b3c5aef2d7349c"},{"url":"https://git.kernel.org/stable/c/ac4b449b39e605123c12ea10042cafc9b6f39603"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-12-03T09:20:08.250Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.1","versionEndExcluding":"5.10.276"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.1","versionEndExcluding":"5.15.227"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.1","versionEndExcluding":"6.12.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.1","versionEndExcluding":"6.18.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.1","versionEndExcluding":"7.3.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.1","versionEndExcluding":"7.4-rc3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.12.44"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.16.57"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.0.6"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}