bugzilla-daemon at bugzilla.mindrot.org
2016-Apr-03  23:55 UTC
[Bug 2562] New: CanonicalizeHostname causes duplicate LocalForward attempts
https://bugzilla.mindrot.org/show_bug.cgi?id=2562
            Bug ID: 2562
           Summary: CanonicalizeHostname causes duplicate LocalForward
                    attempts
           Product: Portable OpenSSH
           Version: 7.1p1
          Hardware: ix86
                OS: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P5
         Component: ssh
          Assignee: unassigned-bugs at mindrot.org
          Reporter: matt+openssh at snark.net
When CanonicalizeHostname reloads ssh config, LocalForward entries end
up duplicated; this causes a connection failure if ExitOnForwardFailure
is set.
test config:
Host mini
    IdentityFile ~/.ssh/keys/id_rsa
    LocalForward localhost:8000 localhost:80
Host *
    CanonicalizeHostname yes
    ExitOnForwardFailure yes
result:
mghali at ernie.int.snark.net:~$ ssh -v -F tmp/config mini
OpenSSH_7.1p1, OpenSSL 1.0.1j 15 Oct 2014
debug1: Reading configuration data tmp/config
debug1: tmp/config line 1: Applying options for mini
debug1: tmp/config line 5: Applying options for *
debug1: Re-reading configuration after hostname canonicalisation
debug1: Reading configuration data tmp/config
debug1: tmp/config line 1: Applying options for mini
debug1: tmp/config line 5: Applying options for *
debug1: Connecting to mini [192.168.0.250] port 22.
debug1: Connection established.
[...]
Authenticated to mini ([192.168.0.250]:22).
debug1: Local connections to localhost:8000 forwarded to remote address
localhost:80
debug1: Local forwarding listening on ::1 port 8000.
debug1: channel 0: new [port listener]
debug1: Local forwarding listening on 127.0.0.1 port 8000.
debug1: channel 1: new [port listener]
debug1: Local connections to localhost:8000 forwarded to remote address
localhost:80
debug1: Local forwarding listening on ::1 port 8000.
bind: Address already in use
debug1: Local forwarding listening on 127.0.0.1 port 8000.
bind: Address already in use
channel_setup_fwd_listener_tcpip: cannot listen to port: 8000
Could not request local forwarding.
Disabling CanonicalizeHostname results in a single set of port
forwarding actions and success:
mghali at ernie.int.snark.net:~$ ssh -v -F tmp/config -o
'CanonicalizeHostname no' mini
OpenSSH_7.1p1, OpenSSL 1.0.1j 15 Oct 2014
debug1: Reading configuration data tmp/config
debug1: tmp/config line 1: Applying options for mini
debug1: tmp/config line 5: Applying options for *
debug1: Connecting to mini [192.168.0.250] port 22.
debug1: Connection established.
[...]
Authenticated to mini ([192.168.0.250]:22).
debug1: Local connections to localhost:8000 forwarded to remote address
localhost:80
debug1: Local forwarding listening on ::1 port 8000.
debug1: channel 0: new [port listener]
debug1: Local forwarding listening on 127.0.0.1 port 8000.
debug1: channel 1: new [port listener]
debug1: channel 2: new [client-session]
debug1: Requesting no-more-sessions at openssh.com
debug1: Entering interactive session.
-- 
You are receiving this mail because:
You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2016-Apr-05  05:31 UTC
[Bug 2562] CanonicalizeHostname causes duplicate LocalForward attempts
https://bugzilla.mindrot.org/show_bug.cgi?id=2562
Damien Miller <djm at mindrot.org> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned-bugs at mindrot.org |djm at mindrot.org
             Status|NEW                         |ASSIGNED
                 CC|                            |djm at mindrot.org,
                   |                            |dtucker at zip.com.au
   Attachment #2803|                            |ok?(dtucker at zip.com.au)
              Flags|                            |
--- Comment #1 from Damien Miller <djm at mindrot.org> ---
Created attachment 2803
  --> https://bugzilla.mindrot.org/attachment.cgi?id=2803&action=edit
don't record duplicate forwards
Thanks. This patch should help.
-- 
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2016-Apr-05  05:32 UTC
[Bug 2562] CanonicalizeHostname causes duplicate LocalForward attempts
https://bugzilla.mindrot.org/show_bug.cgi?id=2562
Damien Miller <djm at mindrot.org> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |2543
Referenced Bugs:
https://bugzilla.mindrot.org/show_bug.cgi?id=2543
[Bug 2543] Tracking bug for OpenSSH 7.3 release
-- 
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2016-Apr-05  05:48 UTC
[Bug 2562] CanonicalizeHostname causes duplicate LocalForward attempts
https://bugzilla.mindrot.org/show_bug.cgi?id=2562 --- Comment #2 from Matthew Ghali <matt+openssh at snark.net> --- Thanks - I see this already was fixed in 7.2p2 - sorry I didn't check first! -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2016-Apr-05  08:29 UTC
[Bug 2562] CanonicalizeHostname causes duplicate LocalForward attempts
https://bugzilla.mindrot.org/show_bug.cgi?id=2562
Darren Tucker <dtucker at zip.com.au> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #2803|ok?(dtucker at zip.com.au)     |ok+
              Flags|                            |
-- 
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2016-Apr-08  03:31 UTC
[Bug 2562] CanonicalizeHostname causes duplicate LocalForward attempts
https://bugzilla.mindrot.org/show_bug.cgi?id=2562
Damien Miller <djm at mindrot.org> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED
--- Comment #3 from Damien Miller <djm at mindrot.org> ---
patch is committed and will appear in openssh-7.3. Thanks!
-- 
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2016-Aug-02  00:40 UTC
[Bug 2562] CanonicalizeHostname causes duplicate LocalForward attempts
https://bugzilla.mindrot.org/show_bug.cgi?id=2562
Damien Miller <djm at mindrot.org> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED
--- Comment #4 from Damien Miller <djm at mindrot.org> ---
Close all resolved bugs after 7.3p1 release
-- 
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.
Maybe Matching Threads
- Can't get LocalForward to work when using ControlPath
- sshd 4.2p1 LocalForward interface binding
- [Bug 996] Fatal error in xfree() when scp invokes ssh with a LocalForward config
- [Bug 3133] New: Dynamically Assigned Ports for DynamicForward and LocalForward
- [Bug 3449] New: LocalForward doesn't support ~/path syntax for UNIX sockets