From: Takashi Iwai <tiwai@suse.de>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: Jaroslav Kysela <perex@perex.cz>,
alsa-devel@alsa-project.org, LKML <linux-kernel@vger.kernel.org>,
Sasha Levin <sasha.levin@oracle.com>,
Alexander Potapenko <glider@google.com>,
Kostya Serebryany <kcc@google.com>,
syzkaller <syzkaller@googlegroups.com>
Subject: Re: sound: use-after-free in hrtimer_cancel
Date: Fri, 24 Jun 2016 16:35:42 +0200 [thread overview]
Message-ID: <s5hmvmaslhd.wl-tiwai@suse.de> (raw)
In-Reply-To: <CACT4Y+a+-se6BG3pgDRmhqT4bUFDWU=NEJpizSvN4azCQEtyoQ@mail.gmail.com>
On Fri, 24 Jun 2016 15:48:53 +0200,
Dmitry Vyukov wrote:
>
> On Fri, Jun 24, 2016 at 3:33 PM, Takashi Iwai <tiwai@suse.de> wrote:
> > On Tue, 21 Jun 2016 19:41:28 +0200,
> > Dmitry Vyukov wrote:
> >>
> >> On Mon, Jun 6, 2016 at 6:39 PM, Takashi Iwai <tiwai@suse.de> wrote:
> >> > On Mon, 06 Jun 2016 18:29:25 +0200,
> >> > Dmitry Vyukov wrote:
> >> >>
> >> >> On Mon, Jun 6, 2016 at 4:11 PM, Takashi Iwai <tiwai@suse.de> wrote:
> >> >> > 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?
> >> >>
> >> >> I use a VM with 4 cores and use 20 parallel test processes.
> >> >>
> >> >> > 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?
> >> >>
> >> >>
> >> >> I think poll with timeout is related. It is poll who sets hrtimer, right?
> >> >
> >> > If it's about snd-dummy driver, hrtimer is created at open, and
> >> > started/stopped at PCM trigger, and removed at close.
> >> >
> >> > Is there any good way to decode which syscalls are executed in the
> >> > test code?
> >>
> >> What do you mean?
> >> Here are the syscalls in the program:
> >>
> >> r[2] = syscall(SYS_open, "/dev/audio", 0xa40ul, 0, 0, 0);
> >> // r[2] is in the descriptor passed to SYS_poll
> >> r[15] = syscall(SYS_poll, 0x2001dde8ul, 0x4ul, 0x8ul, 0, 0, 0);
> >> r[18] = syscall(SYS_readv, r[2], 0x20dc13c0ul, 0x1ul, 0, 0, 0);
> >> r[19] = syscall(SYS_read, r[2], 0x20dbefe0ul, 0x20ul, 0, 0, 0);
> >
> > I meant some nice way to decode these magic numbers to be more
> > understandable :)
>
> Short term, run it under strace. It should show file names, decode
> most of flags and structs.
Alright, thanks.
Takashi
next prev parent reply other threads:[~2016-06-24 14:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-04 18:00 Dmitry Vyukov
2016-06-04 18:27 ` Dmitry Vyukov
2016-06-06 14:11 ` Takashi Iwai
2016-06-06 16:29 ` Dmitry Vyukov
2016-06-06 16:39 ` Takashi Iwai
2016-06-21 17:41 ` Dmitry Vyukov
2016-06-24 13:33 ` Takashi Iwai
2016-06-24 13:48 ` Dmitry Vyukov
2016-06-24 14:35 ` Takashi Iwai [this message]
2016-06-21 18:26 ` Dmitry Vyukov
2016-06-24 13:32 ` Takashi Iwai
2016-06-24 13:33 ` Dmitry Vyukov
2016-06-24 14:37 ` 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=s5hmvmaslhd.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kcc@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=sasha.levin@oracle.com \
--cc=syzkaller@googlegroups.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®