Patch "ASoC: core: fix use after free in snd_soc_remove_platform()" has been added to the 3.17-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

    ASoC: core: fix use after free in snd_soc_remove_platform()

to the 3.17-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:
     asoc-core-fix-use-after-free-in-snd_soc_remove_platform.patch
and it can be found in the queue-3.17 subdirectory.

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


>From decc27b01d584c985c231e73d3b493de6ec07af8 Mon Sep 17 00:00:00 2001
From: Daniel Mack <daniel@xxxxxxxxxx>
Date: Tue, 7 Oct 2014 13:41:23 +0200
Subject: ASoC: core: fix use after free in snd_soc_remove_platform()

From: Daniel Mack <daniel@xxxxxxxxxx>

commit decc27b01d584c985c231e73d3b493de6ec07af8 upstream.

Coverity spotted an use-after-free condition in snd_soc_remove_platform().
Fix this by moving snd_soc_component_cleanup() after the debug print
statement which uses the component's string.

Signed-off-by: Daniel Mack <daniel@xxxxxxxxxx>
Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 sound/soc/soc-core.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -4315,10 +4315,10 @@ void snd_soc_remove_platform(struct snd_
 	snd_soc_component_del_unlocked(&platform->component);
 	mutex_unlock(&client_mutex);
 
-	snd_soc_component_cleanup(&platform->component);
-
 	dev_dbg(platform->dev, "ASoC: Unregistered platform '%s'\n",
 		platform->component.name);
+
+	snd_soc_component_cleanup(&platform->component);
 }
 EXPORT_SYMBOL_GPL(snd_soc_remove_platform);
 


Patches currently in stable-queue which might be from daniel@xxxxxxxxxx are

queue-3.17/asoc-soc-pcm-fix-sig_bits-determination-in-soc_pcm_apply_msb.patch
queue-3.17/asoc-soc-dapm-fix-use-after-free.patch
queue-3.17/asoc-core-fix-use-after-free-in-snd_soc_remove_platform.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]