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]
Date:	Thu, 24 Apr 2014 12:29:15 -0700
From:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:	Rusty Russell <rusty@...tcorp.com.au>
Cc:	linux-kernel@...r.kernel.org,
	Christopher Brannon <chris@...-brannons.com>,
	Samuel Thibault <samuel.thibault@...-lyon.org>
Subject: Re: [PATCH 6/9] drivers/staging/speakup/: avoid world-writable sysfs
 files.

On Thu, Apr 24, 2014 at 01:57:49PM +0930, Rusty Russell wrote:
> Greg Kroah-Hartman <gregkh@...uxfoundation.org> writes:
> > On Tue, Apr 22, 2014 at 01:03:29PM +0930, Rusty Russell wrote:
> >> In line with practice for module parameters, we're adding a build-time
> >> check that sysfs files aren't world-writable.
> >
> > Then why not just use the __ATTR_RO() macro?
> 
> Hmm, I didn't know those variants existed :(
> 
> But most of these are not amenable to __ATTR_RO etc, since they call
> generic helpers, eg:
> 
> 	__ATTR(delimiters, S_IWUGO|S_IRUGO, punc_show, punc_store);
> 
> I dislike the __ATTR_RO etc macros: hiding the references to the
> function from grep is Too Much Magic.  (Sure, I do it in module_param,
> but that has the excuse that it allows typechecking as well).
> 
> > I'd prefer some "standard" permissions for all of these sysfs files,
> > it's quite confusing otherwise, don't you agree?
> 
> Agreed.  So I used S_IWUSR | S_IRUGO everywhere, which is what ATTR_RW
> uses.
> 
> Cheers,
> Rusty.
> 
> Subject: drivers/staging/speakup/: avoid world-writable sysfs files.
> 
> In line with practice for module parameters, we're adding a build-time
> check that sysfs files aren't world-writable.
> 
> Cc: Christopher Brannon <chris@...-brannons.com>
> Cc: Samuel Thibault <samuel.thibault@...-lyon.org>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Signed-off-by: Rusty Russell <rusty@...tcorp.com.au>

Acked-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
--
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