First published: Mon Sep 06 2010(Updated: )
Description of problem: There is a bug in snd_seq_oss_open from sound/core/seq/oss/seq_oss_init.c. So here's the error path for some setup failure: _error: snd_seq_oss_writeq_delete(dp->writeq); snd_seq_oss_readq_delete(dp->readq); snd_seq_oss_synth_cleanup(dp); snd_seq_oss_midi_cleanup(dp); delete_port(dp); delete_seq_queue(dp->queue); kfree(dp); This looks okay, but actually, delete_port calls port_delete (eventually... this code is tough to follow) which does a free_devinfo on the owner struct seq_oss_devinfo, here (around ~269 in seq_ports.c): if (port->private_free) port->private_free(port->private_data); because of this (around ~334 in seq_oss_init.c): memset(&callback, 0, sizeof(callback)); callback.owner = THIS_MODULE; callback.private_data = dp; callback.event_input = snd_seq_oss_event_input; callback.private_free = free_devinfo; port.kernel = &callback; Which does this: static void free_devinfo(void *private) { struct seq_oss_devinfo *dp = (struct seq_oss_devinfo *)private; if (dp->timer) snd_seq_oss_timer_delete(dp->timer); if (dp->writeq) snd_seq_oss_writeq_delete(dp->writeq); if (dp->readq) snd_seq_oss_readq_delete(dp->readq); kfree(dp); } So..... delete_port(dp); delete_seq_queue(dp->queue); <= Oops, dereferencing released pointer. kfree(dp); <= Oops, double free. Acknowledgements: Red Hat would like to thank Tavis Ormandy for reporting this issue.
Credit: secalert@redhat.com secalert@redhat.com
Affected Software | Affected Version | How to fix |
---|---|---|
debian/linux-2.6 | ||
Linux Kernel | <2.6.36 | |
Linux Kernel | =2.6.36 | |
Linux Kernel | =2.6.36-rc1 | |
Linux Kernel | =2.6.36-rc2 | |
Linux Kernel | =2.6.36-rc3 | |
openSUSE | =11.1 | |
SUSE Linux Enterprise Desktop with Beagle | =11-sp1 | |
SUSE Linux Enterprise Real Time Extension | =11-sp1 | |
SUSE Linux Enterprise Server | =11-sp1 | |
Ubuntu Linux | =6.06 | |
Ubuntu Linux | =8.04 | |
Ubuntu Linux | =9.04 | |
Ubuntu Linux | =9.10 | |
Ubuntu Linux | =10.04 | |
Ubuntu Linux | =10.10 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.