All of lore.kernel.org
 help / color / mirror / Atom feed
From: "André Almeida" <andrealmeid@igalia.com>
To: Kuniyuki Iwashima <kuni1840@gmail.com>, christian@heusel.eu
Cc: davem@davemloft.net, difrost.kernel@gmail.com, dnaim@cachyos.org,
	edumazet@google.com, horms@kernel.org, kuba@kernel.org,
	kuniyu@amazon.com, linux-kernel@vger.kernel.org,
	mario.limonciello@amd.com, netdev@vger.kernel.org,
	pabeni@redhat.com, regressions@lists.linux.dev,
	Tvrtko Ursulin <tursulin@igalia.com>
Subject: Re: [REGRESSION] af_unix: Introduce SO_PASSRIGHTS - break OpenGL
Date: Wed, 11 Jun 2025 16:24:53 -0300	[thread overview]
Message-ID: <ee678dee-e003-41dc-86fe-c35c18a6171d@igalia.com> (raw)
In-Reply-To: <20250611164339.2828069-1-kuni1840@gmail.com>

Hi Kuniyuki,

Em 11/06/2025 13:42, Kuniyuki Iwashima escreveu:
> From: Christian Heusel <christian@heusel.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é

  parent reply	other threads:[~2025-06-11 19:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-10 19:22 [REGRESSION] af_unix: Introduce SO_PASSRIGHTS - break OpenGL Jacek Łuczak
2025-06-11 11:46 ` Christian Heusel
2025-06-11 16:42   ` Kuniyuki Iwashima
2025-06-11 17:10     ` Christian Heusel
2025-06-11 19:24     ` André Almeida [this message]
2025-06-18  7:30     ` Matthew Schwartz
2025-09-16 22:16     ` brian.scott.sampson
2025-09-17  1:33       ` Kuniyuki Iwashima
2025-09-17 14:40         ` brian.scott.sampson
2025-09-17 18:42           ` Kuniyuki Iwashima
2025-09-17 20:25             ` brian.scott.sampson
2025-09-20  3:50               ` Kuniyuki Iwashima
2025-09-20 22:28                 ` brian.scott.sampson
2025-11-09 16:07                   ` brian.scott.sampson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ee678dee-e003-41dc-86fe-c35c18a6171d@igalia.com \
    --to=andrealmeid@igalia.com \
    --cc=christian@heusel.eu \
    --cc=davem@davemloft.net \
    --cc=difrost.kernel@gmail.com \
    --cc=dnaim@cachyos.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuni1840@gmail.com \
    --cc=kuniyu@amazon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=regressions@lists.linux.dev \
    --cc=tursulin@igalia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.