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-next>] [day] [month] [year] [list]
Date:   Fri,  3 Jun 2022 08:21:16 -0700
From:   D Scott Phillips <scott@...amperecomputing.com>
To:     linux-hwmon@...r.kernel.org
Cc:     Jean Delvare <jdelvare@...e.com>,
        Guenter Roeck <linux@...ck-us.net>,
        linux-kernel@...r.kernel.org, patches@...erecomputing.com,
        Darren Hart <darren@...amperecomputing.com>,
        Ilkka Koskinen <ilkka@...amperecomputing.com>
Subject: [PATCH] hwmon: (xgene) restrict power measurements to admin by default

Access to power information can be used to infer the instructions being run
and possibly even data being processed on a cpu[1]. Restrict access to
power information to administrator users by default. (Cf. a similar
powercap change[2].)

[1]: Lipp, Moritz, et al. "PLATYPUS: software-based power side-channel
     attacks on x86." 2021 IEEE Symposium on Security and Privacy (SP).
     IEEE, 2021.
[2]: commit 949dd0104c49 ("powercap: restrict energy meter to root access")

Fixes: ed42cfa881e1 ("hwmon: Add xgene hwmon driver")
Signed-off-by: D Scott Phillips <scott@...amperecomputing.com>
Cc: stable@...r.kernel.org
---
 drivers/hwmon/xgene-hwmon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hwmon/xgene-hwmon.c b/drivers/hwmon/xgene-hwmon.c
index 5cde837bfd09..6ad1daf2d354 100644
--- a/drivers/hwmon/xgene-hwmon.c
+++ b/drivers/hwmon/xgene-hwmon.c
@@ -397,9 +397,9 @@ static DEVICE_ATTR_RO(temp1_label);
 static DEVICE_ATTR_RO(temp1_input);
 static DEVICE_ATTR_RO(temp1_critical_alarm);
 static DEVICE_ATTR_RO(power1_label);
-static DEVICE_ATTR_RO(power1_input);
+static DEVICE_ATTR_ADMIN_RO(power1_input);
 static DEVICE_ATTR_RO(power2_label);
-static DEVICE_ATTR_RO(power2_input);
+static DEVICE_ATTR_ADMIN_RO(power2_input);
 
 static struct attribute *xgene_hwmon_attrs[] = {
 	&dev_attr_temp1_label.attr,
-- 
2.35.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ