• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/hostapd/hostapd-cve-2012-4445.patch
Gustavo ZacariasGustavo Zacarias committed 7aed4faa9b012 Oct 2012
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From 567bacefd73782508bfe72d3624df495f0df4cd1 Mon Sep 17 00:00:00 2001
2
From: Jouni Malinen <j@w1.fi>
3
Date: Sun, 7 Oct 2012 20:06:29 +0300
4
Subject: [PATCH] EAP-TLS server: Fix TLS Message Length validation
5
​
6
EAP-TLS/PEAP/TTLS/FAST server implementation did not validate TLS
7
Message Length value properly and could end up trying to store more
8
information into the message buffer than the allocated size if the first
9
fragment is longer than the indicated size. This could result in hostapd
10
process terminating in wpabuf length validation. Fix this by rejecting
11
messages that have invalid TLS Message Length value.
12
​
13
This would affect cases that use the internal EAP authentication server
14
in hostapd either directly with IEEE 802.1X or when using hostapd as a
15
RADIUS authentication server and when receiving an incorrectly
16
constructed EAP-TLS message. Cases where hostapd uses an external
17
authentication are not affected.
18
​
19
Thanks to Timo Warns for finding and reporting this issue.
20
​
21
Signed-hostap: Jouni Malinen <j@w1.fi>
22
intended-for: hostap-1
23
(cherry picked from commit 586c446e0ff42ae00315b014924ec669023bd8de)
24
---
25
 src/eap_server/eap_server_tls_common.c |    8 ++++++++
26
 1 files changed, 8 insertions(+), 0 deletions(-)
27
​
28
diff --git a/src/eap_server/eap_server_tls_common.c b/src/eap_server/eap_server_tls_common.c
29
index e149ee3..2cbe700 100644
30
--- a/src/eap_server/eap_server_tls_common.c
31
+++ b/src/eap_server/eap_server_tls_common.c
32
@@ -224,6 +224,14 @@ static int eap_server_tls_process_fragment(struct eap_ssl_data *data,
33
            return -1;
34
        }
35
 
36
+       if (len > message_length) {
37
+           wpa_printf(MSG_INFO, "SSL: Too much data (%d bytes) in "
38
+                  "first fragment of frame (TLS Message "
39
+                  "Length %d bytes)",
40
+                  (int) len, (int) message_length);
41
+           return -1;
42
+       }
43
+
44
        data->tls_in = wpabuf_alloc(message_length);
45
        if (data->tls_in == NULL) {
46
            wpa_printf(MSG_DEBUG, "SSL: No memory for message");
47
-- 
48
1.7.4-rc1
49
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.