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: <20241129091833.GC15382@noisy.programming.kicks-ass.net>
Date: Fri, 29 Nov 2024 10:18:33 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Adam Li <adamli@...amperecomputing.com>
Cc: mingo@...hat.com, juri.lelli@...hat.com, vincent.guittot@...aro.org,
	dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
	mgorman@...e.de, vschneid@...hat.com, linux-kernel@...r.kernel.org,
	patches@...erecomputing.com, cl@...ux.com, christian.loehle@....com,
	vineethr@...ux.ibm.com
Subject: Re: [PATCH v2 2/3] sched/fair: Fix panic if pick_eevdf() returns NULL

On Wed, Nov 27, 2024 at 05:56:09AM +0000, Adam Li wrote:
> pick_eevdf() may return NULL, which triggers NULL pointer
> dereference at pick_next_entity():
> 	struct sched_entity *se = pick_eevdf(cfs_rq);
> 	if (se->sched_delayed)
> 
>     [  297.371198] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000051
>     [  297.406112] CPU: 116 UID: 0 PID: 10328 Comm: Grizzly-worker( Tainted: G        W   E      6.12.0.adam+ #1
>     [  297.597362] Call trace:
>     [  297.599795]  pick_task_fair+0x50/0x150 (P)
>     [  297.603879]  pick_task_fair+0x50/0x150 (L)
>     [  297.607963]  pick_next_task_fair+0x30/0x3c0
>     [  297.612134]  __pick_next_task+0x4c/0x220
>     [  297.616045]  pick_next_task+0x44/0x980

Well, if you look at pick_task_fair() you'll see we'll not get there
unless cfs_rq->nr_running is non-zero, at which point pick_eevdf()
really should NOT be returning NULL.

If it does, something else is broken.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ