Skip to contentSkip to conversation

2.4: [SCSI] aacraid: Fix security hole

PATCH In review dann frazier 2 participants 2 messages Feb 5, 2008

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

PATCH 1/1 2.4: [SCSI] aacraid: Fix security hole

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(-)
drivers/scsi/aacraid/linit.c +2 -0
index 57d0a40..c6d7bdf 100644
@@ -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);
 }
 
Signature · 1 line
1.5.4
#1 lore raw

Hi Dann,

Quoted 6 lines · dann frazier

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.

Quoted 6 lines

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.

OK, makes sense. I did not notice that one in 2.6, eventhough Alan clearly stated a security hole in the subject.

I'm applying it now, thanks!

Willy