From mboxrd@z Thu Jan 1 00:00:00 1970 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 BC57D1AB37B for ; Thu, 20 Jun 2024 11:18:45 +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=1718882326; cv=none; b=JOmmDLCyXfzOzA5t9ODgAfj1ubWYbZiDdQp7CnzTH2uGERgdpP+gIhMnxijR+AobS5lwaUYP2F5vDy992sWq6jB8CxkP6TcR+huhn0BUm52NcjBNrT5UiasrmnrQR5HVt/aD1cAgjhGstk2E+aop0lm3F5gBfVU2A9ocTIvHbS4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718882326; c=relaxed/simple; bh=Ekp6bfXb3u+xUoXhNcmhPFi8tybMfXODf580cB4RLzY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=C7HEs3DAo8N7jnLe9IAcY3eJ56P45Dp9201SHevF4yPJUgAAM3HS0ycZ0ROTh0P9LXxjCz1xBrLx8Vk4nEspbpECOwCLaYhwPZHcEG8CXeJtJ+5s75SmtTQ+o+ZFzXSvKQSBdLErMzliU0PkFrcdVgOdInjV3PMz2qDc5njegDA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=isWCg7oO; 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="isWCg7oO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49778C2BD10; Thu, 20 Jun 2024 11:18:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718882325; bh=Ekp6bfXb3u+xUoXhNcmhPFi8tybMfXODf580cB4RLzY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=isWCg7oOikX9Ff2Nd3/t/5INxKx9HCOF+7hEfy2fCXeXcs+59rLg57pTJRqYDGD9U lYKCoyQpiAzS6gYJ2VbJmffUIYYHFNbutStt7a/NAzJ9uJZ22HSLgZ/bt6VamSlQgn 5KTo6sSJTzo3JuBW80Z+ZGfvfFZEwoLec3uO4WII= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-48770: bpf: Guard against accessing NULL pt_regs in bpf_get_task_stack() Date: Thu, 20 Jun 2024 13:16:50 +0200 Message-ID: <2024062011-CVE-2022-48770-34e0@gregkh> X-Mailer: git-send-email 2.45.2 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=2257; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Ekp6bfXb3u+xUoXhNcmhPFi8tybMfXODf580cB4RLzY=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkl/NWHBfl5HqmX+gZ9lt86L7f61NWSi4esulvy5LL6d nJYO7J3xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwEQ6qhkWXL0lcjlX9V/KjIqu T1Nv7XuzVDD+BcOCY0231jHvOhu+8elaVWOntqM+a/y3AQA= 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: bpf: Guard against accessing NULL pt_regs in bpf_get_task_stack() task_pt_regs() can return NULL on powerpc for kernel threads. This is then used in __bpf_get_stack() to check for user mode, resulting in a kernel oops. Guard against this by checking return value of task_pt_regs() before trying to obtain the call chain. The Linux kernel CVE team has assigned CVE-2022-48770 to this issue. Affected and fixed versions =========================== Issue introduced in 5.9 with commit fa28dcb82a38 and fixed in 5.10.96 with commit ff6bdc205fd0 Issue introduced in 5.9 with commit fa28dcb82a38 and fixed in 5.15.19 with commit 0bcd484587b3 Issue introduced in 5.9 with commit fa28dcb82a38 and fixed in 5.16.5 with commit b82ef4985a6d Issue introduced in 5.9 with commit fa28dcb82a38 and fixed in 5.17 with commit b992f01e6615 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-48770 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: kernel/bpf/stackmap.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/ff6bdc205fd0a83bd365405d4e31fb5905826996 https://git.kernel.org/stable/c/0bcd484587b3b3092e448d27dc369e347e1810c3 https://git.kernel.org/stable/c/b82ef4985a6d05e80f604624332430351df7b79a https://git.kernel.org/stable/c/b992f01e66150fc5e90be4a96f5eb8e634c8249e