File: CVE-2018-0498-3.patch

package info (click to toggle)
mbedtls 2.4.2-1%2Bdeb9u3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 13,208 kB
  • sloc: ansic: 66,438; sh: 5,507; perl: 1,440; cpp: 1,183; makefile: 785; tcl: 4
file content (26 lines) | stat: -rw-r--r-- 867 bytes parent folder | download
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
From 6a25cfae2a7bf34f206232168942bd2db0886742 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?=
 <manuel.pegourie-gonnard@arm.com>
Date: Tue, 10 Jul 2018 11:15:36 +0200
Subject: [PATCH] Avoid debug message that might leak length

The length to the debug message could conceivably leak through the time it
takes to print it, and that length would in turn reveal whether padding was
correct or not.
---
 library/ssl_tls.c | 2 ++
 1 file changed, 2 insertions(+)

--- a/library/ssl_tls.c
+++ b/library/ssl_tls.c
@@ -1937,8 +1937,10 @@ static int ssl_decrypt_buf( mbedtls_ssl_
         return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
     }
 
+#if defined(MBEDTLS_SSL_DEBUG_ALL)
     MBEDTLS_SSL_DEBUG_BUF( 4, "raw buffer after decryption",
                    ssl->in_msg, ssl->in_msglen );
+#endif
 
     /*
      * Authenticate if not done yet.