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 3B2DA41C66 for ; Sat, 2 Mar 2024 22:01: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=1709416881; cv=none; b=FuMFaeCbD5HbR1fBwXcz7xukeZql9jNn/t5apboRFlnakYOKEKiVsiNYMccmf4eeAC3DjaXDE9KyPpipTOMQRknuSAE/RCMPEirHLgXRyShuMQWkpSk1QHObcGDcbDQ/Luv1xeThEsBbOw25zVSj87zyXTHs/d+5aTQzql6gmLw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709416881; c=relaxed/simple; bh=o4r85AtjvQSMDzSUl+Lh8+3Pymx4JVd/k4tnAQNrg30=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=LH8shu+nYKsPLITIv/8ZZ+ywA4fGCT8egA9Ft54S0LjfWQ2pSeSR3Sy12FFTKFkvREwTnCT04JkpQ53eh9DwmKSktvjf159ZEdzv5V57e9+8qZ0MB70n9aJngxYFHw8LLINLpuR8q9lang992Fn0TBH0gGgg23osH7cM0Tmh3rs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=AGrdjmjF; 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="AGrdjmjF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B207BC433F1; Sat, 2 Mar 2024 22:01:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709416881; bh=o4r85AtjvQSMDzSUl+Lh8+3Pymx4JVd/k4tnAQNrg30=; h=From:To:Cc:Subject:Date:Reply-to:From; b=AGrdjmjFZeby/B6TvP90P0lQ/HfAn7HxBN6g6ITyChj+hPLuSy9IULxug7Zr0qfV3 IdlhzfLkFjamYAazHA4DvrUNzFTF5kSrAC+tdR6oKmi5IljbKOBBoBSq8aZwt5Ty9i n0T+63uSth/cJGarf26XmcjS0TF96eSblIvmTXm0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-52581: netfilter: nf_tables: fix memleak when more than 255 elements expired Date: Sat, 2 Mar 2024 23:00:15 +0100 Message-ID: <2024030258-CVE-2023-52581-2165@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=2090; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=o4r85AtjvQSMDzSUl+Lh8+3Pymx4JVd/k4tnAQNrg30=; b=owGbwMvMwCRo6H6F97bub03G02pJDKmPF8Yt/xbzXk+i3D7ZJORX4qLefxzHPJYGTOh/asQmm yn+4mJNRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEyk6SHDgq6Fbx6+02p43JfC MC/l2OpU9vlPmRgW7JX64flsUqZz9L3ml4Ghyeq7HggWAgA= 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 memleak when more than 255 elements expired When more than 255 elements expired we're supposed to switch to a new gc container structure. This never happens: u8 type will wrap before reaching the boundary and nft_trans_gc_space() always returns true. This means we recycle the initial gc container structure and lose track of the elements that came before. While at it, don't deref 'gc' after we've passed it to call_rcu. The Linux kernel CVE team has assigned CVE-2023-52581 to this issue. Affected and fixed versions =========================== Issue introduced in 6.5 with commit 5f68718b34a5 and fixed in 6.5.6 with commit 4aea243b6853 Issue introduced in 6.5 with commit 5f68718b34a5 and fixed in 6.6 with commit cf5000a7787c Please see https://www.kernel.org or 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-52581 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: include/net/netfilter/nf_tables.h 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/4aea243b6853d06c1d160a9955b759189aa02b14 https://git.kernel.org/stable/c/cf5000a7787cbc10341091d37245a42c119d26c5