CVE-2026-99838

Source
https://cve.org/CVERecord?id=CVE-2026-99838
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99838.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-99838
Downstream
Published
2026-11-30T13:17:31Z
Modified
2026-11-30T15:02:31Z
Summary
apparmor: fix refcount leak in aa_get_newest_profile()
Details

In the Linux kernel, the following vulnerability has been resolved:

apparmor: fix refcount leak in aa_get_newest_profile()

The labels_profile() macro is evaluating its argument twice

#define labels_profile(X) ((X)->vec[(X)->size - 1])

unfortunately aa_get_newest_profile() passes aa_get_newest_label(&p->label) so every call to aa_get_newest_profile results in 2 refcounts being taken with one being leaked.

There is no need for labels_profile() to be a macro. Convert it to an inline fn, which ensures all uses are passing the correct struct and removes the double evaluation.

Database specific
{
    "cna_assigner":  "Linux",
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99838.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

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"

Linux / Kernel

Package

Name
Kernel

Affected 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"