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 B3F522C11E3 for ; Mon, 15 Sep 2025 14:23:23 +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=1757946203; cv=none; b=bHeldWI9QmogenVR+GAl2/2UFyPUYgEARpDp3HTas96A9w1R3WHpN4mFsevloZKeG3tCN1Cj/MxvCrnKNj2bRTPPGVpfbYCic/FGhT8rkE/fJcaG0TcLHgMT+aTrzB/jQcJa/cXbxShwm3RYWFO5eIl8naBCBJmCWywzCIqHKzQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757946203; c=relaxed/simple; bh=Ejuxl3ijaU/mcByuHB+T+dS3Bdgu/Tx9iJPHl7h07Ks=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=GuzGfq9xx0i3EOhVslr+2milsyl7nykreuqyevsriKT/DyW/qHK1zxOBVI84AxkWrKsoHUtqqDFETtLrd1FydnrTC1Zp0wou1KrRCLN4V1MrT9/d8QP4n7f1LfenYwXbpdoRbTmDl1oGXHwgyNhWPHpv+VOo+DSwNZg5Njlgtyk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=fxxA6WWZ; 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="fxxA6WWZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 45D97C4CEF1; Mon, 15 Sep 2025 14:23:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757946203; bh=Ejuxl3ijaU/mcByuHB+T+dS3Bdgu/Tx9iJPHl7h07Ks=; h=From:To:Cc:Subject:Date:Reply-to:From; b=fxxA6WWZVV9l8/PHW5Cgx/rq7i8fS+UxhEf8wpY36MtQKE9rqU93CZxaO+Z/Sm7tX U3DTLMiNkyVlF8WxGNNv4Vl9WmnWpxhJRI8PR3OlkdpXCeN2Swic2oK3zaqeCKn/Kp pOeHBM6JoUs8Fs6XrcliUX0+LT/RolZhgIhMDfWc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53200: netfilter: x_tables: fix percpu counter block leak on error path when creating new netns Date: Mon, 15 Sep 2025 16:21:34 +0200 Message-ID: <2025091509-CVE-2023-53200-a0c8@gregkh> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=3227; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=RkDDpWyz4nuP2vq1FTvz3tF8m1zHnDhar5p0OHd7oUc=; b=owGbwMvMwCRo6H6F97bub03G02pJDBknFK4yi136F3lL3aBTa1blFIsTM8/ZPbS9EqC8pKExk 3fTdqnojlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiIZxHDgtnhjS94jjvwfOb5 ErDDcwb7/Wp/W4b5Zfs79kz5d6t4vqy2lGVAYsbclUHXAQ== 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: netfilter: x_tables: fix percpu counter block leak on error path when creating new netns Here is the stack where we allocate percpu counter block: +-< __alloc_percpu +-< xt_percpu_counter_alloc +-< find_check_entry # {arp,ip,ip6}_tables.c +-< translate_table And it can be leaked on this code path: +-> ip6t_register_table +-> translate_table # allocates percpu counter block +-> xt_register_table # fails there is no freeing of the counter block on xt_register_table fail. Note: xt_percpu_counter_free should be called to free it like we do in do_replace through cleanup_entry helper (or in __ip6t_unregister_table). Probability of hitting this error path is low AFAICS (xt_register_table can only return ENOMEM here, as it is not replacing anything, as we are creating new netns, and it is hard to imagine that all previous allocations succeeded and after that one in xt_register_table failed). But it's worth fixing even the rare leak. The Linux kernel CVE team has assigned CVE-2023-53200 to this issue. Affected and fixed versions =========================== Issue introduced in 4.2 with commit 71ae0dff02d756e4d2ca710b79f2ff5390029a5f and fixed in 5.15.100 with commit e306dbee4c98025a9326386023a12ef4d887e9d1 Issue introduced in 4.2 with commit 71ae0dff02d756e4d2ca710b79f2ff5390029a5f and fixed in 6.1.18 with commit 512b6c4b83c91d007301ea7d7f095d16c3aceacd Issue introduced in 4.2 with commit 71ae0dff02d756e4d2ca710b79f2ff5390029a5f and fixed in 6.2.5 with commit 3cc9610a87b7dde82f7360dd4eb6c2c27940ed57 Issue introduced in 4.2 with commit 71ae0dff02d756e4d2ca710b79f2ff5390029a5f and fixed in 6.3 with commit 0af8c09c896810879387decfba8c942994bb61f5 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-2023-53200 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: net/ipv4/netfilter/arp_tables.c net/ipv4/netfilter/ip_tables.c net/ipv6/netfilter/ip6_tables.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/e306dbee4c98025a9326386023a12ef4d887e9d1 https://git.kernel.org/stable/c/512b6c4b83c91d007301ea7d7f095d16c3aceacd https://git.kernel.org/stable/c/3cc9610a87b7dde82f7360dd4eb6c2c27940ed57 https://git.kernel.org/stable/c/0af8c09c896810879387decfba8c942994bb61f5