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 9DCB438B for ; Tue, 19 Nov 2024 01:33:37 +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=1731980017; cv=none; b=C0BOeTxu3g1ppyfmHrWkKrU/qLWjow7XmRSdfkGU+lUNCMJvZSBMo86jKniNs/CyawGVmDGZgc/XSfZdxPay/dJOmARjBmrm30UJgOjJOp9fqIpcI2Ys2QPPN+1gzNbgijfxcDLUGMTp/Zrhi2cKCqbQZwaxy9Ctxa4PbYd5lT4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731980017; c=relaxed/simple; bh=3+dY7QSENG/+I84oDQGZmvPV1Ewzht/5GFGyS/AgkyU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nZ1byu4BEh1cmAEjpwe3krOGcugx+duk+IFG2jPvGvCP1mwQ/zdJlvU7udRwC7qQI7ife2Q89Xe/bQyTW28RxeSKq3oabOIyKbGLp7+SoUdwoUBSAj+Teq/RXMp6pxmWW7BY92tNKqZfXIctp/c+QwvNYDbtd0wMY8JFPTz+oIY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=J+OpYdcg; 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="J+OpYdcg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29CC1C4CECC; Tue, 19 Nov 2024 01:33:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1731980017; bh=3+dY7QSENG/+I84oDQGZmvPV1Ewzht/5GFGyS/AgkyU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=J+OpYdcg2FG7tvHoY0CCL18SDfhtuPYR6sxT72gNjzxW98uHVa1B0e/3xKDRn+ioh rTDAlfE3md5cIDu/sBhzFi8SIQH2ogny4F+NVnBa2IdQ7uF4sVIdgaVbNKeyVz8ovX 1Ae9Ynn2QvPQRZysBpWKRYUuot90OE9Mvki/sbM0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50274: idpf: avoid vport access in idpf_get_link_ksettings Date: Tue, 19 Nov 2024 02:32:29 +0100 Message-ID: <2024111932-CVE-2024-50274-a441@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=2495; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=3+dY7QSENG/+I84oDQGZmvPV1Ewzht/5GFGyS/AgkyU=; b=owGbwMvMwCRo6H6F97bub03G02pJDOnWrzbe+bQ5c8GWPh4lPob7O5Y7GAaJ2uwV5fsjwqh58 unWL/JvOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAii3MY5lks3nr7495yC40X 9jt+ckbWvX+2qYBhwbF3H7Lzeyy3inpNnv5VIXjF11RWTwA= 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: idpf: avoid vport access in idpf_get_link_ksettings When the device control plane is removed or the platform running device control plane is rebooted, a reset is detected on the driver. On driver reset, it releases the resources and waits for the reset to complete. If the reset fails, it takes the error path and releases the vport lock. At this time if the monitoring tools tries to access link settings, it call traces for accessing released vport pointer. To avoid it, move link_speed_mbps to netdev_priv structure which removes the dependency on vport pointer and the vport lock in idpf_get_link_ksettings. Also use netif_carrier_ok() to check the link status and adjust the offsetof to use link_up instead of link_speed_mbps. The Linux kernel CVE team has assigned CVE-2024-50274 to this issue. Affected and fixed versions =========================== Issue introduced in 6.7 with commit 02cbfba1add5 and fixed in 6.11.8 with commit fa4d906ad0fb Issue introduced in 6.7 with commit 02cbfba1add5 and fixed in 6.12 with commit 81d2fb4c7c18 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-50274 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: drivers/net/ethernet/intel/idpf/idpf.h drivers/net/ethernet/intel/idpf/idpf_ethtool.c drivers/net/ethernet/intel/idpf/idpf_lib.c drivers/net/ethernet/intel/idpf/idpf_virtchnl.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/fa4d906ad0fb63a980a1d586a061c78ea1a345ba https://git.kernel.org/stable/c/81d2fb4c7c18a3b36ba3e00b9d5b753107472d75