public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Incorrect permissions on parport sysctls.
@ 2005-08-09  4:44 Dave Jones
  2005-08-09  7:10 ` Jan Engelhardt
  2005-08-09 10:11 ` [Linux-parport] " Tim Waugh
  0 siblings, 2 replies; 4+ messages in thread
From: Dave Jones @ 2005-08-09  4:44 UTC (permalink / raw)
  To: linux-parport; +Cc: Linux Kernel, Andrew Morton

We have a bunch of 'probe' sysctl's in parport, which are
readable. (world readable even). Make them write-only.
Without this, sysctl -a will try to read these files.

Signed-off-by: Dave Jones <davej@redhat.com>

--- linux-2.6.11/drivers/parport/procfs.c~	2005-04-25 12:17:30.000000000 -0400
+++ linux-2.6.11/drivers/parport/procfs.c	2005-04-25 12:20:35.000000000 -0400
@@ -286,19 +286,19 @@ static const struct parport_sysctl_table
 		PARPORT_DEVICES_ROOT_DIR,
 #ifdef CONFIG_PARPORT_1284
 		{ DEV_PARPORT_AUTOPROBE, "autoprobe",
-		  NULL, 0, 0444, NULL,
+		  NULL, 0, 0200, NULL,
 		  &do_autoprobe },
 		{ DEV_PARPORT_AUTOPROBE + 1, "autoprobe0",
-		 NULL, 0, 0444, NULL,
+		 NULL, 0, 0200, NULL,
 		 &do_autoprobe },
 		{ DEV_PARPORT_AUTOPROBE + 2, "autoprobe1",
-		  NULL, 0, 0444, NULL,
+		  NULL, 0, 0200, NULL,
 		  &do_autoprobe },
 		{ DEV_PARPORT_AUTOPROBE + 3, "autoprobe2",
-		  NULL, 0, 0444, NULL,
+		  NULL, 0, 0200, NULL,
 		  &do_autoprobe },
 		{ DEV_PARPORT_AUTOPROBE + 4, "autoprobe3",
-		  NULL, 0, 0444, NULL,
+		  NULL, 0, 0200, NULL,
 		  &do_autoprobe },
 #endif /* IEEE 1284 support */
 		{0}


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Incorrect permissions on parport sysctls.
  2005-08-09  4:44 Incorrect permissions on parport sysctls Dave Jones
@ 2005-08-09  7:10 ` Jan Engelhardt
  2005-08-09 10:11 ` [Linux-parport] " Tim Waugh
  1 sibling, 0 replies; 4+ messages in thread
From: Jan Engelhardt @ 2005-08-09  7:10 UTC (permalink / raw)
  To: Dave Jones; +Cc: linux-parport, Linux Kernel, Andrew Morton


>We have a bunch of 'probe' sysctl's in parport, which are
>readable. (world readable even). Make them write-only.
>Without this, sysctl -a will try to read these files.

Why write-only? Donot you want to read back what you've written there 
sometime? IMO 0600.



Jan Engelhardt
-- 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Linux-parport] Incorrect permissions on parport sysctls.
  2005-08-09  4:44 Incorrect permissions on parport sysctls Dave Jones
  2005-08-09  7:10 ` Jan Engelhardt
@ 2005-08-09 10:11 ` Tim Waugh
  2005-08-09 15:53   ` Dave Jones
  1 sibling, 1 reply; 4+ messages in thread
From: Tim Waugh @ 2005-08-09 10:11 UTC (permalink / raw)
  To: Dave Jones, linux-parport, Linux Kernel, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

On Tue, Aug 09, 2005 at 12:44:41AM -0400, Dave Jones wrote:

> We have a bunch of 'probe' sysctl's in parport, which are
> readable. (world readable even). Make them write-only.
> Without this, sysctl -a will try to read these files.

??

This change is wrong.  The probing happens at module load time, and
the IEEE 1284 device IDs are stored for later retrieval to user space
via these sysctls.

They are backed by read-only variables.  Reading does not trigger any
device interaction.

Make them 0400 if you think it's a security issue: but then,
/proc/ide/hda/model etc should also get the same treatment.

Tim.
*/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Linux-parport] Incorrect permissions on parport sysctls.
  2005-08-09 10:11 ` [Linux-parport] " Tim Waugh
@ 2005-08-09 15:53   ` Dave Jones
  0 siblings, 0 replies; 4+ messages in thread
From: Dave Jones @ 2005-08-09 15:53 UTC (permalink / raw)
  To: Tim Waugh; +Cc: linux-parport, Linux Kernel, Andrew Morton

On Tue, Aug 09, 2005 at 11:11:10AM +0100, Tim Waugh wrote:
 > On Tue, Aug 09, 2005 at 12:44:41AM -0400, Dave Jones wrote:
 > 
 > > We have a bunch of 'probe' sysctl's in parport, which are
 > > readable. (world readable even). Make them write-only.
 > > Without this, sysctl -a will try to read these files.
 > 
 > ??
 > 
 > This change is wrong.  The probing happens at module load time, and
 > the IEEE 1284 device IDs are stored for later retrieval to user space
 > via these sysctls.
 > 
 > They are backed by read-only variables.  Reading does not trigger any
 > device interaction.
 > 
 > Make them 0400 if you think it's a security issue: but then,
 > /proc/ide/hda/model etc should also get the same treatment.

It wasn't a security related change.  As I mentioned above,
sysctl -a would fail to read them anyway when I last tried
(circa 2.6.9/10)

I'll try and reproduce without that patch later today.

		Dave


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-08-09 15:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-09  4:44 Incorrect permissions on parport sysctls Dave Jones
2005-08-09  7:10 ` Jan Engelhardt
2005-08-09 10:11 ` [Linux-parport] " Tim Waugh
2005-08-09 15:53   ` Dave Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox