| Summary: | "possible hijacking of X11-forwarded connections" bug has not been fixed completely | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | sway <sway2004009> | ||||
| Component: | sshd | Assignee: | Damien Miller <djm> | ||||
| Status: | CLOSED FIXED | ||||||
| Severity: | security | CC: | dtucker | ||||
| Priority: | P1 | ||||||
| Version: | 5.0p1 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 1452 | ||||||
| Attachments: |
|
||||||
|
Description
sway
2008-05-16 12:41:57 AEST
Created attachment 1504 [details]
Don't set SO_REUSEADDR for X11UseLocalhost=no
So this turns out to be a sysv stupidity. BSD derived systems perform a permission check when attempting a bind() with SO_REUSEADDR set: if a previous bind() to that port has been made, then additional bind()s to the same port must come from the same user, or root. sysv-ish systems (including Linux) lack this mechanism.
Since we can't rely on sane semantics, this patch turns off SO_REUSEADDR when setting up the X11 listeners for non-loopback binds. The downside of this is a greater likelihood of port exhaustion in the range (6010-7009) that SSH is prepared to bind on, since ports in TIME_WAIT will no longer be candidates for listeners.
Please test.
Put this on the 5.1 list The patch has been applied and will be in tomorrow's snapshot (http://www.mindrot.org/openssh_snap/). Could you please confirm? Thanks. Mass update RESOLVED->CLOSED after release of openssh-5.1 |