Patch "ALSA: firewire: fix NULL pointer dereference when releasing uninitialized data of iso-resource" has been added to the 4.9-stable tree
This is a note to let you know that I've just added the patch titled
ALSA: firewire: fix NULL pointer dereference when releasing uninitialized data of iso-resource
to the 4.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-firewire-fix-null-pointer-dereference-when-releasing-uninitialized-data-of-iso-resource.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
0c264af7be2013266c5b4c644f3f366399ee490aMon Sep 17 00:00:00 2001
From: Takashi Sakamoto <[email protected]>
Date: Sun, 20 Aug 2017 15:54:26 +0900
Subject: ALSA: firewire: fix NULL pointer dereference when releasing uninitialized data of iso-resource
From: Takashi Sakamoto <[email protected]>
commit 0c264af7be2013266c5b4c644f3f366399ee490a upstream.
When calling 'iso_resource_free()' for uninitialized data, this function causes NULL pointer dereference due to its 'unit' member. This occurs when unplugging audio and music units on IEEE 1394 bus at failure of card registration.
This commit fixes the bug. The bug exists since kernel v4.5.
--- sound/firewire/iso-resources.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
sound/firewire/iso-resources.c +6 -1
@@ -210,9 +210,14 @@ EXPORT_SYMBOL(fw_iso_resources_update);*/ void fw_iso_resources_free (struct fw_iso_resources *r) { -struct fw_card *card =fw_parent_device (r->unit)->card; +struct fw_card *card;int bandwidth, channel; +/* Not initialized. */ +if (r->unit ==NULL ) +return ; + card =fw_parent_device (r->unit)->card; +mutex_lock (&r->mutex);if (r->allocated) {
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/alsa-firewire-fix-null-pointer-dereference-when-releasing-uninitialized-data-of-iso-resource.patch