LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] 2.4: [SCSI] aacraid: Fix security hole
@ 2008-02-05 10:33 dann frazier
  2008-02-05 19:31 ` Willy Tarreau
  0 siblings, 1 reply; 2+ messages in thread
From: dann frazier @ 2008-02-05 10:33 UTC (permalink / raw)
  To: Willy TARREAU; +Cc: linux-kernel, Alan Cox

This is a 2.4 backport of a linux-2.6 change by Alan Cox.
(commit 60395bb60e0b5e4e0808ac8eb07a92f6c9cdea1f)

It has been build-tested only (I don't have the hardware).
CVE-2007-4308 was assigned for this issue.

Commit log from 2.6 follows.

  On the SCSI layer ioctl path there is no implicit permissions check for
  ioctls (and indeed other drivers implement unprivileged ioctls). aacraid
  however allows all sorts of very admin only things to be done so should
  check.
---
 drivers/scsi/aacraid/linit.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Signed-off-by: dann frazier <dannf@hp.com>

diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 57d0a40..c6d7bdf 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -683,6 +683,8 @@ static int aac_cfg_release(struct inode * inode, struct file * file )
 static int aac_cfg_ioctl(struct inode * inode,  struct file * file, unsigned int cmd, unsigned long arg )
 {
 	struct aac_dev *dev = aac_devices[MINOR(inode->i_rdev)];
+	if (!capable(CAP_SYS_ADMIN))
+		return -EPERM;
 	return aac_do_ioctl(dev, cmd, (void *)arg);
 }
 
-- 
1.5.4


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

end of thread, other threads:[~2008-02-05 20:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-05 10:33 [PATCH] 2.4: [SCSI] aacraid: Fix security hole dann frazier
2008-02-05 19:31 ` Willy Tarreau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).