HomeFreeBSD

security/wpa_supplicant-devel: Fix uninitialized packet pointer on error

Description

security/wpa_supplicant-devel: Fix uninitialized packet pointer on error

The packet pointer (called packet) will remain uninitialized when
pcap_next_ex() returns an error. This occurs when the wlan
interface is shut down using ifconfig destroy. Adding a NULL
assignment to packet duplicates what pcap_next() does.

The reason we use pcap_next_ex() in this instance is because with
pacp_next() when we receive a null pointer if there was an error
or if no packets were read. With pcap_next_ex() we can differentiate
between an error and legitimately no packets were received.

PR: 270649, 273696
Obtained from: src 953efa5b200f
Reported by: Robert Morris <rtm@lcs.mit.edu>

(cherry picked from commit a872b8a14f51721830232b127cc6ac27663a903d)

Details

Provenance
cyAuthored on Sep 12 2023, 5:17 AM
Parents
R11:45703ac1172c: security/wpa_supplicant: Fix uninitialized packet pointer on error
Branches
Unknown
Tags
Unknown