A use-after-free vulnerability exists in the Linux kernel's AppArmor module in the function aa_lookupn_ns(). This flaw occurs due to improper reference counting when concurrently removing certain namespaces, allowing a user with CAP_MAC_ADMIN capability to trigger a race condition that leads to use of freed memory. The issue has been fixed by rejecting namespaces whose reference count is zero.