{"id":"CVE-2026-139089","state":"PUBLISHED","title":"ucount: read the parent ucounts before dropping the rlimit count","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nucount: read the parent ucounts before dropping the rlimit count\n\ndo_dec_rlimit_put_ucounts() drops its share of iter->rlimit[type] and\nonly then loads iter->ns->ucounts. If the decrement leaves the count\nnon-zero, a concurrent caller can take it to zero and put the last\nreference, which frees the ucounts and possibly its user namespace with\nkfree_rcu(). An exiting task frees its pending signals without siglock\nor any RCU read-side section, so when it is preempted between the\ndecrement and the load for a grace period it reads freed memory and\nthen decrements a counter through the pointer it found there.\n\nA pending signal holds no reference on its ucounts: the reference is\ntaken by whoever moves the count from 0 to 1 and dropped by whoever\nmoves it back to 0, so the caller's share of the count is all that\nkeeps iter alive, and only until it is dropped.\n\nLoad the parent first; it stays pinned by the caller's share of its\nown count.","publishedAt":"2026-11-30T13:31:28.611Z","updatedAt":"2026-11-30T13:31:28.611Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"15bc01effefe97757ef02ca09e9d1b927ab22725","status":"affected","lessThan":"64b45e9ef33b037a66b3ffafeb8909c00272b4a1","versionType":"git"},{"version":"15bc01effefe97757ef02ca09e9d1b927ab22725","status":"affected","lessThan":"f43528c980b17aef3ee03368afe30e50ec47e2f6","versionType":"git"},{"version":"15bc01effefe97757ef02ca09e9d1b927ab22725","status":"affected","lessThan":"41e644f89e556db08b535108e27dcc62859da443","versionType":"git"},{"version":"15bc01effefe97757ef02ca09e9d1b927ab22725","status":"affected","lessThan":"a81dc6acbdbe145b7e5776fd317002a7cfbd769f","versionType":"git"},{"version":"15bc01effefe97757ef02ca09e9d1b927ab22725","status":"affected","lessThan":"cb10fa39723fdfd1b7a7c1e6c33bec5ab98cf1d3","versionType":"git"},{"version":"15bc01effefe97757ef02ca09e9d1b927ab22725","status":"affected","lessThan":"0aa5576a9836d68e4e6fa92d5bf6b95bad1fd697","versionType":"git"},{"version":"15bc01effefe97757ef02ca09e9d1b927ab22725","status":"affected","lessThan":"38bf603d1ea5d5a65a9cb277df75327ffec01ff1","versionType":"git"},{"version":"e8735e2e306f1c9c8b3a4b9218a349f7d96e3df6","status":"affected","versionType":"git"},{"version":"5.14.15","status":"affected","lessThan":"5.15","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/ucount.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"5.15.226","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.193","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/ucount.c"]}],"references":["https://git.kernel.org/stable/c/64b45e9ef33b037a66b3ffafeb8909c00272b4a1","https://git.kernel.org/stable/c/f43528c980b17aef3ee03368afe30e50ec47e2f6","https://git.kernel.org/stable/c/41e644f89e556db08b535108e27dcc62859da443","https://git.kernel.org/stable/c/a81dc6acbdbe145b7e5776fd317002a7cfbd769f","https://git.kernel.org/stable/c/cb10fa39723fdfd1b7a7c1e6c33bec5ab98cf1d3","https://git.kernel.org/stable/c/0aa5576a9836d68e4e6fa92d5bf6b95bad1fd697","https://git.kernel.org/stable/c/38bf603d1ea5d5a65a9cb277df75327ffec01ff1"],"weaknesses":[],"ingestedAt":"2026-11-30T13:42:04.437Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139089.json","commit":"5317bbbde1916a58cb1fadabb726eb126daf44c1","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139089","state":"PUBLISHED","datePublished":"2026-11-30T13:31:28.611Z","dateUpdated":"2026-11-30T13:31:28.611Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.913Z"},"containers":{"cna":{"title":"ucount: read the parent ucounts before dropping the rlimit count","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nucount: read the parent ucounts before dropping the rlimit count\n\ndo_dec_rlimit_put_ucounts() drops its share of iter->rlimit[type] and\nonly then loads iter->ns->ucounts. If the decrement leaves the count\nnon-zero, a concurrent caller can take it to zero and put the last\nreference, which frees the ucounts and possibly its user namespace with\nkfree_rcu(). An exiting task frees its pending signals without siglock\nor any RCU read-side section, so when it is preempted between the\ndecrement and the load for a grace period it reads freed memory and\nthen decrements a counter through the pointer it found there.\n\nA pending signal holds no reference on its ucounts: the reference is\ntaken by whoever moves the count from 0 to 1 and dropped by whoever\nmoves it back to 0, so the caller's share of the count is all that\nkeeps iter alive, and only until it is dropped.\n\nLoad the parent first; it stays pinned by the caller's share of its\nown count."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"15bc01effefe97757ef02ca09e9d1b927ab22725","status":"affected","lessThan":"64b45e9ef33b037a66b3ffafeb8909c00272b4a1","versionType":"git"},{"version":"15bc01effefe97757ef02ca09e9d1b927ab22725","status":"affected","lessThan":"f43528c980b17aef3ee03368afe30e50ec47e2f6","versionType":"git"},{"version":"15bc01effefe97757ef02ca09e9d1b927ab22725","status":"affected","lessThan":"41e644f89e556db08b535108e27dcc62859da443","versionType":"git"},{"version":"15bc01effefe97757ef02ca09e9d1b927ab22725","status":"affected","lessThan":"a81dc6acbdbe145b7e5776fd317002a7cfbd769f","versionType":"git"},{"version":"15bc01effefe97757ef02ca09e9d1b927ab22725","status":"affected","lessThan":"cb10fa39723fdfd1b7a7c1e6c33bec5ab98cf1d3","versionType":"git"},{"version":"15bc01effefe97757ef02ca09e9d1b927ab22725","status":"affected","lessThan":"0aa5576a9836d68e4e6fa92d5bf6b95bad1fd697","versionType":"git"},{"version":"15bc01effefe97757ef02ca09e9d1b927ab22725","status":"affected","lessThan":"38bf603d1ea5d5a65a9cb277df75327ffec01ff1","versionType":"git"},{"version":"e8735e2e306f1c9c8b3a4b9218a349f7d96e3df6","status":"affected","versionType":"git"},{"version":"5.14.15","status":"affected","lessThan":"5.15","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/ucount.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"5.15.226","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.193","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/ucount.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/64b45e9ef33b037a66b3ffafeb8909c00272b4a1"},{"url":"https://git.kernel.org/stable/c/f43528c980b17aef3ee03368afe30e50ec47e2f6"},{"url":"https://git.kernel.org/stable/c/41e644f89e556db08b535108e27dcc62859da443"},{"url":"https://git.kernel.org/stable/c/a81dc6acbdbe145b7e5776fd317002a7cfbd769f"},{"url":"https://git.kernel.org/stable/c/cb10fa39723fdfd1b7a7c1e6c33bec5ab98cf1d3"},{"url":"https://git.kernel.org/stable/c/0aa5576a9836d68e4e6fa92d5bf6b95bad1fd697"},{"url":"https://git.kernel.org/stable/c/38bf603d1ea5d5a65a9cb277df75327ffec01ff1"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:31:28.611Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"5.15.226"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.1.193"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.6.163"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.12.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"7.4-rc1"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14.15"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}