| Summary: | Read-only mode broken by limits@openssh.com extension | ||
|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Hector Martin <marcan> |
| Component: | sftp-server | Assignee: | Assigned to nobody <unassigned-bugs> |
| Status: | CLOSED FIXED | ||
| Severity: | major | CC: | djm |
| Priority: | P5 | ||
| Version: | 8.6p1 | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| Bug Depends on: | |||
| Bug Blocks: | 3302 | ||
|
Description
Hector Martin
2021-06-06 09:34:40 AEST
Marking the limits extension as needing write is indeed a bug, but the extension should simply not be offered in this case. E.g.
> Refusing limits request in read-only mode
> debug2: compose_extension: refusing to advertise disallowed extension limits@openssh.com
And the client should therefore never request it.
How is your sftp-server configured?
btw you can get more logs from sftp-server by putting "-l debug3" on it's command-line arguments in sshd_config, though you may need to adjust your syslog configuration to accept debug messages. anyway, I have fixed the server bug that caused limits@ to be considered a write operation and have made the client degrade gracefully when the server advertises but fails to accept it. I'd really like to understand how you hit this condition though, as it might be an indication of another bug there. Argh, you're right. What happened is the server is 8.5p1. I was very confused, because limits was mentioned in the release notes fir 8.6. It seems this is a mistake in the release notes; the feature was already in the server in 8.5p1, just buggier. 8.5p1 does *not* do the check before advertising extensions, it just unconditionally advertises them all, hence the problem. The 8.6p1 client's new support then made this visible, and I confused myself with the release notes (and I thought I had upgraded the server already), since why would a non-8.6 server advertise a feature that the release notes claim was introduced in 8.6? :-) Indeed the issue does not happen with 8.6 -> 8.6, just 8.6 -> 8.5. ah, that makes more sense - sftp-server in openssh 8.5 didn't filter advertisements based on its configuration. Thanks for chasing it down. Anyway, both the client and server side are fixed now. Updating the server to 8.6 works around the problem too because it will refuse to advertise it in read-only mode. closing bugs resolved before openssh-8.9 |