lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fb5ee1a9-8cdb-3aab-c3ac-e4d03421fb85@roeck-us.net>
Date:   Wed, 27 Oct 2021 08:59:22 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Harry Wentland <harry.wentland@....com>,
        Thelford Williams <tdwilliamsiv@...il.com>
Cc:     amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org, David Airlie <airlied@...ux.ie>,
        Alex Deucher <alexander.deucher@....com>,
        Patrik Jakobsson <patrik.r.jakobsson@...il.com>
Subject: Re: [PATCH] drm/amdgpu: fix out of bounds write

On 10/27/21 8:22 AM, Harry Wentland wrote:
> On 2021-10-27 10:39, Guenter Roeck wrote:
>> On Wed, Oct 13, 2021 at 04:04:13PM -0400, Thelford Williams wrote:
>>> 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: Thelford Williams <tdwilliamsiv@...il.com>
>>> Signed-off-by: Alex Deucher <alexander.deucher@....com>
>>
>> The fix works, but unless I am missing something it is incomplete.
>> parse_write_buffer_into_params() is called several times, and the
>> size parameter is always wrong. This patch only fixes one of several
>> instances of the problem.
>>
> 
> Patrik sent a patch that covers all cases:
> https://patchwork.freedesktop.org/patch/461554/?series=96341&rev=2
> 
> Harry
> 
Thanks!

Guenter

>> Guenter
>>
>>> ---
>>>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
>>> index 814f67d86a3c..9b3ad56607bb 100644
>>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
>>> +++ b/drivers/gpu/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,
>>>   					   &param_nums)) {
>>> -- 
>>> 2.33.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ