Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f856567b authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Torvalds
Browse files

aacraid: missing capable() check in compat ioctl



In commit d496f94d ('[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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Cc: stable@kernel.org
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c2c65cd2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -771,6 +771,8 @@ static long aac_compat_do_ioctl(struct aac_dev *dev, unsigned cmd, unsigned long
static int aac_compat_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
{
	struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata;
	if (!capable(CAP_SYS_RAWIO))
		return -EPERM;
	return aac_compat_do_ioctl(dev, cmd, (unsigned long)arg);
}