{"id":"CVE-2026-99838","summary":"apparmor: fix refcount leak in aa_get_newest_profile()","details":"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)-\u003evec[(X)-\u003esize - 1])\n\nunfortunately aa_get_newest_profile() passes\n   aa_get_newest_label(&p-\u003elabel)\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.","modified":"2026-11-30T15:02:31.915400137Z","published":"2026-11-30T13:17:31.392Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99838.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/33ed50716251d5b2875706c40d0c8082d46be0b1"},{"type":"WEB","url":"https://git.kernel.org/stable/c/52e2c4b19e5a097e7c3fa99a39ad66b9d307c33a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8c054c71d47d19472d2aa2efbae89d2c85e0b7cf"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c70aba4b08a081cae49aaa7f94e76758b221b01b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d8a4aac994f8497b20ace6c3ca33425c80ab7492"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d8bc7adff286996fd3e5e984e25eb2359eb5cd94"},{"type":"WEB","url":"https://git.kernel.org/stable/c/dabd6ac70acaa838e011df72286734faa318f99b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e89a7966686b80e9a0e4b49c6040b6a18c6c98aa"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99838.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99838"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"637f688dc3dc304a89f441d76f49a0e35bc49c08"},{"fixed":"d8a4aac994f8497b20ace6c3ca33425c80ab7492"},{"fixed":"c70aba4b08a081cae49aaa7f94e76758b221b01b"},{"fixed":"52e2c4b19e5a097e7c3fa99a39ad66b9d307c33a"},{"fixed":"d8bc7adff286996fd3e5e984e25eb2359eb5cd94"},{"fixed":"e89a7966686b80e9a0e4b49c6040b6a18c6c98aa"},{"fixed":"8c054c71d47d19472d2aa2efbae89d2c85e0b7cf"},{"fixed":"dabd6ac70acaa838e011df72286734faa318f99b"},{"fixed":"33ed50716251d5b2875706c40d0c8082d46be0b1"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99838.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.13.0"},{"fixed":"5.10.275"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.226"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.1.193"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.163"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.117"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.63"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.4"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99838.json"}}],"schema_version":"1.9.2"}