Race condition when using ControlMaster=auto with simultaneous connections (added Bug 3971 and a patch; requesting review)
Jens Rosenboom
Jens.Rosenboom at web.de
Sat Aug 22 01:30:18 AEST 2026
Hello Damien,
FYI, attachment #3981 adds a test for the race condition.
Your comment on the patch was:
> The current behaviour of attempting to connect to the mux socket
first is there to detect stale control sockets. I don't see how this
would work with your patch.
So I added a test about "good handling of a stale control socket" (part
of attachment 3982, which also includes the fix) and I don't see any
issue there.
I improved the patch a bit (regarding "-O" commands) and Baptiste
successfully tested it.
Would be great if you could take a look again and give your feedback.
Thank you & Best regards,
Jens
Am 21.06.26 um 22:17 schrieb Jens Rosenboom via openssh-unix-dev:
> Hello OpenSSH developers,
> (hello Baptiste Jonglez)
>
> I opened*Bug 3971**(*
> <https://bugzilla.mindrot.org/show_bug.cgi?id=3971>Race condition when
> using ControlMaster=auto with simultaneous connections)
> <https://bugzilla.mindrot.org/show_bug.cgi?id=3971>: There is a (kind
> of harmless) race condition in the connection multiplexing code when
> multiple connections to a new host happen at the same time.
> The connections end up not using connection multiplexing at all.
> Baptiste Jonglez initially reported this issue (back in 2022, on Wed
> Aug 31 23:24:12 AEST, see ongroups.google.com), but there wasn't much
> response to it.
>
> It would be great if anyone could give feedback on the patch, or maybe
> even apply it upstream.
> Thank you & Best regards,
> Jens Rosenboom
>
> _______________________________________________
> openssh-unix-dev mailing list
> openssh-unix-dev at mindrot.org
> https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
More information about the openssh-unix-dev
mailing list