Bug 1378 - incorrect port check in parse_forward()
Summary: incorrect port check in parse_forward()
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 4.7p1
Hardware: All All
: P3 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_4_8
  Show dependency treegraph
 
Reported: 2007-10-23 03:43 AEST by Jan Pechanec
Modified: 2008-03-31 15:22 AEDT (History)
1 user (show)

See Also:


Attachments
fix for the bug (288 bytes, patch)
2007-10-23 03:43 AEST, Jan Pechanec
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Pechanec 2007-10-23 03:43:38 AEST
Created attachment 1365 [details]
fix for the bug

the check whether ports were parsed OK is not correct; it doesn't recognize when only one of the ports is incorrect:

# ./ssh -L 99999:localhost:4444 localhost
Password:

# ./ssh -L 99999:localhost:88888 localhost 
Bad local forwarding specification '99999:localhost:88888'

this happens only when root uses ssh(1). Unprivileged client gets an error  "privileged port".

patch attached.
Comment 1 Damien Miller 2007-11-03 11:22:21 AEDT
fix has been applied - thanks.
Comment 2 Damien Miller 2008-03-31 15:22:07 AEDT
Fix shipped in 4.9/4.9p1 release.