[PATCH v2] drm/amdgpu: check a user-provided number of BOs in list

2025-04-18 Thread Denis Arefev
) with SVACE. Fixes: 964d0fbf6301 ("drm/amdgpu: Allow to create BO lists in CS ioctl v3") Cc: sta...@vger.kernel.org Signed-off-by: Denis Arefev --- V1 -> V2: Set a reasonable limit 'USHRT_MAX' for 'bo_number' it as Christian König suggested drivers/gpu/drm/amd/

Re: [PATCH] drm/amd/pm/smu11: Prevent division by zero

2025-04-10 Thread Denis Arefev
> --- > drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c > b/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c > index 189c6a32b6bd..54229b991858 100644 > --- a/drivers/gpu/drm/amd/p

[PATCH] drm/amdgpu: check a user-provided number of BOs in list

2025-04-10 Thread Denis Arefev
) with SVACE. Fixes: 964d0fbf6301 ("drm/amdgpu: Allow to create BO lists in CS ioctl v3") Cc: sta...@vger.kernel.org Signed-off-by: Denis Arefev --- drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.

Re: [PATCH 1/1] fbdev: atyfb: Fix buffer overflow

2025-04-01 Thread Denis Arefev
> It's old, but still runs in some configurations and people > still (although probably not on daily bases) use it. > Also don't forget about the various old non-x86 hardware machines > which often used ATI cards too, and those machines are still > supported by Linux as well. Hi Helge. Thanks for

Re: [PATCH 1/1] fbdev: atyfb: Fix buffer overflow

2025-04-01 Thread Denis Arefev
Hi Ville. Hi Jani. Thank you for your answers. One small question. This chip (3D RAGE LT (Mach64 LG)) is very old it is 25 or maybe 30 years old, why is it not removed from the core? Regards Denis.

[PATCH] drm/amd/pm/smu11: Prevent division by zero

2025-03-30 Thread Denis Arefev
The user can set any speed value. If speed is greater than UINT_MAX/8, division by zero is possible. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 1e866f1fe528 ("drm/amd/pm: Prevent divide by zero") Signed-off-by: Denis Arefev --- drivers/gpu/drm/am

[PATCH 1/1] fbdev: atyfb: Fix buffer overflow

2025-03-27 Thread Denis Arefev
The value LCD_MISC_CNTL is used in the 'aty_st_lcd()' function to calculate an index for accessing an array element of size 9. This may cause a buffer overflow. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-

[PATCH 0/1] fbdev: atyfb: Fix buffer overflow

2025-03-27 Thread Denis Arefev
this code completely, as the chip is very obsolete and not applicable. Found by Linux Verification Center (linuxtesting.org) with SVACE. Denis Arefev (1): fbdev: atyfb: Fix buffer overflow drivers/video/fbdev/aty/atyfb_base.c | 4 1 file changed, 4 insertions(+) base-commit

[PATCH 0/5] drm/amd/pm: Prevent division by zero

2025-03-25 Thread Denis Arefev
This series of patches prevents possible division by zero. The user can set any speed value. If speed is greater than UINT_MAX/8, division by zero is possible. Found by Linux Verification Center (linuxtesting.org) with SVACE. Denis Arefev (5): drm/amd/pm: Prevent division by zero drm/amd

[PATCH 5/5] drm/amd/pm: Prevent division by zero

2025-03-21 Thread Denis Arefev
The user can set any speed value. If speed is greater than UINT_MAX/8, division by zero is possible. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: c52dcf49195d ("drm/amd/pp: Avoid divide-by-zero in fan_ctrl_set_fan_speed_rpm") Signed-off-by: Denis Arefev --

[PATCH 4/5] drm/amd/pm: Prevent division by zero

2025-03-21 Thread Denis Arefev
The user can set any speed value. If speed is greater than UINT_MAX/8, division by zero is possible. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: c52dcf49195d ("drm/amd/pp: Avoid divide-by-zero in fan_ctrl_set_fan_speed_rpm") Signed-off-by: Denis Arefev --

[PATCH 3/5] drm/amd/pm: Prevent division by zero

2025-03-21 Thread Denis Arefev
The user can set any speed value. If speed is greater than UINT_MAX/8, division by zero is possible. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 031db09017da ("drm/amd/powerplay/vega20: enable fan RPM and pwm settings V2") Signed-off-by: Denis Arefev --

[PATCH 1/5] drm/amd/pm: Prevent division by zero

2025-03-21 Thread Denis Arefev
The user can set any speed value. If speed is greater than UINT_MAX/8, division by zero is possible. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: c05d1c401572 ("drm/amd/swsmu: add aldebaran smu13 ip support (v3)") Signed-off-by: Denis Arefev --- drivers/g

[PATCH 2/5] drm/amd/pm: Prevent division by zero

2025-03-21 Thread Denis Arefev
The user can set any speed value. If speed is greater than UINT_MAX/8, division by zero is possible. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: b64625a303de ("drm/amd/pm: correct the address of Arcturus fan related registers") Signed-off-by: De

[PATCH 5.10] drm/radeon: check bo_va->bo is non-NULL before using it

2025-01-20 Thread Denis Arefev
her [Denis: minor fix to resolve merge conflict.] Signed-off-by: Denis Arefev --- Backport fix CVE-2024-41060 Link: https://nvd.nist.gov/vuln/detail/CVE-2024-41060 --- drivers/gpu/drm/radeon/radeon_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rad

[PATCH] drm/amd/display: Return value of function

2023-08-03 Thread Denis Arefev
Added return value check hpd_enable Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Denis Arefev --- drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce

[PATCH] drm/amd/display: Added pointer check

2022-12-06 Thread Denis Arefev
Return value of a function 'dc_create_state' is dereferenced at amdgpu_dm.c:2027 without checking for null Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Denis Arefev --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +++- 1 file changed, 3

[no subject]

2022-12-06 Thread Denis Arefev
Date: Thu, 10 Nov 2022 16:47:26 +0300 Subject: [PATCH] drm/amdgpu/display: Add pointer check Return value of a function 'dc_create_state' is dereferenced at amdgpu_dm.c:2027 without checking for null Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: De

[PATCH] drm/amdgpu/display: Add pointer check

2022-11-23 Thread Denis Arefev
Return value of a function 'dc_create_state' is dereferenced at amdgpu_dm.c:2027 without checking for null Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Denis Arefev --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +++- 1 file changed, 3

[PATCH] drm/amd/pm: added result check

2022-11-22 Thread Denis Arefev
The return value of the 'div64_s64' function called in ppevvmath.h:371 was not checked. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Denis Arefev --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h | 6 -- 1 file changed, 4 insertions(+), 2

[no subject]

2022-11-22 Thread Denis Arefev
Date: Tue, 22 Nov 2022 15:51:44 +0300 Subject: [PATCH] powerplay: hwmgr: added result check The return value of the 'div64_s64' function called in ppevvmath.h:371 was not checked. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Denis Arefev --- drive

[PATCH v2] amdgpu: nbio_v7_4: Add pointer check

2022-11-19 Thread Denis Arefev
Return value of a function 'amdgpu_ras_find_obj' is dereferenced at nbio_v7_4.c:325 without checking for null Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Denis Arefev --- drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 3 +++ 1 file changed, 3 insertion

[PATCH] nbio_v7_4: Add pointer check

2022-11-11 Thread Denis Arefev
Return value of a function 'amdgpu_ras_find_obj' is dereferenced at nbio_v7_4.c:325 without checking for null Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Denis Arefev --- drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 3 +++ 1 file changed, 3 insertion

[PATCH] amdgpu_dm_2027: Add pointer check

2022-11-11 Thread Denis Arefev
Return value of a function 'dc_create_state' is dereferenced at amdgpu_dm.c:2027 without checking for null Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Denis Arefev --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +++- 1 file changed, 3

[PATCH] nbio_v7_4: Add pointer check

2022-11-10 Thread Denis Arefev
Return value of a function 'amdgpu_ras_find_obj' is dereferenced at nbio_v7_4.c:325 without checking for null Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Denis Arefev --- drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 3 +++ 1 file changed, 3 insertion