lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 4 May 2015 12:32:56 -0700
From:	Stephane Eranian <eranian@...gle.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Vince Weaver <vincent.weaver@...ne.edu>,
	LKML <linux-kernel@...r.kernel.org>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Jiri Olsa <jolsa@...hat.com>, Ingo Molnar <mingo@...hat.com>,
	Paul Mackerras <paulus@...ba.org>
Subject: Re: perf: fuzzer triggers NULL pointer derefreence in x86_schedule_events

On Fri, May 1, 2015 at 5:59 AM, Peter Zijlstra <peterz@...radead.org> wrote:
>
> On Thu, Apr 30, 2015 at 03:08:56PM -0400, Vince Weaver wrote:
> >
> > So the perf_fuzzer caught this after about a week of fuzzing on a Haswell
> > machine running a recent git kernel (pre 4.1-rc1 though).
> >
> > We've seen this BUG before and various fixes were applied but apparently
> > it wasn't enough.
> >
> > Sadly it doesn't seem to be reproducible.
> >
> > validate_group() -> x86_pmu.schedule_events() -> ???? -> variable_test_bit()
> >  (hard to tell which test bit with all the inlining going on).
>
> Assuming you build with debug info addr2line -i can help, but I think I
> found it by comparing the Code section below with my objdump -D output.
>
> Its:
>                 /* constraint still honored */
>                 if (!test_bit(hwc->idx, c->idxmsk))
>                         break;
>
> Which would seem to suggest c is NULL.
>
But then, you'd crash in the previous loop, because after
get_event_contraint(), you touch
c->weight. I think it is more likely related to the bitmask (idxmsk).
But then it is always
allocated with the constraint even with the HT bug workaround.  So
most, likely the index
is bogus and you touch outside the idxmsk[] array.


>
> Lemme go figure out how that could happen.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ