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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ee678dee-e003-41dc-86fe-c35c18a6171d@igalia.com>
Date: Wed, 11 Jun 2025 16:24:53 -0300
From: André Almeida <andrealmeid@...lia.com>
To: Kuniyuki Iwashima <kuni1840@...il.com>, christian@...sel.eu
Cc: davem@...emloft.net, difrost.kernel@...il.com, dnaim@...hyos.org,
 edumazet@...gle.com, horms@...nel.org, kuba@...nel.org, kuniyu@...zon.com,
 linux-kernel@...r.kernel.org, mario.limonciello@....com,
 netdev@...r.kernel.org, pabeni@...hat.com, regressions@...ts.linux.dev,
 Tvrtko Ursulin <tursulin@...lia.com>
Subject: Re: [REGRESSION] af_unix: Introduce SO_PASSRIGHTS - break OpenGL

Hi Kuniyuki,

Em 11/06/2025 13:42, Kuniyuki Iwashima escreveu:
> From: Christian Heusel <christian@...sel.eu>
> Date: Wed, 11 Jun 2025 13:46:01 +0200
>> On 25/06/10 09:22PM, Jacek Łuczak wrote:

[...]

>>> Reverting entire SO_PASSRIGHTS fixes the issue.
> 
> Thanks for the report.
> 
> Could you test the diff below ?
> 
> look like some programs start listen()ing before setting
> SO_PASSCRED or SO_PASSPIDFD and there's a small race window.
> 
> ---8<---
> diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
> index fd6b5e17f6c4..87439d7f965d 100644
> --- a/net/unix/af_unix.c
> +++ b/net/unix/af_unix.c
> @@ -1971,7 +1971,8 @@ static void unix_maybe_add_creds(struct sk_buff *skb, const struct sock *sk,
>   	if (UNIXCB(skb).pid)
>   		return;
>   
> -	if (unix_may_passcred(sk) || unix_may_passcred(other)) {
> +	if (unix_may_passcred(sk) || unix_may_passcred(other) ||
> +	    !other->sk_socket) {
>   		UNIXCB(skb).pid = get_pid(task_tgid(current));
>   		current_uid_gid(&UNIXCB(skb).uid, &UNIXCB(skb).gid);
>   	}
> ---8<---
> 

I confirm that this fixes 6.16-rc1 for me as well. Whenever you send the 
proper patch please CC me so I can give a Tested-by tag.

Thanks!
	André

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ