Re: [PATCH 9/9] sysfs: disallow world-writable files.

2015-05-01 Thread Gobinda Maji
On 30 April 2015 at 07:32, Rusty Russell wrote: > You're absolutely right, well spotted! The checks can be tightened. We > don't really care about execute, but logically write is "more > privileged" than read. > > Best to separate the tests; OTHER_WRITABLE <= GROUP_WRITABLE <= OWNER_WRITABLE >

Re: [PATCH 9/9] sysfs: disallow world-writable files.

2015-04-29 Thread Rusty Russell
Gobinda Maji writes: > Hi Rusty, Hi Gobinda, > I have a small doubt about the permission restriction (User perms >= > group perms >= other perms) in VERIFY_OCTAL_PERMISSIONS(). Please Note > that permission field of User, Group or Other consists of three bits. > LSB is EXECUTE permission, MSB is

Re: [PATCH 9/9] sysfs: disallow world-writable files.

2015-04-29 Thread Gobinda Charan Maji
Rusty Russell rustcorp.com.au> writes: > > This check was introduced in 2006 by Alexey Dobriyan (9774a1f54f173) > for module parameters; we removed it when we unified the check into > VERIFY_OCTAL_PERMISSIONS() as sysfs didn't have the same requirement. > Now all those users are fixed, reintrodu

Re: [PATCH 9/9] sysfs: disallow world-writable files.

2015-04-29 Thread Gobinda Maji
Hi Rusty, I have a small doubt about the permission restriction (User perms >= group perms >= other perms) in VERIFY_OCTAL_PERMISSIONS(). Please Note that permission field of User, Group or Other consists of three bits. LSB is EXECUTE permission, MSB is READ permission and the middle bit is WRITE

[PATCH 9/9] sysfs: disallow world-writable files.

2014-04-21 Thread Rusty Russell
This check was introduced in 2006 by Alexey Dobriyan (9774a1f54f173) for module parameters; we removed it when we unified the check into VERIFY_OCTAL_PERMISSIONS() as sysfs didn't have the same requirement. Now all those users are fixed, reintroduce it. Cc: Alexey Dobriyan Cc: Dave Jones Cc: Joe