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]
Message-ID: <20150520131525.GG18673@twins.programming.kicks-ass.net>
Date:	Wed, 20 May 2015 15:15:25 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Vince Weaver <vincent.weaver@...ne.edu>
Cc:	Stephane Eranian <eranian@...gle.com>,
	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 Wed, May 20, 2015 at 03:03:12PM +0200, Peter Zijlstra wrote:
> So new in this release is:
> 
> static void intel_put_event_constraints(struct cpu_hw_events *cpuc,
> 					struct perf_event *event)
> {
> 	...
> 
> 	/* cleanup dynamic constraint */
> 	if (c && (c->flags & PERF_X86_EVENT_DYNAMIC))
> 		event->hw.constraint = NULL;
> }
> 
> Which is the only place that value is ever cleared...
> 
> Now, I've not quite figured out how that can intersect with scheduling,
> typically we only call put_event_constraints() when we're done with the
> event.

Related to that; intel_commit_scheduling() has:

  c = event->hw.constraint;

  if (!c)
  	return;

Stephane, how can that ever be?

	x86_schedule_events() does:
		hwc->constraint = get_event_constraints()

for all events, and intel_get_event_constraints() will _always_ return a
valid constraint -- &unconstrained if nothing else.


--
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