diff options
author | Sudeep Dutt <[email protected]> | 2014-02-03 14:53:19 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2014-02-07 15:30:34 -0800 |
commit | 3b1cc9b9622a022208ec95b1259b05bbdf712eb7 (patch) | |
tree | c80a0f6b893b3bb48b70b23c13f5258ba06a8d82 /tools/perf/util/scripting-engines/trace-event-perl.c | |
parent | 01ab1167cd2d861d20195eda08505652c536df97 (diff) |
misc: mic: fix possible signed underflow (undefined behavior) in userspace API
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 <[email protected]>
Reviewed-by: Ashutosh Dixit <[email protected]>
Signed-off-by: Sudeep Dutt <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-perl.c')
0 files changed, 0 insertions, 0 deletions