lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5964fa47-2eff-4968-894c-0b7f487d820c@gmail.com>
Date: Sat, 11 Jan 2025 10:06:02 +0100
From: Heiner Kallweit <hkallweit1@...il.com>
To: Paolo Abeni <pabeni@...hat.com>, Jakub Kicinski <kuba@...nel.org>,
 David Miller <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Simon Horman <horms@...nel.org>, Andrew Lunn <andrew@...n.ch>,
 Russell King - ARM Linux <linux@...linux.org.uk>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: [PATCH net-next 3/9] net: phy: c45: don't accept disabled EEE modes
 in genphy_c45_ethtool_set_eee

Link modes in phydev->eee_disabled_modes are filtered out by
genphy_c45_write_eee_adv() and won't be advertised. Therefore
don't accept such modes from userspace.

Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
---
 drivers/net/phy/phy-c45.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c
index 468d24611..b566faba9 100644
--- a/drivers/net/phy/phy-c45.c
+++ b/drivers/net/phy/phy-c45.c
@@ -1559,6 +1559,11 @@ int genphy_c45_ethtool_set_eee(struct phy_device *phydev,
 				phydev_warn(phydev, "At least some EEE link modes are not supported.\n");
 				return -EINVAL;
 			}
+			linkmode_and(tmp, adv, phydev->eee_disabled_modes);
+			if (!linkmode_empty(tmp)) {
+				phydev_warn(phydev, "At least some EEE link modes are disabled.\n");
+				return -EINVAL;
+			}
 			linkmode_copy(phydev->advertising_eee, adv);
 		} else if (linkmode_empty(phydev->advertising_eee)) {
 			phy_advertise_eee_all(phydev);
-- 
2.47.1



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ