[Bug 3454] New: client dies with exit code 141 (SIGPIPE) when ControlMaster times out during mux_client_hello_exchange()

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Thu Jun 30 04:01:23 AEST 2022


https://bugzilla.mindrot.org/show_bug.cgi?id=3454

            Bug ID: 3454
           Summary: client dies with exit code 141 (SIGPIPE) when
                    ControlMaster times out during
                    mux_client_hello_exchange()
           Product: Portable OpenSSH
           Version: 8.9p1
          Hardware: amd64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: ssh
          Assignee: unassigned-bugs at mindrot.org
          Reporter: noamlewis+openssh-bugzilla at google.com

If the client tries to start talking to a ControlMaster just as it's
exiting (due to ControlPersist timeout), it will fail with exit code
141 (SIGPIPE).

To reproduce:

( while true; do \
  sleep 0.5 ; \
  gdb -ex r -ex q --args \
    ssh -o ControlMaster=auto \
        -o ControlPath=~/.ssh/elsa-ctrl-%C \
        -o ControlPersist=1 127.0.0.1 -- touch /tmp/thingy ; \
  done )


(You might need to fiddle with the sleep time)

Program received signal SIGPIPE, Broken pipe.
0x00007ffff7b38f33 in __GI___libc_write (fd=fd at entry=3,
buf=buf at entry=0x55555565e060, nbytes=nbytes at entry=12) at
../sysdeps/unix/sysv/linux/write.c:26

(gdb) bt
#0  0x00007ffff7b38f33 in __GI___libc_write (fd=fd at entry=3,
buf=buf at entry=0x55555565e060, nbytes=nbytes at entry=12) at
../sysdeps/unix/sysv/linux/write.c:26
#1  0x0000555555583380 in mux_client_write_packet (fd=fd at entry=3,
m=m at entry=0x55555565deb0) at ../../mux.c:1513
#2  0x0000555555585944 in mux_client_hello_exchange (fd=3) at
../../mux.c:1589
#3  muxclient (path=0x55555565ba60
"/home/noamlewis/.ssh/elsa-ctrl-cfbf228b3cff12162e33cbe54c12340af8f78155")
at ../../mux.c:2297
#4  0x0000555555561882 in main (ac=<optimized out>, av=<optimized out>)
at ../../ssh.c:1526


Reproduces also with older clients (8.4)

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list