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 F39CE54BDA for ; Sun, 28 Apr 2024 13:05:21 +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=1714309522; cv=none; b=sLqVIVYhj8wyllRh+OspyncPLvcxAX2HV8DW7tlNVEqDQws0dZj2xKUIDFj30VzPeLxpbtMgH+ax/K+H8eBQHwXvJ/tUbgNP6tzG/PgjgjnD5wjmiVphiFcVG1QSPohxly/DprB4Sa+iYKYSt/Kfw41tGgxCjxhbr7Zbs+qOscc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714309522; c=relaxed/simple; bh=DkqCQqp76POpOS+KtULFFkHcAOL0DY0sc38X2jbmyO0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ZPb9RGRMjfxV0WUWQw7QYmV8+haWrEojEG/dAM+44XvL5waPzYIDh3wrCcMStd4beBsSQADWN7shC26b/+7/mwSMWe0i/ZDfSNGpLaTwMkRtzfJrYNcmda9dQJK3uAoTC41KV/eRSKtvDS7cjTVOCoOflg+nioGB6X3NVrJNKio= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=hMFIlVTu; 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="hMFIlVTu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0BB07C113CC; Sun, 28 Apr 2024 13:05:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1714309521; bh=DkqCQqp76POpOS+KtULFFkHcAOL0DY0sc38X2jbmyO0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=hMFIlVTugXwMko+SCQFftDAOvK+cUqMBTdbUw4NHbX4ik8KXGItlOIRHvoCL0cc+7 U2d8EwM/WxOYxXdBjRbAFc3gJXqnFhmnww7I0DrhCda7E/PAuYzB8IvNC17l2hDq9v XN3uj8/v1B+pVCAfdgTfv/clDEiGVdHm/U0v8vYg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-48643: netfilter: nf_tables: fix nft_counters_enabled underflow at nf_tables_addchain() Date: Sun, 28 Apr 2024 15:05:04 +0200 Message-ID: <2024042856-CVE-2022-48643-7d4b@gregkh> X-Mailer: git-send-email 2.44.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=2444; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=DkqCQqp76POpOS+KtULFFkHcAOL0DY0sc38X2jbmyO0=; b=owGbwMvMwCRo6H6F97bub03G02pJDGl6nhWiDBf+zf/Qoibynsd83u71CcE3jlkeW3ZOK1dk0 pY905MLOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAim78xLLjGLfBQ+lV/4I3X zDd8eSoPp6w/V8CwoP3vwemtp+eq5n9ktyrx/LDA7c+uKwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: netfilter: nf_tables: fix nft_counters_enabled underflow at nf_tables_addchain() syzbot is reporting underflow of nft_counters_enabled counter at nf_tables_addchain() [1], for commit 43eb8949cfdffa76 ("netfilter: nf_tables: do not leave chain stats enabled on error") missed that nf_tables_chain_destroy() after nft_basechain_init() in the error path of nf_tables_addchain() decrements the counter because nft_basechain_init() makes nft_is_base_chain() return true by setting NFT_CHAIN_BASE flag. Increment the counter immediately after returning from nft_basechain_init(). The Linux kernel CVE team has assigned CVE-2022-48643 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10.140 with commit c907dfe4eaca and fixed in 5.10.146 with commit 710e3f526bd2 Issue introduced in 5.15.64 with commit 6d7ddee50395 and fixed in 5.15.71 with commit 91aa52652f4b Issue introduced in 5.19.6 with commit 98a621ef45e3 and fixed in 5.19.12 with commit 8bcad2a93131 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-2022-48643 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/netfilter/nf_tables_api.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/710e3f526bd23a0d33435dedc52c3144de284378 https://git.kernel.org/stable/c/91aa52652f4b37089aff3cb53e83049d826fef6d https://git.kernel.org/stable/c/8bcad2a931313aeba076b76922d5813ef97d0a91 https://git.kernel.org/stable/c/921ebde3c0d22c8cba74ce8eb3cc4626abff1ccd