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 A0BE38F54 for ; Fri, 8 Nov 2024 06:08:15 +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=1731046095; cv=none; b=G6X9tluLJ4DudGed2Bnb+Mo9sdJiHVWIjmlNzm77w2WFxzZgQ6w1V9V0LWBz159JU5Sss9kMEYEir/Uq+L3OxAritP9UF31CTzJ2o6WWJpqMq+/3uraswrcAa6rSoCoe8ev4Rv0v+FPYlExzuogEYmi0pqO5tEu4ckxPNDTXBlg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731046095; c=relaxed/simple; bh=5TqSjwUzYs00pg1t73Q7Dix/1U4q2VA41ad/z2Z3flo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rV2ISYdmS7VUBo0dsjrEG5kZRCjD7AC3wf+P/A7CYu1LHQcgj2oC5ZmcRWcgoaF0zblQS+rQq3oyjV6Fxo7TIyVmiAxgw2xXlkEvt02etrY0cKMXdqZW8irGGz/FqJzcrTVGvehhhN+yY1m101fx/qpbN4NYFkITA+Kbmr5VqkI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=V+Hy+Q37; 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="V+Hy+Q37" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4027C4CECE; Fri, 8 Nov 2024 06:08:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1731046095; bh=5TqSjwUzYs00pg1t73Q7Dix/1U4q2VA41ad/z2Z3flo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=V+Hy+Q37xZ7Gx8smx8jxiirPbxPoTaoBA2aJjcLxTr0xSzhaqe0a9ipcxg6+qdIj5 4jI6QGqkIqilfBn/kqZJZOoCOEotX5hANoAwjhdLkLmJw5ybwiPiU5wkc5HTSuY1pP nSqWu2ym1GxaXxRffvq6z1wHekw97qEI+ZK+P8Sg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50203: bpf, arm64: Fix address emission with tag-based KASAN enabled Date: Fri, 8 Nov 2024 07:08:04 +0100 Message-ID: <2024110803-CVE-2024-50203-ca2d@gregkh> X-Mailer: git-send-email 2.47.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=2373; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=5TqSjwUzYs00pg1t73Q7Dix/1U4q2VA41ad/z2Z3flo=; b=owGbwMvMwCRo6H6F97bub03G02pJDOm6qw4LvON0WxJXKJi1nDej5t5Pswf8/z/Lbk5fsPGrY EvXtMk1HbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRv7MZ5qnsebJObMLda/aS JtP67qd/uX1fooRhvpvFFsZ0h5/bn8gb3fhw03utU7SUMgA= 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, arm64: Fix address emission with tag-based KASAN enabled When BPF_TRAMP_F_CALL_ORIG is enabled, the address of a bpf_tramp_image struct on the stack is passed during the size calculation pass and an address on the heap is passed during code generation. This may cause a heap buffer overflow if the heap address is tagged because emit_a64_mov_i64() will emit longer code than it did during the size calculation pass. The same problem could occur without tag-based KASAN if one of the 16-bit words of the stack address happened to be all-ones during the size calculation pass. Fix the problem by assuming the worst case (4 instructions) when calculating the size of the bpf_tramp_image address emission. The Linux kernel CVE team has assigned CVE-2024-50203 to this issue. Affected and fixed versions =========================== Issue introduced in 6.11 with commit 19d3c179a377 and fixed in 6.11.6 with commit 7db1a2121f3c Issue introduced in 6.11 with commit 19d3c179a377 and fixed in 6.12-rc5 with commit a552e2ef5fd1 Issue introduced in 6.10.3 with commit 6d218fcc707d 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-2024-50203 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/arm64/net/bpf_jit_comp.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/7db1a2121f3c7903b8e397392beec563c3d00950 https://git.kernel.org/stable/c/a552e2ef5fd1a6c78267cd4ec5a9b49aa11bbb1c