Patch "drm: vc4: Fix possible null pointer dereference" has been added to the 6.9-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: vc4: Fix possible null pointer dereference

to the 6.9-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-vc4-fix-possible-null-pointer-dereference.patch
and it can be found in the queue-6.9 subdirectory.

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



commit e6668bb7314c8f097591026ba3375ef3f879d1d8
Author: Aleksandr Mishin <amishin@xxxxxxxxxx>
Date:   Tue Apr 9 10:56:22 2024 +0300

    drm: vc4: Fix possible null pointer dereference
    
    [ Upstream commit c534b63bede6cb987c2946ed4d0b0013a52c5ba7 ]
    
    In vc4_hdmi_audio_init() of_get_address() may return
    NULL which is later dereferenced. Fix this bug by adding NULL check.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Fixes: bb7d78568814 ("drm/vc4: Add HDMI audio support")
    Signed-off-by: Aleksandr Mishin <amishin@xxxxxxxxxx>
    Signed-off-by: Maxime Ripard <mripard@xxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20240409075622.11783-1-amishin@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index d8751ea203032..5f8d51b293705 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -2740,6 +2740,8 @@ static int vc4_hdmi_audio_init(struct vc4_hdmi *vc4_hdmi)
 		index = 1;
 
 	addr = of_get_address(dev->of_node, index, NULL, NULL);
+	if (!addr)
+		return -EINVAL;
 
 	vc4_hdmi->audio.dma_data.addr = be32_to_cpup(addr) + mai_data->offset;
 	vc4_hdmi->audio.dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;




[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