{"api_version":"1","generated_at":"2026-11-30T13:31:37+00:00","cve":"CVE-2026-99505","urls":{"html":"https://cve.report/CVE-2026-99505","api":"https://cve.report/api/cve/CVE-2026-99505.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-99505","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-99505"},"summary":{"title":"apparmor: fix a use-after-free in aa_lookupn_ns()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\napparmor: fix a use-after-free in aa_lookupn_ns()\n\naa_lookupn_ns() takes a reference on the namespace it finds with\naa_get_ns(), which is kref_get() on the reference count that the\nnamespace is released through, without checking whether the namespace\nis still in use.  A concurrent removal of a \":\"-prefixed namespace\nlooks the same namespace up and only then takes the parent lock to\nremove it, so the last reference can be dropped between the lookup and\nthe aa_get_ns() call: the reference count then reports the increment on\na zero count and the kernel classifies the following use of the object\nas a use-after-free.  A user with CAP_MAC_ADMIN can trigger this by\nwriting a \":<name>\" removal and a \":<name>/<profile>\" removal to\n/sys/kernel/security/apparmor/.remove concurrently.\n\nrefcount_t: addition on 0; use-after-free.\nWARNING: lib/refcount.c:25 at refcount_warn_saturate+0xc0/0xe0, CPU#6\nCall Trace:\n <TASK>\n aa_lookupn_ns+0xa9/0xc0\n aa_remove_profiles+0x4fb/0x730\n ? __kvmalloc_node_noprof+0x219/0x5c0\n ? __pfx_aa_remove_profiles+0x10/0x10\n ? aa_loaddata_alloc+0x65/0x1f0\n ? _copy_from_user+0x2d/0x80\n ? aa_loaddata_alloc+0x111/0x1f0\n profile_remove+0x2ee/0x4a0\n vfs_write+0x21e/0xcf0\n ? rcu_core+0x29c/0x1740\n ? timerqueue_linked_add+0x1f4/0x3d0\n ? __pfx_vfs_write+0x10/0x10\n ? mutex_lock+0x81/0xe0\n ? __pfx_mutex_lock+0x10/0x10\n ? __pfx_rcu_core+0x10/0x10\n ? __pfx_hrtimer_update_next_event+0x10/0x10\n ? mutex_unlock+0x7b/0xd0\n ? fdget_pos+0x24d/0x4b0\n ksys_write+0xf7/0x1c0\n ? __pfx_ksys_write+0x10/0x10\n ? restore_fpregs_from_fpstate+0x37/0xc0\n do_syscall_64+0xf9/0x540\n entry_SYSCALL_64_after_hwframe+0x77/0x7f\n </TASK>\n\nFix by rejecting a namespace whose reference count is zero.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-19 15:18:05","updated_at":"2026-11-23 08:17:52"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/8db1a8614b4f8f3da11c568e2b5af4fe56eef360","name":"https://git.kernel.org/stable/c/8db1a8614b4f8f3da11c568e2b5af4fe56eef360","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/1f09cc23d1cdf440ff03d4a0cf3ed8100134d9d3","name":"https://git.kernel.org/stable/c/1f09cc23d1cdf440ff03d4a0cf3ed8100134d9d3","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/ba45d73f8782e3e9d521ec2bd4c4b4b4dc548f2b","name":"https://git.kernel.org/stable/c/ba45d73f8782e3e9d521ec2bd4c4b4b4dc548f2b","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/f292873ceb4bd3a1a0f75f884361cd556e457692","name":"https://git.kernel.org/stable/c/f292873ceb4bd3a1a0f75f884361cd556e457692","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/2588c5693f4535e856841976cb1e1532bae77109","name":"https://git.kernel.org/stable/c/2588c5693f4535e856841976cb1e1532bae77109","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/174b4b90ec6731934cf84eb267a86ad7152267fa","name":"https://git.kernel.org/stable/c/174b4b90ec6731934cf84eb267a86ad7152267fa","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/df8685e4f9da816927395c456a62c1043ecdd99a","name":"https://git.kernel.org/stable/c/df8685e4f9da816927395c456a62c1043ecdd99a","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/87124024b0a7c46e04f5588808fd2c0e95ce567a","name":"https://git.kernel.org/stable/c/87124024b0a7c46e04f5588808fd2c0e95ce567a","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-99505","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99505","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 3664268f19ea07bec55df92fe53ff9ed28968bcc 87124024b0a7c46e04f5588808fd2c0e95ce567a git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 3664268f19ea07bec55df92fe53ff9ed28968bcc df8685e4f9da816927395c456a62c1043ecdd99a git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 3664268f19ea07bec55df92fe53ff9ed28968bcc ba45d73f8782e3e9d521ec2bd4c4b4b4dc548f2b git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 3664268f19ea07bec55df92fe53ff9ed28968bcc 1f09cc23d1cdf440ff03d4a0cf3ed8100134d9d3 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 3664268f19ea07bec55df92fe53ff9ed28968bcc 2588c5693f4535e856841976cb1e1532bae77109 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 3664268f19ea07bec55df92fe53ff9ed28968bcc 174b4b90ec6731934cf84eb267a86ad7152267fa git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 3664268f19ea07bec55df92fe53ff9ed28968bcc 8db1a8614b4f8f3da11c568e2b5af4fe56eef360 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 3664268f19ea07bec55df92fe53ff9ed28968bcc f292873ceb4bd3a1a0f75f884361cd556e457692 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4.13","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 4.13 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.10.275 5.10.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.15.226 5.15.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.193 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.163 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.117 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.61 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.2 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"99505","cve":"CVE-2026-99505","epss":"0.002180000","percentile":"0.123110000","score_date":"2026-11-23","updated_at":"2026-11-24 00:07:46"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["security/apparmor/include/policy_ns.h","security/apparmor/policy_ns.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"87124024b0a7c46e04f5588808fd2c0e95ce567a","status":"affected","version":"3664268f19ea07bec55df92fe53ff9ed28968bcc","versionType":"git"},{"lessThan":"df8685e4f9da816927395c456a62c1043ecdd99a","status":"affected","version":"3664268f19ea07bec55df92fe53ff9ed28968bcc","versionType":"git"},{"lessThan":"ba45d73f8782e3e9d521ec2bd4c4b4b4dc548f2b","status":"affected","version":"3664268f19ea07bec55df92fe53ff9ed28968bcc","versionType":"git"},{"lessThan":"1f09cc23d1cdf440ff03d4a0cf3ed8100134d9d3","status":"affected","version":"3664268f19ea07bec55df92fe53ff9ed28968bcc","versionType":"git"},{"lessThan":"2588c5693f4535e856841976cb1e1532bae77109","status":"affected","version":"3664268f19ea07bec55df92fe53ff9ed28968bcc","versionType":"git"},{"lessThan":"174b4b90ec6731934cf84eb267a86ad7152267fa","status":"affected","version":"3664268f19ea07bec55df92fe53ff9ed28968bcc","versionType":"git"},{"lessThan":"8db1a8614b4f8f3da11c568e2b5af4fe56eef360","status":"affected","version":"3664268f19ea07bec55df92fe53ff9ed28968bcc","versionType":"git"},{"lessThan":"f292873ceb4bd3a1a0f75f884361cd556e457692","status":"affected","version":"3664268f19ea07bec55df92fe53ff9ed28968bcc","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["security/apparmor/include/policy_ns.h","security/apparmor/policy_ns.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"4.13"},{"lessThan":"4.13","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"5.10.*","status":"unaffected","version":"5.10.275","versionType":"semver"},{"lessThanOrEqual":"5.15.*","status":"unaffected","version":"5.15.226","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.193","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.163","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.117","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.61","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.2","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.10.275","versionStartIncluding":"4.13","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.226","versionStartIncluding":"4.13","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.193","versionStartIncluding":"4.13","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.163","versionStartIncluding":"4.13","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.117","versionStartIncluding":"4.13","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.61","versionStartIncluding":"4.13","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.2","versionStartIncluding":"4.13","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"4.13","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\napparmor: fix a use-after-free in aa_lookupn_ns()\n\naa_lookupn_ns() takes a reference on the namespace it finds with\naa_get_ns(), which is kref_get() on the reference count that the\nnamespace is released through, without checking whether the namespace\nis still in use.  A concurrent removal of a \":\"-prefixed namespace\nlooks the same namespace up and only then takes the parent lock to\nremove it, so the last reference can be dropped between the lookup and\nthe aa_get_ns() call: the reference count then reports the increment on\na zero count and the kernel classifies the following use of the object\nas a use-after-free.  A user with CAP_MAC_ADMIN can trigger this by\nwriting a \":<name>\" removal and a \":<name>/<profile>\" removal to\n/sys/kernel/security/apparmor/.remove concurrently.\n\nrefcount_t: addition on 0; use-after-free.\nWARNING: lib/refcount.c:25 at refcount_warn_saturate+0xc0/0xe0, CPU#6\nCall Trace:\n <TASK>\n aa_lookupn_ns+0xa9/0xc0\n aa_remove_profiles+0x4fb/0x730\n ? __kvmalloc_node_noprof+0x219/0x5c0\n ? __pfx_aa_remove_profiles+0x10/0x10\n ? aa_loaddata_alloc+0x65/0x1f0\n ? _copy_from_user+0x2d/0x80\n ? aa_loaddata_alloc+0x111/0x1f0\n profile_remove+0x2ee/0x4a0\n vfs_write+0x21e/0xcf0\n ? rcu_core+0x29c/0x1740\n ? timerqueue_linked_add+0x1f4/0x3d0\n ? __pfx_vfs_write+0x10/0x10\n ? mutex_lock+0x81/0xe0\n ? __pfx_mutex_lock+0x10/0x10\n ? __pfx_rcu_core+0x10/0x10\n ? __pfx_hrtimer_update_next_event+0x10/0x10\n ? mutex_unlock+0x7b/0xd0\n ? fdget_pos+0x24d/0x4b0\n ksys_write+0xf7/0x1c0\n ? __pfx_ksys_write+0x10/0x10\n ? restore_fpregs_from_fpstate+0x37/0xc0\n do_syscall_64+0xf9/0x540\n entry_SYSCALL_64_after_hwframe+0x77/0x7f\n </TASK>\n\nFix by rejecting a namespace whose reference count is zero."}],"providerMetadata":{"dateUpdated":"2026-11-23T08:03:36.156Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/87124024b0a7c46e04f5588808fd2c0e95ce567a"},{"url":"https://git.kernel.org/stable/c/df8685e4f9da816927395c456a62c1043ecdd99a"},{"url":"https://git.kernel.org/stable/c/ba45d73f8782e3e9d521ec2bd4c4b4b4dc548f2b"},{"url":"https://git.kernel.org/stable/c/1f09cc23d1cdf440ff03d4a0cf3ed8100134d9d3"},{"url":"https://git.kernel.org/stable/c/2588c5693f4535e856841976cb1e1532bae77109"},{"url":"https://git.kernel.org/stable/c/174b4b90ec6731934cf84eb267a86ad7152267fa"},{"url":"https://git.kernel.org/stable/c/8db1a8614b4f8f3da11c568e2b5af4fe56eef360"},{"url":"https://git.kernel.org/stable/c/f292873ceb4bd3a1a0f75f884361cd556e457692"}],"title":"apparmor: fix a use-after-free in aa_lookupn_ns()","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-99505","datePublished":"2026-11-19T14:43:55.775Z","dateReserved":"2026-09-25T10:25:14.419Z","dateUpdated":"2026-11-23T08:03:36.156Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-19 15:18:05","lastModifiedDate":"2026-11-23 08:17:52","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"99505","Ordinal":"1","Title":"apparmor: fix a use-after-free in aa_lookupn_ns()","CVE":"CVE-2026-99505","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"99505","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\napparmor: fix a use-after-free in aa_lookupn_ns()\n\naa_lookupn_ns() takes a reference on the namespace it finds with\naa_get_ns(), which is kref_get() on the reference count that the\nnamespace is released through, without checking whether the namespace\nis still in use.  A concurrent removal of a \":\"-prefixed namespace\nlooks the same namespace up and only then takes the parent lock to\nremove it, so the last reference can be dropped between the lookup and\nthe aa_get_ns() call: the reference count then reports the increment on\na zero count and the kernel classifies the following use of the object\nas a use-after-free.  A user with CAP_MAC_ADMIN can trigger this by\nwriting a \":<name>\" removal and a \":<name>/<profile>\" removal to\n/sys/kernel/security/apparmor/.remove concurrently.\n\nrefcount_t: addition on 0; use-after-free.\nWARNING: lib/refcount.c:25 at refcount_warn_saturate+0xc0/0xe0, CPU#6\nCall Trace:\n <TASK>\n aa_lookupn_ns+0xa9/0xc0\n aa_remove_profiles+0x4fb/0x730\n ? __kvmalloc_node_noprof+0x219/0x5c0\n ? __pfx_aa_remove_profiles+0x10/0x10\n ? aa_loaddata_alloc+0x65/0x1f0\n ? _copy_from_user+0x2d/0x80\n ? aa_loaddata_alloc+0x111/0x1f0\n profile_remove+0x2ee/0x4a0\n vfs_write+0x21e/0xcf0\n ? rcu_core+0x29c/0x1740\n ? timerqueue_linked_add+0x1f4/0x3d0\n ? __pfx_vfs_write+0x10/0x10\n ? mutex_lock+0x81/0xe0\n ? __pfx_mutex_lock+0x10/0x10\n ? __pfx_rcu_core+0x10/0x10\n ? __pfx_hrtimer_update_next_event+0x10/0x10\n ? mutex_unlock+0x7b/0xd0\n ? fdget_pos+0x24d/0x4b0\n ksys_write+0xf7/0x1c0\n ? __pfx_ksys_write+0x10/0x10\n ? restore_fpregs_from_fpstate+0x37/0xc0\n do_syscall_64+0xf9/0x540\n entry_SYSCALL_64_after_hwframe+0x77/0x7f\n </TASK>\n\nFix by rejecting a namespace whose reference count is zero.","Type":"Description","Title":"apparmor: fix a use-after-free in aa_lookupn_ns()"}]}}}