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 48D5121ADC9 for ; Wed, 26 Feb 2025 02:27:35 +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=1740536856; cv=none; b=M3NC67tUTYBbC76yDfAp7SFAndRr0EPunJHwX+CvRD1Ws1Kplw9MuR+zwqy1pALDuqyEquhANdS66ChIC/FD6Z7hf7HJ3wgUZyuec9PatR195tXbxr5aut/AAsycoAvvraJyApNwpSRXMePASZvXIOm/eoOF6tj/bZVm/M742t8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536856; c=relaxed/simple; bh=NKWfDK5dKVpQVirOA3OrwqjwARE5QWTPmHQZymrS1ck=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=lVWZTKQ2DmUI3sup+Aswqc4f+YorT833xdNUysUWbM3WkGQR/cagFLBTiQqBCAqIt9LF+YkqwsIXIAYIpYWph3S/OWiKs1mKWXEqJqcE2Gzwgl3Erxb24J9Aqt3TXgaDJahClZ6HdwS4HjMf+XEdxt2EmmH3GXOOiJEw6oRdHYU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pbhS/MoB; 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="pbhS/MoB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9EE07C4CEDD; Wed, 26 Feb 2025 02:27:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536855; bh=NKWfDK5dKVpQVirOA3OrwqjwARE5QWTPmHQZymrS1ck=; h=From:To:Cc:Subject:Date:Reply-to:From; b=pbhS/MoB8CBYW6DF94AAhQHpxffXEn/iMKEupjW0Q2lgtJ3PxsO6UXceLVVAQ4sDu kUtnNUHImbEIdw/pgLODgW9cAKbOFCJT2OAgq0ZnrwJplbUZ5ySqHAMdCw8HKGdQCy CcL68+E/f8os3XUqQVw/72iCHYPwvSSc3NAwXtG4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49698: netfilter: use get_random_u32 instead of prandom Date: Wed, 26 Feb 2025 03:24:21 +0100 Message-ID: <2025022628-CVE-2022-49698-9ddd@gregkh> X-Mailer: git-send-email 2.48.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=2807; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=NKWfDK5dKVpQVirOA3OrwqjwARE5QWTPmHQZymrS1ck=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7qp4crjv48N3dAzOjup6ZuTtXe4lpN1qWXv8qluhzz Vrn3vf7HbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRdboMC6YcX5vJ2PHj2sLo /Gdi66XDbNZ3vGZYMEFZ9miqctTXCyqnWp6IpnyU/7ZhAQA= 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: use get_random_u32 instead of prandom bh might occur while updating per-cpu rnd_state from user context, ie. local_out path. BUG: using smp_processor_id() in preemptible [00000000] code: nginx/2725 caller is nft_ng_random_eval+0x24/0x54 [nft_numgen] Call Trace: check_preemption_disabled+0xde/0xe0 nft_ng_random_eval+0x24/0x54 [nft_numgen] Use the random driver instead, this also avoids need for local prandom state. Moreover, prandom now uses the random driver since d4150779e60f ("random32: use real rng for non-deterministic randomness"). Based on earlier patch from Pablo Neira. The Linux kernel CVE team has assigned CVE-2022-49698 to this issue. Affected and fixed versions =========================== Issue introduced in 4.18 with commit 978d8f9055c3a7c35db2ac99cd2580b993396e33 and fixed in 5.10.127 with commit 15cc30ac2a8d7185f8ebf97dd1ddd90a7c79783b Issue introduced in 4.18 with commit 978d8f9055c3a7c35db2ac99cd2580b993396e33 and fixed in 5.15.51 with commit d0906b0fffc9f19bc42708ca3e84e2089088386c Issue introduced in 4.18 with commit 978d8f9055c3a7c35db2ac99cd2580b993396e33 and fixed in 5.18.8 with commit 6ce71f83f798be7e1ca68707fec449fbecb38852 Issue introduced in 4.18 with commit 978d8f9055c3a7c35db2ac99cd2580b993396e33 and fixed in 5.19 with commit b1fd94e704571f98b21027340eecf821b2bdffba 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-49698 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/nft_meta.c net/netfilter/nft_numgen.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/15cc30ac2a8d7185f8ebf97dd1ddd90a7c79783b https://git.kernel.org/stable/c/d0906b0fffc9f19bc42708ca3e84e2089088386c https://git.kernel.org/stable/c/6ce71f83f798be7e1ca68707fec449fbecb38852 https://git.kernel.org/stable/c/b1fd94e704571f98b21027340eecf821b2bdffba