wlan: Fix possible integer underflow in cfg80211_rx_mgmt

In the function cfg80211_rx_mgmt, data_len is calculated as
len - ieee80211_hdrlen(mgmt->frame_control). Len is not
validated before this calculation. So a possible integer
underflow will occur if len value is less than the value of
ieee80211_hdrlen(mgmt->frame_control).

Validate the value of len against
ieee80211_hdrlen(mgmt->frame_control) in the caller.

Issue: SEC-1940
Change-Id: I321533d31ef040e869e0559a8449d0fd89b75305
CRs-Fixed: 2460252
Signed-off-by: Gururaj Patil <gururaj.patil3@harman.com>
1 file changed