Procházet zdrojové kódy

[802.11] Fix a use-after-free

When we received an encrypted packet, after replacing it with its
decrypted version and freeing the encrypted original, we would
continue to look at the header of the now-freed original packet. Fix
by moving the header pointer to point at the decrypted packet instead.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Joshua Oreman před 14 roky
rodič
revize
73aea88a62
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  1. 1
    0
      src/net/80211/net80211.c

+ 1
- 0
src/net/80211/net80211.c Zobrazit soubor

@@ -2720,6 +2720,7 @@ void net80211_rx ( struct net80211_device *dev, struct io_buffer *iob,
2720 2720
 		}
2721 2721
 		free_iob ( iob );
2722 2722
 		iob = niob;
2723
+		hdr = iob->data;
2723 2724
 	}
2724 2725
 
2725 2726
 	dev->last_signal = signal;

Načítá se…
Zrušit
Uložit