Regression in 6.5p1 when using -W option

Ron Frederick ronf at timeheart.net
Fri Feb 21 14:37:30 EST 2014


On Thu, Feb 20, 2014 at 8:24 PM, Corinna Vinschen <vinschen at redhat.com> wrote:
> On Feb 20 20:07, Darren Tucker wrote:
[...]
>>>  getsockname failed: Bad file descriptor
>> 
>> Thanks for the report.  This is
>> https://bugzilla.mindrot.org/show_bug.cgi?id=2200, the fix for which
>> has just been committed.
> 
> Yes, that fixes it.  Any chance for a bugfix release?


Note that get_peer_port() called just after this to get the remote port also calls get_sock_port() and would potentially have a similar issue. However, it appears in that case that it only outputs a debug message rather than calling error().

Also, I see cases where these functions return either -1 or 65535 when they aren’t called on a socket. I wonder if the check here should be made consistent with that. See functions like get_port() at the bottom of canohost.c, or the “return -1” in get_sock_port() itself when getpeername() fails.
-- 
Ron Frederick
ronf at timeheart.net





More information about the openssh-unix-dev mailing list