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: <525f88ba-b082-4744-b54a-a23a264fb8a3@efficios.com>
Date: Mon, 20 Jan 2025 11:49:14 -0500
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH for sched/core] rseq: Fix rseq unregistration

On 2025-01-16 15:59, Mathieu Desnoyers wrote:
> A logic inversion in rseq_reset_rseq_cpu_node_id() causes the rseq
> unregistration to fail when rseq_validate_ro_fields() succeeds rather
> than the opposite.
> 
> This affects both CONFIG_DEBUG_RSEQ=y and CONFIG_DEBUG_RSEQ=n.
> 
> Fixes: 7d5265ffcd8b ("rseq: Validate read-only fields under DEBUG_RSEQ config")
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
> Cc: Peter Zijlstra (Intel) <peterz@...radead.org>

Ingo, Peter, this fix should have been part of the PR sent to Linus
earlier today [1]. Otherwise rseq unregistration is broken.

Thanks,

Mathieu

[1] https://lore.kernel.org/lkml/Z44ufdYZWaM50kxF@gmail.com/


> ---
>   kernel/rseq.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/rseq.c b/kernel/rseq.c
> index e04bb30a2eb8..442aba29bc4c 100644
> --- a/kernel/rseq.c
> +++ b/kernel/rseq.c
> @@ -201,7 +201,7 @@ static int rseq_reset_rseq_cpu_node_id(struct task_struct *t)
>   	/*
>   	 * Validate read-only rseq fields.
>   	 */
> -	if (!rseq_validate_ro_fields(t))
> +	if (rseq_validate_ro_fields(t))
>   		return -EFAULT;
>   	/*
>   	 * Reset cpu_id_start to its initial state (0).

-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ