Patch "drm/amdgpu: Off by one in dm_dmub_outbox1_low_irq()" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/amdgpu: Off by one in dm_dmub_outbox1_low_irq()

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-amdgpu-off-by-one-in-dm_dmub_outbox1_low_irq.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From a35faec3db0e13aac8ea720bc1a3503081dd5a3d Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Date: Mon, 16 May 2022 10:05:48 +0300
Subject: drm/amdgpu: Off by one in dm_dmub_outbox1_low_irq()

From: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

commit a35faec3db0e13aac8ea720bc1a3503081dd5a3d upstream.

The > ARRAY_SIZE() should be >= ARRAY_SIZE() to prevent an out of bounds
access.

Fixes: e27c41d5b068 ("drm/amd/display: Support for DMUB HPD interrupt handling")
Reviewed-by: Harry Wentland <harry.wentland@xxxxxxx>
Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -757,7 +757,7 @@ static void dm_dmub_outbox1_low_irq(void
 		if (irq_params->irq_src == DC_IRQ_SOURCE_DMCUB_OUTBOX) {
 			do {
 				dc_stat_get_dmub_notification(adev->dm.dc, &notify);
-				if (notify.type > ARRAY_SIZE(dm->dmub_thread_offload)) {
+				if (notify.type >= ARRAY_SIZE(dm->dmub_thread_offload)) {
 					DRM_ERROR("DM: notify type %d larger than the array size %ld !", notify.type,
 					ARRAY_SIZE(dm->dmub_thread_offload));
 					continue;


Patches currently in stable-queue which might be from dan.carpenter@xxxxxxxxxx are

queue-5.15/xfs-prevent-a-warn_once-in-xfs_ioc_attr_list.patch
queue-5.15/bluetooth-fix-passing-null-to-ptr_err.patch
queue-5.15/tty-use-new-tty_insert_flip_string_and_push_buffer-in-pty_write.patch
queue-5.15/tty-extract-tty_flip_buffer_commit-from-tty_flip_buffer_push.patch
queue-5.15/drm-amdgpu-off-by-one-in-dm_dmub_outbox1_low_irq.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux