The kernel msg is just a sign of the program hitting an error
Doing $ ./mock-sshd --user=bug --port 1234 -v
attaching gdb
and then issuing the client cmd $ ssh -i test_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 1234 bug@localhost cat /etc/os-release
leads to this server segfault
Program received signal SIGSEGV, Segmentation fault. 0x000002aa02e02e84 in fd_data (fd=<error reading variable: Cannot access memory at address 0x3ffce57fe94>, revents=<error reading variable: Cannot access memory at address 0x3ffce57fe90>, user_data=<error reading variable: Cannot access memory at address 0x3ffce57fe88>) at mock-sshd.c:164 164 { (gdb) bt #0 0x000002aa02e02e84 in fd_data (fd=<error reading variable: Cannot access memory at address 0x3ffce57fe94>, revents=<error reading variable: Cannot access memory at address 0x3ffce57fe90>, user_data=<error reading variable: Cannot access memory at address 0x3ffce57fe88>) at mock-sshd.c:164 #1 0x000003ffa9b32128 in ssh_poll_ctx_dopoll (ctx=ctx@entry=0x2aa04d545a0, timeout=timeout@entry=-1) at /usr/src/libssh-0.10.5-2/src/poll.c:736 #2 0x000003ffa9b33732 in ssh_handle_packets (session=session@entry=0x2aa04d54ae0, timeout=timeout@entry=-1) at /usr/src/libssh-0.10.5-2/src/session.c:682 #3 0x000003ffa9b338e4 in ssh_handle_packets_termination (session=session@entry=0x2aa04d54ae0, timeout=<optimized out>, fct=fct@entry=0x3ffa9b33d30 <ssh_flush_termination>, user=user@entry=0x2aa04d54ae0) at /usr/src/libssh-0.10.5-2/src/session.c:751 #4 0x000003ffa9b33dc6 in ssh_blocking_flush (session=0x2aa04d54ae0, timeout=<optimized out>) at /usr/src/libssh-0.10.5-2/src/session.c:550 #5 0x000003ffa9b1a0dc in ssh_channel_flush (channel=0x2aa04db9bd0) at /usr/src/libssh-0.10.5-2/src/channels.c:1433 #6 ssh_channel_send_eof (channel=0x2aa04db9bd0) at /usr/src/libssh-0.10.5-2/src/channels.c:1316 ...
The kernel msg is just a sign of the program hitting an error
Doing
$ ./mock-sshd --user=bug --port 1234 -v
attaching gdb
and then issuing the client cmd ile=/dev/ null -o StrictHostKeyCh ecking= no -p 1234 bug@localhost cat /etc/os-release
$ ssh -i test_rsa -o UserKnownHostsF
leads to this server segfault
Program received signal SIGSEGV, Segmentation fault. data=<error reading variable: Cannot access memory at address 0x3ffce57fe88>) at mock-sshd.c:164 data=<error reading variable: Cannot access memory at address 0x3ffce57fe88>) at mock-sshd.c:164 entry=0x2aa04d5 45a0, timeout= timeout@ entry=- 1) libssh- 0.10.5- 2/src/poll. c:736 session@ entry=0x2aa04d5 4ae0, timeout= timeout@ entry=- 1) libssh- 0.10.5- 2/src/session. c:682 packets_ termination (session= session@ entry=0x2aa04d5 4ae0, timeout=<optimized out>, fct@entry= 0x3ffa9b33d30 <ssh_flush_ termination> , user=user@ entry=0x2aa04d5 4ae0) libssh- 0.10.5- 2/src/session. c:751 0x2aa04d54ae0, timeout=<optimized out>) libssh- 0.10.5- 2/src/session. c:550 0x2aa04db9bd0) at /usr/src/ libssh- 0.10.5- 2/src/channels. c:1433 send_eof (channel= 0x2aa04db9bd0) at /usr/src/ libssh- 0.10.5- 2/src/channels. c:1316
0x000002aa02e02e84 in fd_data (fd=<error reading variable: Cannot access memory at address 0x3ffce57fe94>,
revents=<error reading variable: Cannot access memory at address 0x3ffce57fe90>,
user_
164 {
(gdb) bt
#0 0x000002aa02e02e84 in fd_data (fd=<error reading variable: Cannot access memory at address 0x3ffce57fe94>,
revents=<error reading variable: Cannot access memory at address 0x3ffce57fe90>,
user_
#1 0x000003ffa9b32128 in ssh_poll_ctx_dopoll (ctx=ctx@
at /usr/src/
#2 0x000003ffa9b33732 in ssh_handle_packets (session=
at /usr/src/
#3 0x000003ffa9b338e4 in ssh_handle_
fct=
at /usr/src/
#4 0x000003ffa9b33dc6 in ssh_blocking_flush (session=
at /usr/src/
#5 0x000003ffa9b1a0dc in ssh_channel_flush (channel=
#6 ssh_channel_
...