CVE-2010-3080: Double Free
Description of problem: There is a bug in sndseqossopen from sound/core/seq/oss/seqossinit.c. So here's the error path for some setup failure:
error: sndseqosswriteqdelete(dp->writeq); sndseqossreadqdelete(dp->readq); sndseqosssynthcleanup(dp); sndseqossmidicleanup(dp); deleteport(dp); deleteseqqueue(dp->queue); kfree(dp);
This looks okay, but actually, deleteport calls portdelete (eventually... this code is tough to follow) which does a freedevinfo on the owner struct seqossdevinfo, here (around ~269 in seqports.c):
if (port->privatefree) port->privatefree(port->privatedata);
because of this (around ~334 in seqossinit.c):
memset(&callback, 0, sizeof(callback)); callback.owner = THISMODULE; callback.privatedata = dp; callback.eventinput = sndseqosseventinput; callback.privatefree = freedevinfo; port.kernel = &callback;
Which does this:
static void freedevinfo(void private) { struct seqossdevinfo dp = (struct seqossdevinfo )private;
if (dp->timer) sndseqosstimerdelete(dp->timer); if (dp->writeq) sndseqosswriteqdelete(dp->writeq);
if (dp->readq) sndseqossreadqdelete(dp->readq); kfree(dp); }
So.....
deleteport(dp); deleteseqqueue(dp->queue); <= Oops, dereferencing released pointer. kfree(dp); <= Oops, double free.
Acknowledgements:
Red Hat would like to thank Tavis Ormandy for reporting this issue.
Other sources
Double free vulnerability in the sndseqossopen function in sound/core/seq/oss/seqossinit.c in the Linux kernel before 2.6.36-rc4 might allow local users to cause a denial of service or possibly have unspecified other impact via an unsuccessful attempt to open the /dev/sequencer device.
— Launchpad
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2010-3080?
CVE-2010-3080 is considered to have a moderate severity level.
How do I fix CVE-2010-3080?
To fix CVE-2010-3080, upgrade to a version of the Linux kernel that is higher than 2.6.36.
What systems are affected by CVE-2010-3080?
CVE-2010-3080 affects Linux kernel versions up to 2.6.36 and various distributions including Debian, openSUSE, and Ubuntu.
What type of vulnerability is CVE-2010-3080?
CVE-2010-3080 is a bug in the snd_seq_oss_open function within the sound subsystem of the Linux kernel.
Can CVE-2010-3080 lead to system compromise?
Yes, CVE-2010-3080 can potentially lead to denial of service or other issues due to improper error handling.