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 9486633086 for ; Sun, 29 Dec 2024 11:30:18 +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=1735471818; cv=none; b=m7ZVEc2yOLuQarPpfu7fFUmoFL20Zi50uUHllC5GLOz2BVqK4WYNN+JUhvt5iFVzy8NYROcnjTp95+SNvvYJvWJ2rW2t+Gcpj48lJL35gL8I3P4i/nfl4Vr+YBTXI054XJ2S3XGCoHlH3BlwJjAwHYgAvhakhJp6/EPuLl4nUEQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735471818; c=relaxed/simple; bh=mmE4VL876Ax3f3wd1xLnl0+5PzuyPkfnl6H0B6o+xF4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=B4Ubz0XfIh0f6WF86vnn86FmPVZUPoWqY1RMK5VmM2Ebz9rTvP6KnjaFjvkYM0LvalyezBB1iMOBBZjI/ulp5UwvlZ4EheQ1vp6/4OH7gSHtOrMsdSkdY6v2Hshx3xepdz60lw3sTJrB6X8lh5EQMVvEfMSCSbrii3YGZJE/I8c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=txZMBcVO; 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="txZMBcVO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E014C4CED1; Sun, 29 Dec 2024 11:30:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1735471818; bh=mmE4VL876Ax3f3wd1xLnl0+5PzuyPkfnl6H0B6o+xF4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=txZMBcVO5083Ke13B1zX/eCG64vlPqa+HrZSmmgTx4r21aXAiGuzCHsW2nS3yVoS6 asp0SX1PgXKdTqG2AqfJKNcPe6yBV0VKCv3opP8uKeHZY62UcoiRxCo8rOWkt20us5 7h1z09Ci+jzLmy8XJohkR6Q3T1FxZ/dTy7fKXsqg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-56720: bpf, sockmap: Several fixes to bpf_msg_pop_data Date: Sun, 29 Dec 2024 12:29:21 +0100 Message-ID: <2024122920-CVE-2024-56720-614a@gregkh> X-Mailer: git-send-email 2.47.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=3483; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=mmE4VL876Ax3f3wd1xLnl0+5PzuyPkfnl6H0B6o+xF4=; b=owGbwMvMwCRo6H6F97bub03G02pJDOmFRhMmsG0Ms94UHrnIusq5cV2cZIDl3xf8Fm/+N3jqu e6q6i3viGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgImIiDLMM5E692bR7en7l57e YVvxc+kL8VPFCxnmu4md+xhXucXxW8j+xb7x812PNsjnAQA= 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, sockmap: Several fixes to bpf_msg_pop_data Several fixes to bpf_msg_pop_data, 1. In sk_msg_shift_left, we should put_page 2. if (len == 0), return early is better 3. pop the entire sk_msg (last == msg->sg.size) should be supported 4. Fix for the value of variable "a" 5. In sk_msg_shift_left, after shifting, i has already pointed to the next element. Addtional sk_msg_iter_var_next may result in BUG. The Linux kernel CVE team has assigned CVE-2024-56720 to this issue. Affected and fixed versions =========================== Issue introduced in 5.0 with commit 7246d8ed4dcce23f7509949a77be15fa9f0e3d28 and fixed in 5.4.287 with commit d3f5763b3062514a234114e97bbde74d8d702449 Issue introduced in 5.0 with commit 7246d8ed4dcce23f7509949a77be15fa9f0e3d28 and fixed in 5.10.231 with commit d26d977633d1d0b8bf9407278189bd0a8d973323 Issue introduced in 5.0 with commit 7246d8ed4dcce23f7509949a77be15fa9f0e3d28 and fixed in 5.15.174 with commit e1f54c61c4c9a5244eb8159dce60d248f7d97b32 Issue introduced in 5.0 with commit 7246d8ed4dcce23f7509949a77be15fa9f0e3d28 and fixed in 6.1.120 with commit f58d3aa457e77a3d9b3df2ab081dcf9950f6029f Issue introduced in 5.0 with commit 7246d8ed4dcce23f7509949a77be15fa9f0e3d28 and fixed in 6.6.64 with commit 98c7ea7d11f2588e8197db042e0291e4ac8f8346 Issue introduced in 5.0 with commit 7246d8ed4dcce23f7509949a77be15fa9f0e3d28 and fixed in 6.11.11 with commit 785180bed9879680d8e5c5e1b54c8ae8d948f4c8 Issue introduced in 5.0 with commit 7246d8ed4dcce23f7509949a77be15fa9f0e3d28 and fixed in 6.12.2 with commit 275a9f3ef8fabb0cb282a62b9e164dedba7284c5 Issue introduced in 5.0 with commit 7246d8ed4dcce23f7509949a77be15fa9f0e3d28 and fixed in 6.13-rc1 with commit 5d609ba262475db450ba69b8e8a557bd768ac07a 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-56720 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/core/filter.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/d3f5763b3062514a234114e97bbde74d8d702449 https://git.kernel.org/stable/c/d26d977633d1d0b8bf9407278189bd0a8d973323 https://git.kernel.org/stable/c/e1f54c61c4c9a5244eb8159dce60d248f7d97b32 https://git.kernel.org/stable/c/f58d3aa457e77a3d9b3df2ab081dcf9950f6029f https://git.kernel.org/stable/c/98c7ea7d11f2588e8197db042e0291e4ac8f8346 https://git.kernel.org/stable/c/785180bed9879680d8e5c5e1b54c8ae8d948f4c8 https://git.kernel.org/stable/c/275a9f3ef8fabb0cb282a62b9e164dedba7284c5 https://git.kernel.org/stable/c/5d609ba262475db450ba69b8e8a557bd768ac07a