diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-07 10:53:32 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-07 10:53:32 -0700 |
commit | 32cf95db22d49cf4a3b421ba9fd156bb5f920ebb (patch) | |
tree | 48df4fe0b994c33155c7b19269621f6c122fee60 /drivers/misc | |
parent | 630aac5ab6d6708c2cf715ddb5a77928e0aacb04 (diff) | |
parent | d1306eb675ad7a9a760b6b8e8e189824b8db89e7 (diff) | |
download | linux-32cf95db22d49cf4a3b421ba9fd156bb5f920ebb.tar.bz2 |
Merge tag 'char-misc-4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull misc driver fixes from Gfreg KH:
"Here are three small fixes for some driver problems that were
reported. Full details in the shortlog below.
All of these have been in linux-next with no reported issues"
* tag 'char-misc-4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
nvmem: mxs-ocotp: fix buffer overflow in read
Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read()
misc: mic: Fix for double fetch security bug in VOP driver
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/mic/vop/vop_vringh.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/misc/mic/vop/vop_vringh.c b/drivers/misc/mic/vop/vop_vringh.c index e94c7fb6712a..88e45234d527 100644 --- a/drivers/misc/mic/vop/vop_vringh.c +++ b/drivers/misc/mic/vop/vop_vringh.c @@ -945,6 +945,11 @@ static long vop_ioctl(struct file *f, unsigned int cmd, unsigned long arg) ret = -EFAULT; goto free_ret; } + /* Ensure desc has not changed between the two reads */ + if (memcmp(&dd, dd_config, sizeof(dd))) { + ret = -EINVAL; + goto free_ret; + } mutex_lock(&vdev->vdev_mutex); mutex_lock(&vi->vop_mutex); ret = vop_virtio_add_device(vdev, dd_config); |