From: jsg Date: Wed, 3 Nov 2021 02:37:48 +0000 (+0000) Subject: drm/amdgpu: fix out of bounds write X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e3508b1cbed811a0eef3dbdaa5bbf7ef4f2f6820;p=openbsd drm/amdgpu: fix out of bounds write From Thelford Williams eb3b6805e3e9d98b2507201fd061a231988ce623 in linux 5.10.y/5.10.77 5afa7898ab7a0ec9c28556a91df714bf3c2f725e in mainline linux --- diff --git a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c index fbb65c95464..e43f82bcb23 100644 --- a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +++ b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c @@ -264,7 +264,7 @@ static ssize_t dp_link_settings_write(struct file *f, const char __user *buf, if (!wr_buf) 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, max_param_num, ¶m_nums)) {