~ubuntu-branches/ubuntu/lucid/wpasupplicant/lucid-updates

« back to all changes in this revision

Viewing changes to debian/patches/git_dbus_smartcard_eapol_d719934.patch

  • Committer: Package Import Robot
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2012-01-06 11:49:41 UTC
  • mfrom: (0.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20120106114941-zclbi9fv68gs6a0r
Tags: 0.6.9-3ubuntu3.1
debian/patches/git_dbus_smartcard_eapol_d719934.patch: cherry-pick a patch
from Git to correctly re-initialize pointers in the WPA state machine to
avoid crashing when smartcard parameters change over DBUS (LP: #528087)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From d7199342f0633b5ab147dca5b885530fe32ceaeb Mon Sep 17 00:00:00 2001
 
2
From: David Smith <david.daniel.smith@gmail.com>
 
3
Date: Wed, 11 Nov 2009 17:46:15 +0200
 
4
Subject: [PATCH 1/1] Reset EAPOL pointer when handling DBus smartcard parameters
 
5
 
 
6
Smartcard parameter update via DBus ended up re-initializing the EAPOL
 
7
state machine without updating the pointer inside WPA state machine.
 
8
This can trigger a segfault when EAP layer attempts to use the old
 
9
reference. Fix this by re-initializing the pointer inside WPA state
 
10
machine.
 
11
---
 
12
 wpa_supplicant/ctrl_iface_dbus_handlers.c |    4 ++++
 
13
 1 files changed, 4 insertions(+), 0 deletions(-)
 
14
 
 
15
Index: wpasupplicant.lucid/wpa_supplicant/ctrl_iface_dbus_handlers.c
 
16
===================================================================
 
17
--- wpasupplicant.lucid.orig/wpa_supplicant/ctrl_iface_dbus_handlers.c  2012-02-14 14:03:32.000000000 -0500
 
18
+++ wpasupplicant.lucid/wpa_supplicant/ctrl_iface_dbus_handlers.c       2012-02-15 11:59:31.760632595 -0500
 
19
@@ -24,6 +24,7 @@
 
20
 #include "ieee802_11_defs.h"
 
21
 #include "wpas_glue.h"
 
22
 #include "eapol_supp/eapol_supp_sm.h"
 
23
+#include "wpa.h"
 
24
 
 
25
 
 
26
 /**
 
27
@@ -1246,8 +1247,11 @@
 
28
        wpa_s->conf->pkcs11_module_path = pkcs11_module_path;
 
29
 #endif /* EAP_TLS_OPENSSL */
 
30
 
 
31
+       wpa_sm_set_eapol(wpa_s->wpa, NULL);
 
32
        eapol_sm_deinit(wpa_s->eapol);
 
33
+       wpa_s->eapol = NULL;
 
34
        wpa_supplicant_init_eapol(wpa_s);
 
35
+       wpa_sm_set_eapol(wpa_s->wpa, wpa_s->eapol);
 
36
 
 
37
        return wpas_dbus_new_success_reply(message);
 
38