Skip to content

Commit a491ce7

Browse files
committed
Merge tag 'staging-3.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver tree fix from Greg KH: "Here is a single staging driver fix for your tree. It resolves an issue with arbritary writes to memory if a specific driver is loaded" * tag 'staging-3.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging/cxt1e1/linux.c: Correct arbitrary memory write in c4_ioctl()
2 parents 979e0d7 + 084b6e7 commit a491ce7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/staging/cxt1e1/linux.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,8 @@ c4_ioctl (struct net_device *ndev, struct ifreq *ifr, int cmd)
866866
_IOC_SIZE (iocmd));
867867
#endif
868868
iolen = _IOC_SIZE (iocmd);
869+
if (iolen > sizeof(arg))
870+
return -EFAULT;
869871
data = ifr->ifr_data + sizeof (iocmd);
870872
if (copy_from_user (&arg, data, iolen))
871873
return -EFAULT;

0 commit comments

Comments
 (0)