{"id":"CVE-2026-99838","aliases":["CVE-2026-99838"],"related":[],"kind":"vulnerability","state":"published","title":"apparmor: fix refcount leak in aa_get_newest_profile()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\napparmor: fix refcount leak in aa_get_newest_profile()\n\nThe labels_profile() macro is evaluating its argument twice\n\n  #define labels_profile(X) ((X)->vec[(X)->size - 1])\n\nunfortunately aa_get_newest_profile() passes\n   aa_get_newest_label(&p->label)\nso every call to aa_get_newest_profile results in 2 refcounts\nbeing taken with one being leaked.\n\nThere is no need for labels_profile() to be a macro. Convert it to\nan inline fn, which ensures all uses are passing the correct struct\nand removes the double evaluation.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\napparmor: fix refcount leak in aa_get_newest_profile()\n\nThe labels_profile() macro is evaluating its argument twice\n\n  #define labels_profile(X) ((X)->vec[(X)->size - 1])\n\nunfortunately aa_get_newest_profile() passes\n   aa_get_newest_label(&p->label)\nso every call to aa_get_newest_profile results in 2 refcounts\nbeing taken with one being leaked.\n\nThere is no need for labels_profile() to be a macro. Convert it to\nan inline fn, which ensures all uses are passing the correct struct\nand removes the double evaluation.","source":"cvelist"}],"published":"2026-11-30T13:17:31.392Z","modified":"2026-11-30T14:20:16.803Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"637f688dc3dc304a89f441d76f49a0e35bc49c08","fixed":"d8a4aac994f8497b20ace6c3ca33425c80ab7492","status":"affected"},{"type":"git","introduced":"637f688dc3dc304a89f441d76f49a0e35bc49c08","fixed":"c70aba4b08a081cae49aaa7f94e76758b221b01b","status":"affected"},{"type":"git","introduced":"637f688dc3dc304a89f441d76f49a0e35bc49c08","fixed":"52e2c4b19e5a097e7c3fa99a39ad66b9d307c33a","status":"affected"},{"type":"git","introduced":"637f688dc3dc304a89f441d76f49a0e35bc49c08","fixed":"d8bc7adff286996fd3e5e984e25eb2359eb5cd94","status":"affected"},{"type":"git","introduced":"637f688dc3dc304a89f441d76f49a0e35bc49c08","fixed":"e89a7966686b80e9a0e4b49c6040b6a18c6c98aa","status":"affected"},{"type":"git","introduced":"637f688dc3dc304a89f441d76f49a0e35bc49c08","fixed":"8c054c71d47d19472d2aa2efbae89d2c85e0b7cf","status":"affected"},{"type":"git","introduced":"637f688dc3dc304a89f441d76f49a0e35bc49c08","fixed":"dabd6ac70acaa838e011df72286734faa318f99b","status":"affected"},{"type":"git","introduced":"637f688dc3dc304a89f441d76f49a0e35bc49c08","fixed":"33ed50716251d5b2875706c40d0c8082d46be0b1","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.13","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.13","status":"unaffected"},{"type":"semver","introduced":"5.10.275","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.226","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.193","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.117","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.63","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.4","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/d8a4aac994f8497b20ace6c3ca33425c80ab7492","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c70aba4b08a081cae49aaa7f94e76758b221b01b","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/52e2c4b19e5a097e7c3fa99a39ad66b9d307c33a","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d8bc7adff286996fd3e5e984e25eb2359eb5cd94","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e89a7966686b80e9a0e4b49c6040b6a18c6c98aa","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8c054c71d47d19472d2aa2efbae89d2c85e0b7cf","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/dabd6ac70acaa838e011df72286734faa318f99b","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/33ed50716251d5b2875706c40d0c8082d46be0b1","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-99838","url":"https://www.cve.org/CVERecord?id=CVE-2026-99838","licence":"CVE Terms of Use","modified":"2026-11-30T13:17:31.392Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-99838","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99838","licence":"Public domain","modified":"2026-11-30T14:20:16.803Z"}],"updatedAt":"2026-11-30T14:33:29.422Z","epss":{"score":0.00221,"percentile":0.13461,"date":"2026-12-01T12:00:22.000Z"}}