{"id":"CVE-2026-143173","summary":"aio: don't let exit_aio() return before complete() is done","details":"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-\u003enr, 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 -\u003e 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().","modified":"2026-12-03T11:01:30.460084828Z","published":"2026-12-03T09:20:08.250Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143173.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/12710a697096e51c66b988bb47b3c5aef2d7349c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/16bcb0f363328d80e03b0c93ffbda548a17a1fe1"},{"type":"WEB","url":"https://git.kernel.org/stable/c/59bb5ecfd2fcfcfd5e7c97f6e68442dd7cb65c6f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8a8b40a5fc1f0ccf2e41d36ca64e22b5aab76389"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ac4b449b39e605123c12ea10042cafc9b6f39603"},{"type":"WEB","url":"https://git.kernel.org/stable/c/eac29989106057e848dfd435e9a20a907436adba"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143173.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-143173"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"dc48e56d761610da4ea1088d1bea0a030b8e3e43"},{"fixed":"8a8b40a5fc1f0ccf2e41d36ca64e22b5aab76389"},{"fixed":"59bb5ecfd2fcfcfd5e7c97f6e68442dd7cb65c6f"},{"fixed":"16bcb0f363328d80e03b0c93ffbda548a17a1fe1"},{"fixed":"eac29989106057e848dfd435e9a20a907436adba"},{"fixed":"12710a697096e51c66b988bb47b3c5aef2d7349c"},{"fixed":"ac4b449b39e605123c12ea10042cafc9b6f39603"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"0b8b97704fbe442b3bba7a2c7eba9113122abafd"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"147c00b31dfeaeb83f917b29a4c05b605b68a8e0"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"b393b2aa50b3f85cab80fd11de00849917861b93"}]}],"versions":["v3.12.74","v3.12.73","v3.12.72","v3.12.71","v3.12.70","v3.12.69","v3.12.68","v3.12.67","v3.12.66","v3.12.65","v3.12.64","v3.12.63","v3.12.62","v3.12.61","v3.12.60","v3.12.59","v3.12.58","v3.12.57","v3.12.56","v3.12.55","v3.12.54","v3.12.53","v3.12.52","v3.12.51","v3.12.50","v3.12.49","v3.12.48","v3.12.47","v3.12.46","v3.12.45","v3.12.44","v3.16.85","v3.16.84","v3.16.83","v3.16.82","v3.16.81","v3.16.80","v3.16.79","v3.16.78","v3.16.77","v3.16.76","v3.16.75","v3.16.74","v3.16.73","v3.16.72","v3.16.71","v3.16.70","v3.16.69","v3.16.68","v3.16.67","v3.16.66","v3.16.65","v3.16.64","v3.16.63","v3.16.62","v3.16.61","v3.16.60","v3.16.59","v3.16.58","v3.16.57","v4.0.9","v4.0.8","v4.0.7","v4.0.6"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-143173.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.12.44"},{"fixed":"3.13"}]},{"type":"ECOSYSTEM","events":[{"introduced":"3.16.57"},{"fixed":"3.17"}]},{"type":"ECOSYSTEM","events":[{"introduced":"4.0.6"},{"fixed":"4.1"}]},{"type":"ECOSYSTEM","events":[{"introduced":"4.1.0"},{"fixed":"5.10.276"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.227"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.12.120"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.66"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.7"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-143173.json"}}],"schema_version":"1.9.2"}