All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Vladis Dronov <vdronov@redhat.com>
Cc: Jaroslav Kysela <perex@perex.cz>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	linux-sound@vger.kernel.org
Subject: Re: [PATCH] ALSA: usb-audio: Fix double-free in snd_usb_add_audio_stream()
Date: Thu, 31 Mar 2016 18:13:26 +0200	[thread overview]
Message-ID: <s5hpouad3rt.wl-tiwai@suse.de> (raw)
In-Reply-To: <2105584083.43718399.1459440343149.JavaMail.zimbra@redhat.com>

On Thu, 31 Mar 2016 18:05:43 +0200,
Vladis Dronov wrote:
> 
> From: Vladis Dronov <vdronov@redhat.com>
> Subject: [PATCH] ALSA: usb-audio: Fix double-free in error paths after snd_usb_add_audio_stream() call
> 
> create_fixed_stream_quirk(), snd_usb_parse_audio_interface() and
> create_uaxx_quirk() functions allocate the audioformat object by themselves
> and free it upon error before returning. However, once the object is linked
> to a stream, it's freed again in snd_usb_audio_pcm_free(), thus it'll be
> double-freed, eventually resulting in a memory corruption.
> 
> This patch fixes these failures in the error paths by unlinking the audioformat
> object before freeing it.
> 
> Based on a patch by Takashi Iwai" <tiwai@suse.de>
> 
> [Note for stable backports:
>  this patch requires the commit 902eb7fd1e4a ('ALSA: usb-audio: Minor
>  code cleanup in create_fixed_stream_quirk()')]
> 
> Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1283358
> Reported-by: Ralf Spenneberg <ralf@spenneberg.net>
> Cc: <stable@vger.kernel.org> # see the note above
> Signed-off-by: Vladis Dronov <vdronov@redhat.com>

Applied, thanks.


Takashi

WARNING: multiple messages have this Message-ID (diff)
From: Takashi Iwai <tiwai@suse.de>
To: Vladis Dronov <vdronov@redhat.com>
Cc: Jaroslav Kysela <perex@perex.cz>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	linux-sound@vger.kernel.org
Subject: Re: [PATCH] ALSA: usb-audio: Fix double-free in snd_usb_add_audio_stream()
Date: Thu, 31 Mar 2016 16:13:26 +0000	[thread overview]
Message-ID: <s5hpouad3rt.wl-tiwai@suse.de> (raw)
In-Reply-To: <2105584083.43718399.1459440343149.JavaMail.zimbra@redhat.com>

On Thu, 31 Mar 2016 18:05:43 +0200,
Vladis Dronov wrote:
> 
> From: Vladis Dronov <vdronov@redhat.com>
> Subject: [PATCH] ALSA: usb-audio: Fix double-free in error paths after snd_usb_add_audio_stream() call
> 
> create_fixed_stream_quirk(), snd_usb_parse_audio_interface() and
> create_uaxx_quirk() functions allocate the audioformat object by themselves
> and free it upon error before returning. However, once the object is linked
> to a stream, it's freed again in snd_usb_audio_pcm_free(), thus it'll be
> double-freed, eventually resulting in a memory corruption.
> 
> This patch fixes these failures in the error paths by unlinking the audioformat
> object before freeing it.
> 
> Based on a patch by Takashi Iwai" <tiwai@suse.de>
> 
> [Note for stable backports:
>  this patch requires the commit 902eb7fd1e4a ('ALSA: usb-audio: Minor
>  code cleanup in create_fixed_stream_quirk()')]
> 
> Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id\x1283358
> Reported-by: Ralf Spenneberg <ralf@spenneberg.net>
> Cc: <stable@vger.kernel.org> # see the note above
> Signed-off-by: Vladis Dronov <vdronov@redhat.com>

Applied, thanks.


Takashi

  reply	other threads:[~2016-03-31 16:13 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-30 19:03 [PATCH] ALSA: usb-audio: Fix double-free in snd_usb_add_audio_stream() Vladis Dronov
2016-03-30 19:03 ` Vladis Dronov
2016-03-30 19:03 ` Vladis Dronov
2016-03-30 19:03   ` Vladis Dronov
2016-03-30 19:38   ` kbuild test robot
2016-03-30 19:38     ` kbuild test robot
2016-03-30 19:38     ` kbuild test robot
2016-03-30 20:31   ` Takashi Iwai
2016-03-30 20:31     ` Takashi Iwai
2016-03-30 20:31     ` Takashi Iwai
2016-03-31  9:50     ` Takashi Iwai
2016-03-31  9:50       ` Takashi Iwai
2016-03-31  9:50       ` Takashi Iwai
2016-03-31 12:36       ` Vladis Dronov
2016-03-31 12:36         ` Vladis Dronov
2016-03-31 12:57         ` Takashi Iwai
2016-03-31 12:57           ` Takashi Iwai
2016-03-31 14:03           ` Vladis Dronov
2016-03-31 14:03             ` Vladis Dronov
2016-03-31 14:20             ` Takashi Iwai
2016-03-31 14:20               ` Takashi Iwai
2016-03-31 16:05               ` Vladis Dronov
2016-03-31 16:05                 ` Vladis Dronov
2016-03-31 16:13                 ` Takashi Iwai [this message]
2016-03-31 16:13                   ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hpouad3rt.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=vdronov@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.