Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5f78e89b5f7041895c4820be5c000792243b634f
Commit:     5f78e89b5f7041895c4820be5c000792243b634f
Parent:     e6096963d2125294f736df4fc37f4226d0b4d178
Author:     Alan Cox <[EMAIL PROTECTED]>
AuthorDate: Wed Nov 7 23:58:10 2007 +0000
Committer:  James Bottomley <[EMAIL PROTECTED]>
CommitDate: Sun Nov 11 17:35:48 2007 -0600

    [SCSI] aacraid: fix security weakness
    
    Actually there are several but one is trivially fixed
    
    1.  FSACTL_GET_NEXT_ADAPTER_FIB ioctl does not lock dev->fib_list
    but needs to
    2.  Ditto for FSACTL_CLOSE_GET_ADAPTER_FIB
    3.  It is possible to construct an attack via the SRB ioctls where
    the user obtains assorted elevated privileges. Various approaches are
    possible, the trivial ones being things like writing to the raw media
    via scsi commands and the swap image of other executing programs with
    higher privileges.
    
    So the ioctls should be CAP_SYS_RAWIO - at least all the FIB manipulating
    ones. This is a bandaid fix for #3 but probably the ioctls should grow
    their own capable checks. The other two bugs need someone competent in that
    driver to fix them.
    
    Signed-off-by: Alan Cox <[EMAIL PROTECTED]>
    Acked-by: Mark Salyzyn <[EMAIL PROTECTED]>
    Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
---
 drivers/scsi/aacraid/linit.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 53061bc..9dd331b 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -636,7 +636,7 @@ static int aac_cfg_open(struct inode *inode, struct file 
*file)
 static int aac_cfg_ioctl(struct inode *inode,  struct file *file,
                unsigned int cmd, unsigned long arg)
 {
-       if (!capable(CAP_SYS_ADMIN))
+       if (!capable(CAP_SYS_RAWIO))
                return -EPERM;
        return aac_do_ioctl(file->private_data, cmd, (void __user *)arg);
 }
@@ -691,7 +691,7 @@ static int aac_compat_ioctl(struct scsi_device *sdev, int 
cmd, void __user *arg)
 
 static long aac_compat_cfg_ioctl(struct file *file, unsigned cmd, unsigned 
long arg)
 {
-       if (!capable(CAP_SYS_ADMIN))
+       if (!capable(CAP_SYS_RAWIO))
                return -EPERM;
        return aac_compat_do_ioctl((struct aac_dev *)file->private_data, cmd, 
arg);
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to