summaryrefslogtreecommitdiff
path: root/CVE-2025-30211-2.patch
blob: 4abb79f23fee69d60a838fccb0e41fa619351b93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From: Jakub Witczak <kuba@erlang.org>
Date: Fri, 21 Mar 2025 17:50:21 +0100
Subject: [PATCH] ssh: use chars_limit for bad packets error messages

origin: backport, https://github.com/erlang/otp/commit/d64d9fb0688092356a336e38a8717499113312a0
bug: https://github.com/erlang/otp/security/advisories/GHSA-vvr3-fjhh-cfwc
bug-debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1101713
---
 lib/ssh/src/ssh_connection_handler.erl | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl
index b8c89b8..b8eb798 100644
--- a/lib/ssh/src/ssh_connection_handler.erl
+++ b/lib/ssh/src/ssh_connection_handler.erl
@@ -1554,8 +1554,8 @@ handle_event(info, {Proto, Sock, NewData}, StateName,
                     MaxLogItemLen = ?GET_OPT(max_log_item_len,SshParams#ssh.opts),
                     {Shutdown, D} =
                         ?send_disconnect(?SSH_DISCONNECT_PROTOCOL_ERROR,
-                                         io_lib:format("Bad packet: Decrypted, but can't decode~n~p:~p~n~P",
-                                                       [C,E,ST,MaxLogItemLen]),
+                                         io_lib:format("Bad packet: Decrypted, but can't decode~n~p:~p~n~p",
+                                                       [C,E,ST], [{chars_limit, MaxLogItemLen}]),
                                          StateName, D1),
                     {stop, Shutdown, D}
 	    end;
@@ -1589,8 +1589,8 @@ handle_event(info, {Proto, Sock, NewData}, StateName,
             MaxLogItemLen = ?GET_OPT(max_log_item_len,SshParams#ssh.opts),
             {Shutdown, D} =
                 ?send_disconnect(?SSH_DISCONNECT_PROTOCOL_ERROR,
-                                 io_lib:format("Bad packet: Couldn't decrypt~n~p:~p~n~P",
-                                               [C,E,ST,MaxLogItemLen]),
+                                 io_lib:format("Bad packet: Couldn't decrypt~n~p:~p~n~p",
+                                               [C,E,ST], [{chars_limit, MaxLogItemLen}]),
                                  StateName, D0),
             {stop, Shutdown, D}
     end;