Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 15F8D3A8738 for ; Sun, 19 Jul 2026 15:44:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784475891; cv=none; b=i0xI3jaXT14zP9NRkqwkD8BNmwM+WeqHJfn5MGYWWFJuzLuHPqeOxnZUKmfX+jF7EQWctHnmBMLxBuraHjSHtr4ZBIBUsb9+qc+Lpx/vRixuWGQ8TNAi9ncelOKpB2gxplBKfGvmEWF+0TWr1/KUAjXoqVM8RwVPG0CWJhL3d4Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784475891; c=relaxed/simple; bh=4ME19IITf1Gl7l+32CYXnCy+TeJg7zksmSgGDT67eaw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=WYNPekyyDwfQRR2CpR3uUiPZe0oKnAHZvvfIS+rVesW49NvLTPG0jP6IUZayuPYoZVEDyVtWSBgxkGl8h6m/jKLgJQUhqX7XxCjGO9p/FAqZitclWoLgoTg7kAGSLJ6Qc0QGxFauc5U11SqbeS3fnWwGhDZ5vGWn+bl0ubpQiYI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=oB59aocZ; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="oB59aocZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 427A11F000E9; Sun, 19 Jul 2026 15:44:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784475889; bh=HbUF85FPl8PpH22sHzz2fU1Oh2dnUGcpIFtxHjhWVXc=; h=From:To:Cc:Subject:Date:Reply-To; b=oB59aocZgcPKJTQHR5677onW2O9otLA3TfqLI5CT1E475FKcYkNflZ8ZasMQ618NN eds+d3lgJggu+ix3Cp9tja/BfmwP5PpJRTXL3zdoOKHHpuBm4tErPPKhX1V08pk2qv Y2MdlNL3OLutMyLeiNeq4oGB0fub6pAlwEVc5Ev0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-64120: net: ethtool: fix NULL pointer dereference in phy_reply_size Date: Sun, 19 Jul 2026 17:39:42 +0200 Message-ID: <2026071924-CVE-2026-64120-195a@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2849; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=abN5IaWsSRNRDH5/iXK6bcOzDbWbARZTZnzYxTexrVs=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkx7wuEtnn+c2Dcvyz4kOwhtxKZSyc27d832SHqP9O2t vV/d9bmdMSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEHhxjmF89i8+3MePH1N// 2/nLntuESER6ZzAsmLRX58ubJV5XxL+0eXlPUgpIYPwZCQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: net: ethtool: fix NULL pointer dereference in phy_reply_size In phy_prepare_data(), several strings such as 'name', 'drvname', 'upstream_sfp_name', and 'downstream_sfp_name' are allocated using kstrdup(). However, these allocations were not checked for failure. If kstrdup() fails for 'name', it returns NULL while the function continues. This leads to a kernel NULL pointer dereference and panic later in phy_reply_size() when it unconditionally calls strlen() on the NULL pointer. While other strings like 'upstream_sfp_name' might be checked before access in certain code paths, failing to handle these allocations consistently can lead to incomplete data reporting or hidden bugs. Fix this by adding proper NULL checks for all kstrdup() calls in phy_prepare_data() and implement a centralized error handling path using goto labels to ensure all previously allocated resources are freed on failure. The Linux kernel CVE team has assigned CVE-2026-64120 to this issue. Affected and fixed versions =========================== Issue introduced in 6.16 with commit 9dd2ad5e92b962d1349a7541d167e8e214e49f95 and fixed in 6.18.34 with commit 61f53c1e58d68723bc1db10912a53f1991f08719 Issue introduced in 6.16 with commit 9dd2ad5e92b962d1349a7541d167e8e214e49f95 and fixed in 7.0.11 with commit 3dbe20a3809347bacda890822e7ca013bd85a18c Issue introduced in 6.16 with commit 9dd2ad5e92b962d1349a7541d167e8e214e49f95 and fixed in 7.1 with commit 4908f1395fb1b832ceec11584af649874a2732ea 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-2026-64120 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/ethtool/phy.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/61f53c1e58d68723bc1db10912a53f1991f08719 https://git.kernel.org/stable/c/3dbe20a3809347bacda890822e7ca013bd85a18c https://git.kernel.org/stable/c/4908f1395fb1b832ceec11584af649874a2732ea