Bug 1378

Summary: incorrect port check in parse_forward()
Product: Portable OpenSSH Reporter: Jan Pechanec <Jan.Pechanec>
Component: sshAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: normal CC: djm
Priority: P3    
Version: 4.7p1   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 1353    
Attachments:
Description Flags
fix for the bug none

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.