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: <loom.20140618T155046-940@post.gmane.org>
Date:	Wed, 18 Jun 2014 15:07:25 +0000 (UTC)
From:	Gobinda Charan Maji <gobinda.cemk07@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: Re: Stricter module param and sysfs permission checks

Robert Jarzmik <robert.jarzmik <at> free.fr> writes:

> 
> Dave Jones <davej <at> redhat.com> writes:
> 
> > On Thu, Mar 20, 2014 at 01:43:44PM +1030, Rusty Russell wrote:
> >
> >  > drivers/mtd/devices/docg3.c:
> >  >  	__ATTR(f##id##_dps0_protection_key, S_IWUGO, NULL, 
dps0_insert_key), \
> >  > 	__ATTR(f##id##_dps1_protection_key, S_IWUGO, NULL, dps1_insert_key), 
\
> >  > 
> >  > drivers/scsi/pm8001/pm8001_ctl.c:
> >  > static DEVICE_ATTR(update_fw, S_IRUGO|S_IWUGO,
> >  > 	pm8001_show_update_fw, pm8001_store_update_fw);
> >
> > Why on earth are these world writable ?
> For docg3, this attributes are used to input a "password" into the flash 
chip,
> to unlock parts of the flash memory. By unlock I mean that a sector read 
will
> return the actual sector when unlocked, and only 0xff if not read 
unlocked.
> 
> As to the "why writable" by "others", the legacy reason is that when I 
wrote
> that code I had in mind that a casual user count :
>  - input the code : "echo secret > dps0_protection_key"
>  - mount /usermount
> 
> That's not a good reason, I know, and changing that to remove the "other" 
write
> permission is fine by me.
> 
> Cheers.
> 

Hi All,

As per the newly added restriction (User perms >= group perms >= other 
perms) is concerned, there is an inconsistency in the permission. Say for 
example, permission value is "0432". Here User has only READ permission 
whereas Group has both WRITE and EXECUTE permission and Other has WRITE 
permission. I think it is not good to give Group and Other at least WRITE 
permission whereas User itself has no WRITE permission.

May be, it's better to check those three permissions bit wise rather than as 
a whole. Please rethink about my point and let me know your opinion.

Thanks,
Gobinda



--
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