3b1cc9b962
iovcnt is declared as a signed integer in both the userspace API and as a local variable in mic_virtio.c. The while() loop in mic_virtio.c iterates until the local variable iovcnt reaches the value 0. If userspace passes e.g. INT_MIN as iovcnt field, this loop then appears to depend on an undefined behavior (signed underflow) to complete. The fix is to use unsigned integers in both the userspace API and the local variable. This issue was reported @ https://lkml.org/lkml/2014/1/10/10 Reported-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Sudeep Dutt <sudeep.dutt@intel.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
---|---|---|
.. | ||
Makefile | ||
mic_boot.c | ||
mic_debugfs.c | ||
mic_device.h | ||
mic_fops.c | ||
mic_fops.h | ||
mic_intr.c | ||
mic_intr.h | ||
mic_main.c | ||
mic_smpt.c | ||
mic_smpt.h | ||
mic_sysfs.c | ||
mic_virtio.c | ||
mic_virtio.h | ||
mic_x100.c | ||
mic_x100.h |