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: <2dcffe42-141b-40fc-9bc1-b61a1ed7d74f@redhat.com>
Date: Wed, 24 Sep 2025 14:29:00 +0200
From: David Hildenbrand <david@...hat.com>
To: Edward Adam Davis <eadavis@...com>, kees@...nel.org
Cc: mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
 vincent.guittot@...aro.org, dietmar.eggemann@....com, rostedt@...dmis.org,
 bsegall@...gle.com, mgorman@...e.de, vschneid@...hat.com,
 akpm@...ux-foundation.org, lorenzo.stoakes@...cle.com,
 Liam.Howlett@...cle.com, vbabka@...e.cz, rppt@...nel.org, surenb@...gle.com,
 mhocko@...e.com, linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH Next] copy_process(): Fixed jump logic error

On 24.09.25 14:06, Edward Adam Davis wrote:
> After futex_hash_allocate_default() fails, the logic should jump to
> bad_fork_cancel_cgroup, not bad_fork_core_free.
> 
> Jumping to bad_fork_core_free would cause a siglock imbalance.
> 
> Signed-off-by: Edward Adam Davis <eadavis@...com>

If it's still only in -next (which I assume when looking at the Next 
tag), into which patch should this fixup get squashed?

Or is this already upstream and we want actually Fixes: and CC stable?

(staring at current master, this seems to be an upstream problem?)

> ---
>   kernel/fork.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/fork.c b/kernel/fork.c
> index e9a7fb5c3e49..a0b8eeeb1d27 100644
> --- a/kernel/fork.c
> +++ b/kernel/fork.c
> @@ -2349,7 +2349,7 @@ __latent_entropy struct task_struct *copy_process(
>   	if (need_futex_hash_allocate_default(clone_flags)) {
>   		retval = futex_hash_allocate_default();
>   		if (retval)
> -			goto bad_fork_core_free;
> +			goto bad_fork_cancel_cgroup;
>   		/*
>   		 * If we fail beyond this point we don't free the allocated
>   		 * futex hash map. We assume that another thread will be created

Makes me wonder whether we would have to undo anything the 
sched_cgroup_fork() did, or if that cleanup is implied in 
bad_fork_cancel_cgroup. Without digging too deep into the code, I assume 
the latter.

-- 
Cheers

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ