Bug 3027 - The "Bad local forwarding specification" error only caused by socket filename longer than 103 characters
Summary: The "Bad local forwarding specification" error only caused by socket filename...
Status: CLOSED WONTFIX
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 7.9p1
Hardware: 68k Mac OS X
: P5 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-01 21:09 AEST by vpithart
Modified: 2021-04-23 14:58 AEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vpithart 2019-07-01 21:09:45 AEST
When using `ssh -L local_socket:remote_socket` according to manual, when the `remote_socket` filename length is 104+ characters, the "Bad local forwarding specification" error jumps out and SSH client does not work.

Example 1 (fail):
$ ssh -nNT -L /tmp/live:/var/lib/docker/overlay2/1c59b2ed03064cf516958d01354b81fadfa7ab625fac6c13bffe8bc52a29f9cd/merged/usr/local/nagios/var/rw/live root@example.com
Bad local forwarding specification '/tmp/live:/var/lib/docker/overlay2/1c59b2ed03064cf516958d01354b81fadfa7ab625fac6c13bffe8bc52a29f9cd/merged/usr/local/nagios/var/rw/live'


Example 2 (works):
$ ssh -nNT -L /tmp/l:/var/lib/docker/overlay2/1c59b2ed03064cf516958d01354b81fadfa7ab625fac6c13bffe8bc52a29f9cd/merged/usr/loc root@example.com
(works as expected)
Comment 1 Damien Miller 2019-07-01 21:35:21 AEST
That's a limitation of AF_UNIX sockets unfortunately - that's how much room is available in the kernel struct sockaddr_storage API and AFAIK it's impossible for ssh to increase it.
Comment 2 Damien Miller 2021-04-23 14:58:14 AEST
closing resolved bugs as of 8.6p1 release