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 7FBFF6D1D2 for ; Tue, 21 May 2024 14:38:29 +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=1716302309; cv=none; b=d3vqTiWDck5NYhDBMN2+f3SqLqMzlGHqB1aSDzvLGy41Odwy8dhN4aghzDmM3mCK0De7xk4bPkXHkOF+YaIaMagezdiCBW4GaOalceCdVcIqsvqAfiNwTerrakF/QRlQSpvuCGZ13SOMAU2Rdcv7HnhVBf26SbwZbjrJSEAbFmU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716302309; c=relaxed/simple; bh=l0H28zG3wl+pCROQasxBqfg+/+a7fdN7yirO2tGM0xM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=hI4DCxBHMeimm7trZT2daXT4EhiVNhSPTbhJk4fm/tgyu89bNe4nhXS7ito5lzbQenV/L7+UruSEI1zTQWID74gJxz9YYnmVMONikxUeWJxKbKchA7FDXrHBw2aM36PTndA4beF6FulzEaJCfGkTmPzGxvT9OMQsNlxifhBxyPE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=TphlRdiI; 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="TphlRdiI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07EC4C2BD11; Tue, 21 May 2024 14:38:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716302309; bh=l0H28zG3wl+pCROQasxBqfg+/+a7fdN7yirO2tGM0xM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=TphlRdiIlYSBJN1HyKW61rZIewXXbYzQDO1AKXCYyEzlMAb7QWwDPbX5DoqAdm8xw yQbfOSQjzO6wzBAoVJXU7kxmtTfN/GY8NF8DUGTr8rrbShbXOj4JWPPBTbq8WmlLis KoECl49h2UUnY2Pd6ps/RqDdff0+yMyVoYzQTlUE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47312: netfilter: nf_tables: Fix dereference of null pointer flow Date: Tue, 21 May 2024 16:35:46 +0200 Message-ID: <2024052129-CVE-2021-47312-682b@gregkh> X-Mailer: git-send-email 2.45.1 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=2061; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=l0H28zG3wl+pCROQasxBqfg+/+a7fdN7yirO2tGM0xM=; b=owGbwMvMwCRo6H6F97bub03G02pJDGk+Gw2ZmFnVU36zmFYIOfGUiJRsvyjVeulJY+auvKOyZ ybaHp7fEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABOZK8Cw4EjSxNtOMbyqgrVd 17uM5uxQWBP4mWHBunTfJV0+d2cmK1/5kLLf9E532XROAA== 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 dereference of null pointer flow In the case where chain->flags & NFT_CHAIN_HW_OFFLOAD is false then nft_flow_rule_create is not called and flow is NULL. The subsequent error handling execution via label err_destroy_flow_rule will lead to a null pointer dereference on flow when calling nft_flow_rule_destroy. Since the error path to err_destroy_flow_rule has to cater for null and non-null flows, only call nft_flow_rule_destroy if flow is non-null to fix this issue. Addresses-Coverity: ("Explicity null dereference") The Linux kernel CVE team has assigned CVE-2021-47312 to this issue. Affected and fixed versions =========================== Issue introduced in 5.13.2 with commit 09b1f676e2e0 and fixed in 5.13.5 with commit 70a5a1950cca 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-2021-47312 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/70a5a1950cca02c5cd161bb3846b4d983eed97d3 https://git.kernel.org/stable/c/4ca041f919f13783b0b03894783deee00dbca19a