Skip to contentSkip to conversation

megaraid_sas: remove sysfs dbg_lvl world writeable permissions

PATCH In review Casey Dahlin 4 participants 4 messages Dec 3, 2009 – Dec 4, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 megaraid_sas: remove sysfs dbg_lvl world writeable permissions

From: Bryn M. Reeves <[email protected]>

/sys/bus/pci/drivers/megaraid_sas/poll_mode_io defaults to being world-writable, which seems bad (letting any user affect kernel driver behavior).

This turns off group and user write permissions, so that on typical production systems only root can write to it.

---
 drivers/scsi/megaraid/megaraid_sas.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/megaraid/megaraid_sas.c +1 -1
index a39addc..08a7f49 100644
@@ -3451,7 +3451,7 @@ out:
 	return retval;
 }
 
-static DRIVER_ATTR(poll_mode_io, S_IRUGO|S_IWUGO,
+static DRIVER_ATTR(poll_mode_io, S_IRUGO|S_IWUSR,
 		megasas_sysfs_show_poll_mode_io,
 		megasas_sysfs_set_poll_mode_io);
 
Signature · 1 line
1.6.2.5
#1 lore raw
Quoted 11 lines · Casey Dahlin

From: Bryn M. Reeves<[email protected]>

/sys/bus/pci/drivers/megaraid_sas/poll_mode_io defaults to being world-writable, which seems bad (letting any user affect kernel driver behavior).

This turns off group and user write permissions, so that on typical production systems only root can write to it.

CC Eugene Teo <[email protected]>

The subject should read: megaraid_sas: remove poll_mode_io world writeable permissions instead, and this has been assigned with CVE-2009-3939.

Thanks, Eugene

Signature · 1 line
Eugene Teo / Red Hat Security Response Team
#2 lore raw

How do you turn on poll_mode_io?

Thanks,

Bo Yang

________________________________________
From: Eugene Teo [[email protected]]
Sent: Wednesday, December 02, 2009 7:08 PM
To: Casey Dahlin
Cc: [email protected]; Bryn M. Reeves; DL-MegaRAID Linux; James E.J. Bottomley; Andrew Morton; Yang Hongyang; Anand Gadiyar; Jiri Kosina; [email protected]
Subject: Re: [PATCH] [SCSI] megaraid_sas: remove sysfs dbg_lvl world writeable permissions

Quoted 11 lines · Casey Dahlin

From: Bryn M. Reeves<[email protected]>

/sys/bus/pci/drivers/megaraid_sas/poll_mode_io defaults to being world-writable, which seems bad (letting any user affect kernel driver behavior).

This turns off group and user write permissions, so that on typical production systems only root can write to it.

CC Eugene Teo <[email protected]>

The subject should read: megaraid_sas: remove poll_mode_io world writeable permissions instead, and this has been assigned with CVE-2009-3939.

Thanks, Eugene
--
Eugene Teo / Red Hat Security Response Team

#3 lore raw
Quoted 1 line · Bo

How do you turn on poll_mode_io?

Write to the file as root?

Bryn.