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] [day] [month] [year] [list]
Message-ID: <a2b41bc9-72f5-40f1-ac44-d2c495fb3dd4@os.amperecomputing.com>
Date: Wed, 27 Nov 2024 15:26:16 +0800
From: Adam Li <adamli@...amperecomputing.com>
To: 20241125021222.356881-2-adamli@...amperecomputing.com,
 peterz@...radead.org, mingo@...hat.com, juri.lelli@...hat.com,
 vincent.guittot@...aro.org, Madadi Vineeth Reddy <vineethr@...ux.ibm.com>
Cc: 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,
 Madadi Vineeth Reddy <vineethr@...ux.ibm.com>
Subject: Re: [PATCH 1/2] sched/fair: Fix panic if NEXT_BUDDY enabled

On 11/25/2024 6:16 PM, Madadi Vineeth Reddy wrote:
> On 25/11/24 07:42, Adam Li wrote:
>> Enabling NEXT_BUDDY may trigger warning and kernel panic:
> 
> IIUC, this happens due to a race condition between choosing the next_buddy and
> dequeuing the task from the runqueue as soon as its lag becomes zero, thereby causing
> task_of(se) to result in a null dereference in pick_task_fair?
> 
> Correct me if I am wrong.
> 
pick_eevdf() may return NULL, which triggers this NULL pointer dereference
at pick_next_entity():
	struct sched_entity *se = pick_eevdf(cfs_rq);
	if (se->sched_delayed)

Enabling NEXT_BUDDY is more likely to trigger this panic.

I added another patch to check return value of pick_eevdf() in v2:
https://lore.kernel.org/all/20241127055610.7076-1-adamli@os.amperecomputing.com/

Thanks for review.
-adam

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ