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, 06 Jul 2012 08:27:39 +0200
From:	"Ulrich Windl" <Ulrich.Windl@...uni-regensburg.de>
To:	<linux-kernel@...r.kernel.org>
Cc:	"Ulrich Windl" <Ulrich.Windl@...uni-regensburg.de>
Subject: /sys and access(2): Correctly implemented?

Hi!

Recently I found a problem with the command (kernel 3.0.34-0.7-default from SLES 11 SP2, run as root):
test -r "$file" && cat "$file"
emitting "Permission denied"

Investigating, I found that "test" actually uses "access()" to check for permissions. Unfortunately there are some files in /sys that have "write-only" permission bits set (e.g. /sys/devices/system/cpu/probe).

~ # ll /sys/devices/system/cpu/probe
--w------- 1 root root 4096 Jun 29 12:43 /sys/devices/system/cpu/probe
~ # F=/sys/devices/system/cpu/probe
~ # test "$F" && cat "$F"
cat: /sys/devices/system/cpu/probe: Permission denied

In times of capabilities and ACLs, shouldn't there be a test for permissions that actually works?

Regards,
Ulrich
P.S. Please make sure my CC: gets your replies, too -- thanks

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ