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 AEB292D8DDF for ; Thu, 4 Dec 2025 16:08: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=1764864517; cv=none; b=C1sYFnQajv3UPc0X9pvLQSRlvEXMMaQ32B35EpjawpNgwciJzutnC6G1mWQBzlz3sYnh3kxFbsVJ9fAMEMy0QAuu+71zBR841aYZSJEm0kaSWKA2oGJvHpL7bJ9rcyxpLPSSj6numiz+V7Hn/AOsDnXqtOejxMN1nZdfsD7Mhvo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764864517; c=relaxed/simple; bh=0TKoionJK2aNd9LqJsXSygEF8CEBMjAOK+lmpa/EOZ8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=LdkTmCr9nDHTcyji/YKuSLoiJ9hbrxREGrDEFc7ShE/P798PO+9EfR1W4XuuL9WBb4WId1kRb+TwDeY4CDkVmwu+BXiKdQojmawFtTSkfuGjgDIF72q6l8NQNxJCscGt5NgJiIy0GSAvEdAcxEK6pLbOeFUydSR92IIFGKqVwaM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ypa8XKR/; 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="ypa8XKR/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF06CC4CEFB; Thu, 4 Dec 2025 16:08:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1764864517; bh=0TKoionJK2aNd9LqJsXSygEF8CEBMjAOK+lmpa/EOZ8=; h=From:To:Cc:Subject:Date:Reply-To:From; b=ypa8XKR/wZ9BZvDh5JwzzRdsh+dgkZipYZ9ofT3gDP1y0ysQNpLQh7TjwoiPreXoG jv0Aa1un6iZwODgSCZNYa2ruMhVLTwZI2XhPLgsu+QexMWir4yUSihIzVCOR0PrVrP 5y9hB3HG+Pi1OI2KaLVF0idcN5A8gRcIYGjKvnYc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40255: net: core: prevent NULL deref in generic_hwtstamp_ioctl_lower() Date: Thu, 4 Dec 2025 16:57:36 +0100 Message-ID: <2025120432-CVE-2025-40255-55aa@gregkh> X-Mailer: git-send-email 2.52.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=2358; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=t0YQI+a1Y8914YKZ2u6G/rDaz2pDHwOIEgDNI/6b++M=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmG63M4pJ9Uanav6dP+8+/VMf/1e9/9Mizijnihez7CY sNKu4j5HbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjARHXGGBQd0mT5r8b+rDCv7 mZ5t3dDP1H/fn2F+/O8V/2fW6n9QmVa+yldU7dW0d1GGAA== 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: core: prevent NULL deref in generic_hwtstamp_ioctl_lower() The ethtool tsconfig Netlink path can trigger a null pointer dereference. A call chain such as: tsconfig_prepare_data() -> dev_get_hwtstamp_phylib() -> vlan_hwtstamp_get() -> generic_hwtstamp_get_lower() -> generic_hwtstamp_ioctl_lower() results in generic_hwtstamp_ioctl_lower() being called with kernel_cfg->ifr as NULL. The generic_hwtstamp_ioctl_lower() function does not expect a NULL ifr and dereferences it, leading to a system crash. Fix this by adding a NULL check for kernel_cfg->ifr in generic_hwtstamp_ioctl_lower(). If ifr is NULL, return -EINVAL. The Linux kernel CVE team has assigned CVE-2025-40255 to this issue. Affected and fixed versions =========================== Issue introduced in 6.14 with commit 6e9e2eed4f39d52edf5fd006409d211facf49f6b and fixed in 6.17.10 with commit 8817f816ae41908e9625c0770c4af0dcdcc01238 Issue introduced in 6.14 with commit 6e9e2eed4f39d52edf5fd006409d211facf49f6b and fixed in 6.18 with commit f796a8dec9beafcc0f6f0d3478ed685a15c5e062 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-2025-40255 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/dev_ioctl.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/8817f816ae41908e9625c0770c4af0dcdcc01238 https://git.kernel.org/stable/c/f796a8dec9beafcc0f6f0d3478ed685a15c5e062