Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1415094
| From | Takashi Iwai <tiwai@suse.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: sound: use-after-free in hrtimer_cancel |
| Date | 2016-06-06 16:20 +0200 |
| Message-ID | <rH3xM-62c-37@gated-at.bofh.it> (permalink) |
| References | <rGobf-4qy-13@gated-at.bofh.it> <rGouC-4wA-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sat, 04 Jun 2016 20:27:50 +0200,
Dmitry Vyukov wrote:
>
> On Sat, Jun 4, 2016 at 8:00 PM, Dmitry Vyukov <dvyukov@google.com> wrote:
> > Hello,
> >
> > The following program triggers use-after-free:
>
> Forget to mention that you need to run it in a tight parallel loop. It
> takes around 5 minutes to reproduce for me.
Hmm, this again is a bug that is difficult to trigger... At least, I
couldn't reproduce locally. How many processes are you running with
stress program?
It seems that there is nothing more than opening /dev/audio and does
some mmap in the job. Is there any other relevant thing there?
Also, this assumes that the first sound card is Dummy driver, right?
Check /proc/asound/cards.
If it's about snd-dummy driver, one blind shot would be a patch like
below. But even if it would fix, it doesn't explain why it's
triggered in that way...
thanks,
Takashi
---
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c
index c0f8f613f1f1..172dacd925f5 100644
--- a/sound/drivers/dummy.c
+++ b/sound/drivers/dummy.c
@@ -420,6 +420,7 @@ static int dummy_hrtimer_stop(struct snd_pcm_substream *substream)
static inline void dummy_hrtimer_sync(struct dummy_hrtimer_pcm *dpcm)
{
+ hrtimer_cancel(&dpcm->timer);
tasklet_kill(&dpcm->tasklet);
}
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
sound: use-after-free in hrtimer_cancel Dmitry Vyukov <dvyukov@google.com> - 2016-06-04 20:10 +0200
Re: sound: use-after-free in hrtimer_cancel Dmitry Vyukov <dvyukov@google.com> - 2016-06-04 20:30 +0200
Re: sound: use-after-free in hrtimer_cancel Takashi Iwai <tiwai@suse.de> - 2016-06-06 16:20 +0200
Re: sound: use-after-free in hrtimer_cancel Dmitry Vyukov <dvyukov@google.com> - 2016-06-06 18:30 +0200
Re: sound: use-after-free in hrtimer_cancel Takashi Iwai <tiwai@suse.de> - 2016-06-06 18:40 +0200
csiph-web