diff options
| author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-06-21 16:58:46 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-10 11:49:28 +0200 |
| commit | 69ca969a2626dc4b3bb83b953c053a01e3b9f7e6 (patch) | |
| tree | 38e713538f3587fb8051e44205fe3b4ba4e6e341 /tools/perf/scripts/python | |
| parent | 68f99031897d63ae4937b0f945475dc6782afde4 (diff) | |
platform/chrome: cros_ec_dev - double fetch bug in ioctl
commit 096cdc6f52225835ff503f987a0d68ef770bb78e upstream.
We verify "u_cmd.outsize" and "u_cmd.insize" but we need to make sure
that those values have not changed between the two copy_from_user()
calls. Otherwise it could lead to a buffer overflow.
Additionally, cros_ec_cmd_xfer() can set s_cmd->insize to a lower value.
We should use the new smaller value so we don't copy too much data to
the user.
Reported-by: Pengfei Wang <wpengfeinudt@gmail.com>
Fixes: a841178445bb ('mfd: cros_ec: Use a zero-length array for command data')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Tested-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
