{"id":"CVE-2022-50077","state":"PUBLISHED","title":"apparmor: fix reference count leak in aa_pivotroot()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\napparmor: fix reference count leak in aa_pivotroot()\n\nThe aa_pivotroot() function has a reference counting bug in a specific\npath. When aa_replace_current_label() returns on success, the function\nforgets to decrement the reference count of “target”, which is\nincreased earlier by build_pivotroot(), causing a reference leak.\n\nFix it by decreasing the refcount of “target” in that path.","publishedAt":"2025-06-18T11:02:20.318Z","updatedAt":"2026-05-11T19:12:25.193Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"2ea3ffb7782a84da33a8382f13ebd016da50079b","status":"affected","lessThan":"d53194707d2a1851be027cd74266b96ceff799d3","versionType":"git"},{"version":"2ea3ffb7782a84da33a8382f13ebd016da50079b","status":"affected","lessThan":"f4d5c7796571624e3f380b447ada52834270a287","versionType":"git"},{"version":"2ea3ffb7782a84da33a8382f13ebd016da50079b","status":"affected","lessThan":"ef6fb6f0d0d8440595b45a7e53c6162c737177f4","versionType":"git"},{"version":"2ea3ffb7782a84da33a8382f13ebd016da50079b","status":"affected","lessThan":"2ceeb3296e9dde1d5772348046affcefdea605e2","versionType":"git"},{"version":"2ea3ffb7782a84da33a8382f13ebd016da50079b","status":"affected","lessThan":"64103ea357734b82384c925cba4758fdb909be0c","versionType":"git"},{"version":"2ea3ffb7782a84da33a8382f13ebd016da50079b","status":"affected","lessThan":"3ca40ad7afae144169a43988ef1a3f16182faf0a","versionType":"git"},{"version":"2ea3ffb7782a84da33a8382f13ebd016da50079b","status":"affected","lessThan":"11c3627ec6b56c1525013f336f41b79a983b4d46","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/apparmor/mount.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.14","versionType":"semver"},{"version":"4.14.291","status":"unaffected","lessThanOrEqual":"4.14.*","versionType":"semver"},{"version":"4.19.256","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.211","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.138","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.63","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.19.4","status":"unaffected","lessThanOrEqual":"5.19.*","versionType":"semver"},{"version":"6.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/apparmor/mount.c"]}],"references":["https://git.kernel.org/stable/c/d53194707d2a1851be027cd74266b96ceff799d3","https://git.kernel.org/stable/c/f4d5c7796571624e3f380b447ada52834270a287","https://git.kernel.org/stable/c/ef6fb6f0d0d8440595b45a7e53c6162c737177f4","https://git.kernel.org/stable/c/2ceeb3296e9dde1d5772348046affcefdea605e2","https://git.kernel.org/stable/c/64103ea357734b82384c925cba4758fdb909be0c","https://git.kernel.org/stable/c/3ca40ad7afae144169a43988ef1a3f16182faf0a","https://git.kernel.org/stable/c/11c3627ec6b56c1525013f336f41b79a983b4d46"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/50xxx/CVE-2022-50077.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-50077","state":"PUBLISHED","datePublished":"2025-06-18T11:02:20.318Z","dateUpdated":"2026-05-11T19:12:25.193Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-06-18T10:57:27.408Z"},"containers":{"cna":{"title":"apparmor: fix reference count leak in aa_pivotroot()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\napparmor: fix reference count leak in aa_pivotroot()\n\nThe aa_pivotroot() function has a reference counting bug in a specific\npath. When aa_replace_current_label() returns on success, the function\nforgets to decrement the reference count of “target”, which is\nincreased earlier by build_pivotroot(), causing a reference leak.\n\nFix it by decreasing the refcount of “target” in that path."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"2ea3ffb7782a84da33a8382f13ebd016da50079b","status":"affected","lessThan":"d53194707d2a1851be027cd74266b96ceff799d3","versionType":"git"},{"version":"2ea3ffb7782a84da33a8382f13ebd016da50079b","status":"affected","lessThan":"f4d5c7796571624e3f380b447ada52834270a287","versionType":"git"},{"version":"2ea3ffb7782a84da33a8382f13ebd016da50079b","status":"affected","lessThan":"ef6fb6f0d0d8440595b45a7e53c6162c737177f4","versionType":"git"},{"version":"2ea3ffb7782a84da33a8382f13ebd016da50079b","status":"affected","lessThan":"2ceeb3296e9dde1d5772348046affcefdea605e2","versionType":"git"},{"version":"2ea3ffb7782a84da33a8382f13ebd016da50079b","status":"affected","lessThan":"64103ea357734b82384c925cba4758fdb909be0c","versionType":"git"},{"version":"2ea3ffb7782a84da33a8382f13ebd016da50079b","status":"affected","lessThan":"3ca40ad7afae144169a43988ef1a3f16182faf0a","versionType":"git"},{"version":"2ea3ffb7782a84da33a8382f13ebd016da50079b","status":"affected","lessThan":"11c3627ec6b56c1525013f336f41b79a983b4d46","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/apparmor/mount.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.14","versionType":"semver"},{"version":"4.14.291","status":"unaffected","lessThanOrEqual":"4.14.*","versionType":"semver"},{"version":"4.19.256","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.211","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.138","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.63","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.19.4","status":"unaffected","lessThanOrEqual":"5.19.*","versionType":"semver"},{"version":"6.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/apparmor/mount.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/d53194707d2a1851be027cd74266b96ceff799d3"},{"url":"https://git.kernel.org/stable/c/f4d5c7796571624e3f380b447ada52834270a287"},{"url":"https://git.kernel.org/stable/c/ef6fb6f0d0d8440595b45a7e53c6162c737177f4"},{"url":"https://git.kernel.org/stable/c/2ceeb3296e9dde1d5772348046affcefdea605e2"},{"url":"https://git.kernel.org/stable/c/64103ea357734b82384c925cba4758fdb909be0c"},{"url":"https://git.kernel.org/stable/c/3ca40ad7afae144169a43988ef1a3f16182faf0a"},{"url":"https://git.kernel.org/stable/c/11c3627ec6b56c1525013f336f41b79a983b4d46"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T19:12:25.193Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14","versionEndExcluding":"4.14.291"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14","versionEndExcluding":"4.19.256"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14","versionEndExcluding":"5.4.211"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14","versionEndExcluding":"5.10.138"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14","versionEndExcluding":"5.15.63"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14","versionEndExcluding":"5.19.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14","versionEndExcluding":"6.0"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}