Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC787399019 for ; Wed, 1 Apr 2026 08:38:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775032694; cv=none; b=L3tChWS4gUDVjlf2qEZMRzmizQhmMjjso4CfqOhkGgDrCj02NsDvoxuy1UNaRd0a01AEmI8GZ+F3Np9wHuLEXtY8hxboFgr6FPMqUqCG2K8eVTiKGSDv6lKWswkxBTx1UfSmNOlHk+1zdLz3z+Aw5WgBXmnZM2kYMY0a7JD3tzI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775032694; c=relaxed/simple; bh=UzXlyF9MRn4ruR4LBVP/Y536ifP9hfh0QOh+s6pYHe4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=fam300SbTsCyg/EHt+/6R/tFGRNSHnyK7MsVeHzpPhj4IJ9fjBMRm93RmLEozWkuD97RH7Mrq51F9/fS8uTc/ghk4uryLclA14MWEgh8sJkuMoEviRX7Fy6hO2y3t9/xHxj/VPBjx3Qsi5VjswpR/TNMuSmyhNHEaIwWzK0PBGE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=AL8fx0Nj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="AL8fx0Nj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 39A6EC4CEF7; Wed, 1 Apr 2026 08:38:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1775032694; bh=UzXlyF9MRn4ruR4LBVP/Y536ifP9hfh0QOh+s6pYHe4=; h=From:To:Cc:Subject:Date:Reply-To:From; b=AL8fx0Nj5g2PS2U+ZgodNoSmO9x8qfkqDzfBxbM8kVtq9CLKeISY6Oprx1B+kn7yU NiaT0vWDdml6515FTJ8uAjtK7YjbREJM9ZUZA0ePYe6423+2GWtN6DKAl9LcEHrL5k isrms+wSfi0Xu5yAxy0ItoR0kuER/Z++DlziYMy4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-23408: apparmor: Fix double free of ns_name in aa_replace_profiles() Date: Wed, 1 Apr 2026 10:37:16 +0200 Message-ID: <2026040113-CVE-2026-23408-1932@gregkh> X-Mailer: git-send-email 2.53.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2963; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=eMxh9C69phjywHQ/Ri1yHe80krdl+LysA6Ojg47RQlE=; b=owGbwMvMwCRo6H6F97bub03G02pJDJlnblp6/62aU67xfJXBuzsqPLMP9RsmO0XO37rktfKuM /t8AkNmdMSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEbn1lWLDo2iOteWlLXr11 6D2XeZInx6R/wzeGBat4cixVeYO6VvDcXXWi9710wsKIGAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: apparmor: Fix double free of ns_name in aa_replace_profiles() if ns_name is NULL after 1071 error = aa_unpack(udata, &lh, &ns_name); and if ent->ns_name contains an ns_name in 1089 } else if (ent->ns_name) { then ns_name is assigned the ent->ns_name 1095 ns_name = ent->ns_name; however ent->ns_name is freed at 1262 aa_load_ent_free(ent); and then again when freeing ns_name at 1270 kfree(ns_name); Fix this by NULLing out ent->ns_name after it is transferred to ns_name ") The Linux kernel CVE team has assigned CVE-2026-23408 to this issue. Affected and fixed versions =========================== Issue introduced in 5.5 with commit 145a0ef21c8e944957f58e2c8ffcd8a10f46266a and fixed in 6.6.130 with commit 55ef2af7490aaf72f8ffe11ec44c6bcb7eb2162a Issue introduced in 5.5 with commit 145a0ef21c8e944957f58e2c8ffcd8a10f46266a and fixed in 6.12.77 with commit 86feeccd6b93ed94bd6655f30de80f163f8d5a45 Issue introduced in 5.5 with commit 145a0ef21c8e944957f58e2c8ffcd8a10f46266a and fixed in 6.18.18 with commit 7998ab3010d2317643f91828f1853d954ef31387 Issue introduced in 5.5 with commit 145a0ef21c8e944957f58e2c8ffcd8a10f46266a and fixed in 6.19.8 with commit 18b5233e860c294a847ee07869d93c0b8673a54b Issue introduced in 5.5 with commit 145a0ef21c8e944957f58e2c8ffcd8a10f46266a and fixed in 7.0-rc4 with commit 5df0c44e8f5f619d3beb871207aded7c78414502 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-23408 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: security/apparmor/policy.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/55ef2af7490aaf72f8ffe11ec44c6bcb7eb2162a https://git.kernel.org/stable/c/86feeccd6b93ed94bd6655f30de80f163f8d5a45 https://git.kernel.org/stable/c/7998ab3010d2317643f91828f1853d954ef31387 https://git.kernel.org/stable/c/18b5233e860c294a847ee07869d93c0b8673a54b https://git.kernel.org/stable/c/5df0c44e8f5f619d3beb871207aded7c78414502