Revert "af_unix: Call scm_recv() only after scm_set_cred()."
Subsystems (3)
PATCH 1/1 Revert "af_unix: Call scm_recv() only after scm_set_cred()."
This reverts commit 3f5f118bb657f94641ea383c7c1b8c09a5d46ea2.
Konrad reported that desktop environment below cannot be reached after commit 3f5f118bb657 ("af_unix: Call scm_recv() only after scm_set_cred().")
- postmarketOS (Alpine Linux w/ musl 1.2.4)
- busybox 1.36.1
- GNOME 44.1
- networkmanager 1.42.6
- openrc 0.47
Regarding to the warning of SO_PASSPIDFD, I'll post another patch to suppress it by skipping SCM_PIDFD if scm->pid == NULL in scm_pidfd_recv().
---
To maintainers
Sorry for bothering, but can this make it to the v6.5 train to avoid regression reports ?
--- net/unix/af_unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/unix/af_unix.c +1 -1
@@ -2807,7 +2807,7 @@ static int unix_stream_read_generic(struct unix_stream_read_state *state, }while (size);mutex_unlock (&u->iolock); -if (state->msg && check_creds) +if (state->msg)scm_recv (sock, state->msg, &scm, flags);else scm_destroy (&scm);
Signature · 1 line
2.30.2
Quoted 11 lines · Kuniyuki Iwashima
This reverts commit
3f5f118bb657f94641ea383c7c1b8c09a5d46ea2.Konrad reported that desktop environment below cannot be reached after commit
3f5f118bb657("af_unix: Callscm_recv()only afterscm_set_cred().")- postmarketOS (Alpine Linux w/ musl 1.2.4)
- busybox 1.36.1
- GNOME 44.1
- networkmanager 1.42.6
- openrc 0.47
Quoted 6 lines
Regarding to the warning of
SO_PASSPIDFD, I'll post another patch to suppress it by skippingSCM_PIDFDifscm->pid== NULL inscm_pidfd_recv().Reported-by Konrad Dybcio <[email protected]>Signed-off-by Kuniyuki Iwashima <[email protected]>
Quoted 11 lines · Kuniyuki Iwashima
This reverts commit
3f5f118bb657f94641ea383c7c1b8c09a5d46ea2.Konrad reported that desktop environment below cannot be reached after commit
3f5f118bb657("af_unix: Callscm_recv()only afterscm_set_cred().")- postmarketOS (Alpine Linux w/ musl 1.2.4)
- busybox 1.36.1
- GNOME 44.1
- networkmanager 1.42.6
- openrc 0.47
Quoted 6 lines
Regarding to the warning of
SO_PASSPIDFD, I'll post another patch to suppress it by skippingSCM_PIDFDifscm->pid== NULL inscm_pidfd_recv().Reported-by Konrad Dybcio <[email protected]>Signed-off-by Kuniyuki Iwashima <[email protected]>
hit the same issue, this revert fixes it for me, fwiw:
thanks,
jirka
Quoted 25 lines
---
To maintainersSorry for bothering, but can this make it to the v6.5 train to avoid regression reports ?
--- net/unix/af_unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/unix/af_unix.c +1
-1@@ -2807,7 +2807,7 @@ static int unix_stream_read_generic(struct unix_stream_read_state *state, }while (size);mutex_unlock (&u->iolock); -if (state->msg && check_creds) +if (state->msg)scm_recv (sock, state->msg, &scm, flags);else scm_destroy (&scm);Signature · 1 line
2.30.2
Quoted 11 lines · Kuniyuki Iwashima
This reverts commit
3f5f118bb657f94641ea383c7c1b8c09a5d46ea2.Konrad reported that desktop environment below cannot be reached after commit
3f5f118bb657("af_unix: Callscm_recv()only afterscm_set_cred().")- postmarketOS (Alpine Linux w/ musl 1.2.4)
- busybox 1.36.1
- GNOME 44.1
- networkmanager 1.42.6
- openrc 0.47
Quoted 6 lines
Regarding to the warning of
SO_PASSPIDFD, I'll post another patch to suppress it by skippingSCM_PIDFDifscm->pid== NULL inscm_pidfd_recv().Reported-by Konrad Dybcio <[email protected]>Signed-off-by Kuniyuki Iwashima <[email protected]>
Encountered the same issue.
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 5 lines · On Mon, 26 Jun 2023 13:58:37 -0700 you wrote:
This reverts commit
3f5f118bb657f94641ea383c7c1b8c09a5d46ea2.Konrad reported that desktop environment below cannot be reached after commit
3f5f118bb657("af_unix: Callscm_recv()only afterscm_set_cred().")
Quoted 7 lines
- postmarketOS (Alpine Linux w/ musl 1.2.4)
- busybox 1.36.1
- GNOME 44.1
- networkmanager 1.42.6
- openrc 0.47[...]
Here is the summary with links:
- [v1,net-next] Revert "af_unix: Call scm_recv() only after scm_set_cred()."
https://git.kernel.org/netdev/net-next/c/9d797ee2dce1
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Jakub Kicinski
maintainerQuoted 5 lines · On Mon, 26 Jun 2023 13:58:37 -0700 Kuniyuki Iwashima wrote:
Regarding to the warning of
SO_PASSPIDFD, I'll post another patch to suppress it by skippingSCM_PIDFDifscm->pid== NULL inscm_pidfd_recv().Sorry for bothering, but can this make it to the v6.5 train to avoid regression reports ?
I'm merging the trees now, could you send the follow up soon? Could you respin Alexander's fix for me as well (make it a two patch series?):
https://lore.kernel.org/all/[email protected]/
It trivially conflicts after applying this patch.
From: Jakub Kicinski <[email protected]>
Date: Tue, 27 Jun 2023 09:42:45 -0700
Quoted 12 lines · On Mon, 26 Jun 2023 13:58:37 -0700 Kuniyuki Iwashima wrote:
Quoted 5 lines
Regarding to the warning of
SO_PASSPIDFD, I'll post another patch to suppress it by skippingSCM_PIDFDifscm->pid== NULL inscm_pidfd_recv().Sorry for bothering, but can this make it to the v6.5 train to avoid regression reports ?
I'm merging the trees now, could you send the follow up soon? Could you respin Alexander's fix for me as well (make it a two patch series?):
https://lore.kernel.org/all/[email protected]/
It trivially conflicts after applying this patch.
I see. I'll post 2 patches soon.
Thank you, Jakub!