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  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 21 Apr 2017 22:19:45 -0400
From:   Jérémy Lefaure 
To:     Corentin Chary <>,
        Darren Hart <>,
        Andy Shevchenko <>
        Jérémy Lefaure 
Subject: [PATCH] platform/x86: asus-wmi: fix cpufv sysfs file permission

The cpufv sysfs file is defined as readable by anyone even if the
attribute does not have a show function. The result of every read is an
IO error. This file should be write only.

Signed-off-by: Jérémy Lefaure <>
 drivers/platform/x86/asus-wmi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 8499d3ae4257..0ace471cb700 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -1761,7 +1761,7 @@ ASUS_WMI_CREATE_DEVICE_ATTR(cardr, 0644, ASUS_WMI_DEVID_CARDREADER);
-static ssize_t store_cpufv(struct device *dev, struct device_attribute *attr,
+static ssize_t cpufv_store(struct device *dev, struct device_attribute *attr,
 			   const char *buf, size_t count)
 	int value, rv;
@@ -1778,7 +1778,7 @@ static ssize_t store_cpufv(struct device *dev, struct device_attribute *attr,
 	return count;
-static DEVICE_ATTR(cpufv, S_IRUGO | S_IWUSR, NULL, store_cpufv);
+static DEVICE_ATTR_WO(cpufv);
 static struct attribute *platform_attributes[] = {

Powered by blists - more mailing lists