Skip to content

Commit 966b2cd

Browse files
authored
Merge pull request #11010 from Mikaka27/michal/ssh/deprecate-and-schedule-removal-zlib/OTP-20099
michal/ssh/deprecate-and-schedule-removal-zlib/OTP-20099
2 parents b40d9ef + ce858b9 commit 966b2cd

7 files changed

Lines changed: 42 additions & 8 deletions

File tree

lib/ssh/doc/guides/configure_algos.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ The lists are (named as in the SSH application's options):
8080
This list is also divided into two for the both directions
8181

8282
- **`compression`** - If and how to compress the message. Examples are `none`,
83-
that is, no compression,
84-
`zlib` for pre-authentication compression (disabled by default),
83+
that is, no compression, `zlib` for pre-authentication compression
84+
(deprecated in SSH and it's usage is scheduled for removal in OTP 30.0),
8585
and `'zlib@openssh.com'` for post-authentication compression.
8686

8787
This list is also divided into two for the both directions

lib/ssh/doc/guides/hardening.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,9 @@ See [Counters and parallelism](#counters-and-parallelism).
126126
The `'zlib@openssh.com'` algorithm is recommended because it only activates
127127
after successful authentication.
128128

129-
The `'zlib'` algorithm is not recommended because it activates before
130-
authentication completes, allowing unauthenticated clients to expose potential
129+
The `'zlib'` algorithm (deprecated in SSH and it's usage is scheduled for removal in OTP 30.0)
130+
is not recommended because it activates before authentication completes,
131+
allowing unauthenticated clients to expose potential
131132
vulnerabilities in compression libraries, and increases attack surface of
132133
compression-based side-channel and traffic-analysis attacks.
133134

lib/ssh/doc/ssh_app.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ cipher aes256-gcm@openssh.com is negotiated.
235235
- none
236236
- zlib@openssh.com
237237

238-
The following compression algorithm is disabled by default:
238+
The following compression algorithm is deprecated in SSH and disabled by default:
239239

240240
- (zlib)
241241

lib/ssh/src/ssh.hrl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,17 @@ ssh:daemon(Port, [{subsystems, [ssh_sftpd:subsystem_spec([])]} | Options])
317317

318318
-doc(#{group => <<"Common Options">>}).
319319
-type compression_alg() :: 'none' |
320-
'zlib' |
321-
'zlib@openssh.com'
320+
'zlib@openssh.com' |
321+
legacy_compression_alg()
322322
.
323323

324+
-doc """
325+
Deprecated: the use of `zlib` compression in SSH will be
326+
removed in OTP 30.0. Use `none` or `zlib@openssh.com` instead.
327+
""".
328+
-doc(#{group => <<"Legacy Algorithms">>, deprecated => "use 'none' or 'zlib@openssh.com' instead"}).
329+
-type legacy_compression_alg() :: 'zlib'.
330+
324331
-doc """
325332
List of algorithms to use in the algorithm negotiation. The default
326333
`t:algs_list/0` can be obtained from `default_algorithms/0`.

scripts/license-header.es

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ check_license([], _Template, #{ lines_after_license := LinesAfterLicense,
493493
NeedsNoLicense -> ok;
494494
IsShort, NeedsNoLicenseIfShort -> ok;
495495
NeedsNoLicenseIfShort ->
496-
throw({warn, "is longer than 10 lines, needs license in header.", []});
496+
throw({warn, "is longer than 20 lines, needs license in header.", []});
497497
true ->
498498
throw({warn, "needs license in header.", []})
499499
end;

system/doc/general_info/deprecations_29.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ SPDX-License-Identifier: Apache-2.0
66
SPDX-FileCopyrightText: Copyright (C) 2025 Richard Carlsson <carlsson.richard@gmail.com>
77
Copyright Ericsson AB 2026. All Rights Reserved.
88
9+
Licensed under the Apache License, Version 2.0 (the "License");
10+
you may not use this file except in compliance with the License.
11+
You may obtain a copy of the License at
12+
13+
http://www.apache.org/licenses/LICENSE-2.0
14+
15+
Unless required by applicable law or agreed to in writing, software
16+
distributed under the License is distributed on an "AS IS" BASIS,
17+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
See the License for the specific language governing permissions and
19+
limitations under the License.
20+
921
%CopyrightEnd%
1022
-->
1123

@@ -24,3 +36,10 @@ the format `{ssl_dist_opt, Value}`. After OTP 20 only the
2436
`ssl_dist_optfile` flag should be used to configure TLS for Erlang
2537
distribution and most options can only be configured that way anyway.
2638

39+
### SSH zlib Compression Algorithm
40+
41+
The use of the `zlib` compression algorithm in the SSH application is
42+
deprecated. Use `none` or `zlib@openssh.com` instead. The `zlib`
43+
algorithm has not been included in the default SSH algorithms for some
44+
time and support for it in SSH is scheduled for removal in OTP 30.0.
45+

system/doc/general_info/scheduled_for_removal_30.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,10 @@ All TLS options specified for Erlang distribution as `ERL_FLAGS` on
7777
the format `{ssl_dist_opt, Value}`. After OTP 20 only the
7878
`ssl_dist_optfile` flag should be used to configure TLS for Erlang
7979
distribution and most options can only be configured that way anyway.
80+
81+
### SSH zlib Compression Algorithm
82+
83+
The use of the `zlib` compression algorithm in the SSH application is
84+
deprecated. Use `none` or `zlib@openssh.com` instead. The `zlib`
85+
algorithm has not been included in the default SSH algorithms for some
86+
time and support for it in SSH is scheduled for removal in OTP 30.0.

0 commit comments

Comments
 (0)