Upstream forwarding test failure

Dmitry Belyavskiy dbelyavs at redhat.com
Fri Jan 27 01:36:41 AEDT 2023


Dear Darren,

On Wed, Jan 25, 2023 at 10:13 AM Darren Tucker <dtucker at dtucker.net> wrote:

> On Wed, 25 Jan 2023 at 19:29, Darren Tucker <dtucker at dtucker.net> wrote:
> [...]
> > I have a part-done patch that logs the output from all ssh and sshd
> > instances to separate datestamped files.  I'll see if I can tidy that
> > up for you to try
>
> You can grab it from here:
>
> https://github.com/daztucker/openssh-portable/commit/b54b39349e1a64cbbb9b56b0f8b91a35589fb528
>
> It's not fully baked, but it should at least give you some more
> insight into the case you are looking at:
>
> $ make t-exec LTESTS=forwarding
>
> and check the logs in regress/log (the oldest and newest are likely to
> be the most interesting).
>
>
Do I correctly understand that the idea of the failing test here [1] is
that we try to bind
to the same host/port using IP and hostname, and it should fail as we don't
set
SO_REUSEADDR/SO_REUSEPORT socket options?

If yes, than I suspect some problem on the level of my system setup because
the log looks like
===============
debug3: send packet: type 50
debug3: receive packet: type 52
Authenticated to 127.0.0.1 ([127.0.0.1]:4242) using "publickey".
debug1: Remote connections from LOCALHOST:3301 forwarded to local address
127.0.0.1:4242
debug3: send packet: type 80
debug1: Remote connections from LOCALHOST:3302 forwarded to local address
127.0.0.1:4242
debug3: send packet: type 80
debug1: Remote connections from LOCALHOST:3303 forwarded to local address
127.0.0.1:4242
debug3: send packet: type 80
debug1: Remote connections from LOCALHOST:3301 forwarded to local address
localhost:4242
debug3: send packet: type 80
debug1: Remote connections from LOCALHOST:3304 forwarded to local address
127.0.0.1:4242
debug3: send packet: type 80
debug1: ssh_init_forwarding: expecting replies for 5 forwards
debug1: channel 0: new session [client-session] (inactive timeout: 0)
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting no-more-sessions at openssh.com
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug3: client_repledge: enter
debug3: receive packet: type 80
debug1: client_input_global_request: rtype hostkeys-00 at openssh.com
want_reply 0
debug3: receive packet: type 4
debug1: Remote:
/home/dbelyavs/work/upstream/openssh-portable/regress/authorized_keys_dbelyavs:1:
key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug3: receive packet: type 4
debug1: Remote:
/home/dbelyavs/work/upstream/openssh-portable/regress/authorized_keys_dbelyavs:1:
key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug3: receive packet: type 81
debug1: remote forward success for: listen 3301, connect 127.0.0.1:4242
debug2: forwarding_success: 4 expected forwarding replies remaining
debug3: receive packet: type 81
debug1: remote forward success for: listen 3302, connect 127.0.0.1:4242
debug2: forwarding_success: 3 expected forwarding replies remaining
debug3: receive packet: type 81
debug1: remote forward success for: listen 3303, connect 127.0.0.1:4242
debug2: forwarding_success: 2 expected forwarding replies remaining
debug3: receive packet: type 81
debug1: remote forward success for: listen 3301, connect localhost:4242
debug2: forwarding_success: 1 expected forwarding replies remaining
debug3: receive packet: type 81
debug1: remote forward success for: listen 3304, connect 127.0.0.1:4242
debug1: forwarding_success: all expected forwarding replies received
debug3: receive packet: type 91
================
so the second forwarding succeeds.

I have no ideas how to debug it further, so any help is much appropriate!

[1]
https://github.com/openssh/openssh-portable/blob/master/regress/forwarding.sh#L52

-- 
Dmitry Belyavskiy


More information about the openssh-unix-dev mailing list