[Bug 1578] New: Remote port forwarding with a listen port of '0' only works for root user bz #1003

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Fri Mar 27 14:51:07 EST 2009


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

           Summary: Remote port forwarding with a listen port of '0' only
                    works for root user bz #1003
           Product: Portable OpenSSH
           Version: 5.2p1
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: sshd
        AssignedTo: unassigned-bugs at mindrot.org
        ReportedBy: gavin at emf.net


Created an attachment (id=1618)
 --> (http://bugzilla.mindrot.org/attachment.cgi?id=1618)
Change made to line 1123 of serverloop.c

In 5.2p1 only root can login using remote forwarding with port 0 and
get a port dynamically assigned. Non root users get an error like this:

debug1: Remote: Server has disabled port forwarding.
debug1: remote forward failure for: listen 0, connect localhost:8080
Warning: remote port forwarding failed for listen port 0
debug1: All remote forwarding requests processed

when running:
ssh -v -R 0:localhost:8080 -N gavin at xxxxx.com

whereas the port is dynamically assigned as expected when the user is
root
ssh -v -R 0:localhost:8080 -N root at xxxxx.com

debug1: remote forward success for: listen 0, connect localhost:80
Allocated port 49189 for remote forward to localhost:80
debug1: All remote forwarding requests processed


I fixed this in line 1123 serverloop.c. Hopefully this doesn't break
something important.

Gavin

-- 
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list