Commit f23750b5 authored by Thelford Williams's avatar Thelford Williams Committed by Alex Deucher

drm/amdgpu: fix out of bounds write

Size can be any value and is user controlled resulting in overwriting the
40 byte array wr_buf with an arbitrary length of data from buf.
Signed-off-by: default avatarThelford Williams <tdwilliamsiv@gmail.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 76c023fa
...@@ -264,7 +264,7 @@ static ssize_t dp_link_settings_write(struct file *f, const char __user *buf, ...@@ -264,7 +264,7 @@ static ssize_t dp_link_settings_write(struct file *f, const char __user *buf,
if (!wr_buf) if (!wr_buf)
return -ENOSPC; return -ENOSPC;
if (parse_write_buffer_into_params(wr_buf, size, if (parse_write_buffer_into_params(wr_buf, wr_buf_size,
(long *)param, buf, (long *)param, buf,
max_param_num, max_param_num,
&param_nums)) { &param_nums)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment