]> git.ipfire.org Git - thirdparty/hostap.git/commit
nl80211: Fix potential NULL pointer dereference in set_ap()
authorKarthikeyan Kathirvel <quic_kathirve@quicinc.com>
Tue, 5 Mar 2024 07:09:44 +0000 (12:39 +0530)
committerJouni Malinen <j@w1.fi>
Tue, 26 Mar 2024 17:14:48 +0000 (19:14 +0200)
commit69d53b8b6b8e82c594817545e033904fbf567bb1
tree3da42c8790a437860b64e2f4800c3345394cfd2b
parent666e954ca27aac845f0b69d0bd38f103e389d1b5
nl80211: Fix potential NULL pointer dereference in set_ap()

In the code review, it was found that param->freq is accessed without
NULL check in wpa_driver_nl80211_set_ap(), while in other sections of
the code, freq is accessed only after NULL validation. This situation
could result in a segmentation fault at least in theory.

Add a NULL check for freq before accessing it to be consistent with the
other uses.

Fixes: 0c6c948047de ("nl80211: Support setting up an AP on a specified link")
Signed-off-by: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
src/drivers/driver_nl80211.c