diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-10-29 15:11:06 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-12 22:05:33 -0500 |
commit | a33ed3974e7b75af36553589e7810da9d8b22382 (patch) | |
tree | 11b10707545ae98ecb5d2cc37ef715f2ca3e5db5 | |
parent | e14594cd658f655ae3384fcc3ec8c345b36cd4d0 (diff) |
aacraid: missing capable() check in compat ioctl
commit f856567b930dfcdbc3323261bf77240ccdde01f5 upstream.
In commit d496f94d22d1 ('[SCSI] aacraid: fix security weakness') we
added a check on CAP_SYS_RAWIO to the ioctl. The compat ioctls need the
check as well.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 408a42ef787a..f0d432c139d0 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -771,6 +771,8 @@ static long aac_compat_do_ioctl(struct aac_dev *dev, unsigned cmd, unsigned long | |||
771 | static int aac_compat_ioctl(struct scsi_device *sdev, int cmd, void __user *arg) | 771 | static int aac_compat_ioctl(struct scsi_device *sdev, int cmd, void __user *arg) |
772 | { | 772 | { |
773 | struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata; | 773 | struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata; |
774 | if (!capable(CAP_SYS_RAWIO)) | ||
775 | return -EPERM; | ||
774 | return aac_compat_do_ioctl(dev, cmd, (unsigned long)arg); | 776 | return aac_compat_do_ioctl(dev, cmd, (unsigned long)arg); |
775 | } | 777 | } |
776 | 778 | ||