drm/amdgpu: fix out of bounds write
authorjsg <jsg@openbsd.org>
Wed, 3 Nov 2021 02:37:48 +0000 (02:37 +0000)
committerjsg <jsg@openbsd.org>
Wed, 3 Nov 2021 02:37:48 +0000 (02:37 +0000)
From Thelford Williams
eb3b6805e3e9d98b2507201fd061a231988ce623 in linux 5.10.y/5.10.77
5afa7898ab7a0ec9c28556a91df714bf3c2f725e in mainline linux

sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c

index fbb65c9..e43f82b 100644 (file)
@@ -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,
                                           &param_nums)) {