Pārlūkot izejas kodu

[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 14 gadus atpakaļ
vecāks
revīzija
73aea88a62
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1
    0
      src/net/80211/net80211.c

+ 1
- 0
src/net/80211/net80211.c Parādīt failu

@@ -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;

Notiek ielāde…
Atcelt
Saglabāt