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 14B45524D7 for ; Wed, 22 May 2024 08:20:00 +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=1716366001; cv=none; b=hcDA9YoRsu2WxypFhDiIFWOvFfwnc7cmjdEmeAvQ71QdeY2X/L21tIwmWJTd8KYt0GhnSXl4ckneLn1+2BVygb0b3CPsOwnsX6Bgcz5zONIQ1+ZA/w0uyqndAuB2NxhBHS6jgycp611TsDEeEb1qTVpJG07BgUVFGXGNjlfXkTk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716366001; c=relaxed/simple; bh=cc9lOVKfihrN5axUN1JM5+eJl7tuBlz9vSZoXRhMmf8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=noGPS+2IcD2LL8aniyxQD/FXCw9GcTfIzLBNH1IGlbH302e1M2Vo9aUu8A49CMHbcLbCFr0cs4KcxHGo0PWhzkNWol/unkmiJUapgIni5JXX741CFA4nyjafLDoaCGXitNvr/vXHAOkz7mj/NBPu121ihJNfkkdSJgrcNB74WSs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=QaUWBeB9; 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="QaUWBeB9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C442C2BD11; Wed, 22 May 2024 08:20:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716366000; bh=cc9lOVKfihrN5axUN1JM5+eJl7tuBlz9vSZoXRhMmf8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=QaUWBeB9mK+smxwkbwihY+0xT4xfr4ztO2EZ9b3dKBA6FqSZopiylE5HEYUXiNFof zp+XwjLY6rSGuflHvzktiuuAZGMXygeoPnZ5jv7gRiho6EwInpq7pT5khiHfFFSLpI DYOGdVi9Xf2PXqtW1F6ifli/ZFkzXjI2/M+7owZw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47486: riscv, bpf: Fix potential NULL dereference Date: Wed, 22 May 2024 10:19:46 +0200 Message-ID: <2024052239-CVE-2021-47486-6a5a@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=2083; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=cc9lOVKfihrN5axUN1JM5+eJl7tuBlz9vSZoXRhMmf8=; b=owGbwMvMwCRo6H6F97bub03G02pJDGm+q2bLzTvke7Bl2YlXf7WU94sIbL5obHNl7prl05+JP rAJ3CSv0BHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATYbNkmO8SM/mm8OxPUUs7 GDk/J69znFhr2sawYMs01RbfJnPmJl0RTn7PVuEZ+24nAwA= 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: riscv, bpf: Fix potential NULL dereference The bpf_jit_binary_free() function requires a non-NULL argument. When the RISC-V BPF JIT fails to converge in NR_JIT_ITERATIONS steps, jit_data->header will be NULL, which triggers a NULL dereference. Avoid this by checking the argument, prior calling the function. The Linux kernel CVE team has assigned CVE-2021-47486 to this issue. Affected and fixed versions =========================== Issue introduced in 5.7 with commit ca6cb5447cec and fixed in 5.10.77 with commit cac6b043cea3 Issue introduced in 5.7 with commit ca6cb5447cec and fixed in 5.14.16 with commit e1b80a5ebe54 Issue introduced in 5.7 with commit ca6cb5447cec and fixed in 5.15 with commit 27de809a3d83 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-47486 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: arch/riscv/net/bpf_jit_core.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/cac6b043cea3e120f4fccec16f7381747cbfdc0d https://git.kernel.org/stable/c/e1b80a5ebe5431caeb20f88c32d4a024777a2d41 https://git.kernel.org/stable/c/27de809a3d83a6199664479ebb19712533d6fd9b