OSDN Git Service

ALSA: seq/oss - Fix double-free at error path of snd_seq_oss_open()
authorTakashi Iwai <tiwai@suse.de>
Mon, 6 Sep 2010 07:13:45 +0000 (09:13 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Sep 2010 20:36:26 +0000 (13:36 -0700)
commit7ab99e2ebb57576e1e853e9de18f242558196f6f
tree9ac50e177da7c1cea8f699fc7578e9fbcedb40e5
parent0aa2a836bdf2314b452a7c08a614d5b55029a93c
ALSA: seq/oss - Fix double-free at error path of snd_seq_oss_open()

commit 27f7ad53829f79e799a253285318bff79ece15bd upstream.

The error handling in snd_seq_oss_open() has several bad codes that
do dereferecing released pointers and double-free of kmalloc'ed data.
The object dp is release in free_devinfo() that is called via
private_free callback.  The rest shouldn't touch this object any more.

The patch changes delete_port() to call kfree() in any case, and gets
rid of unnecessary calls of destructors in snd_seq_oss_open().

Fixes CVE-2010-3080.

Reported-and-tested-by: Tavis Ormandy <taviso@cmpxchg8b.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/core/seq/oss/seq_oss_init.c