Patch "ALSA: hda: cs35l41: Possible null pointer dereference in cs35l41_hda_unbind()" 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

    ALSA: hda: cs35l41: Possible null pointer dereference in cs35l41_hda_unbind()

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:
     alsa-hda-cs35l41-possible-null-pointer-dereference-i.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 c433d2f918d2d2e52913d681123ed344c0145b99
Author: Simon Trimmer <simont@xxxxxxxxxxxxxxxxxxxxx>
Date:   Fri May 31 13:08:20 2024 +0100

    ALSA: hda: cs35l41: Possible null pointer dereference in cs35l41_hda_unbind()
    
    [ Upstream commit 6386682cdc8b41319c92fbbe421953e33a28840c ]
    
    The cs35l41_hda_unbind() function clears the hda_component entry
    matching it's index and then dereferences the codec pointer held in the
    first element of the hda_component array, this is an issue when the
    device index was 0.
    
    Instead use the codec pointer stashed in the cs35l41_hda structure as it
    will still be valid.
    
    Fixes: 7cf5ce66dfda ("ALSA: hda: cs35l41: Add device_link between HDA and cs35l41_hda")
    Signed-off-by: Simon Trimmer <simont@xxxxxxxxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240531120820.35367-1-simont@xxxxxxxxxxxxxxxxxxxxx
    Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c
index d3fa6e136744d..25cf072a2a10b 100644
--- a/sound/pci/hda/cs35l41_hda.c
+++ b/sound/pci/hda/cs35l41_hda.c
@@ -1362,7 +1362,7 @@ static void cs35l41_hda_unbind(struct device *dev, struct device *master, void *
 	if (comps[cs35l41->index].dev == dev) {
 		memset(&comps[cs35l41->index], 0, sizeof(*comps));
 		sleep_flags = lock_system_sleep();
-		device_link_remove(&comps->codec->core.dev, cs35l41->dev);
+		device_link_remove(&cs35l41->codec->core.dev, cs35l41->dev);
 		unlock_system_sleep(sleep_flags);
 	}
 }




[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