Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

wifi: nl80211: fix UHR capability validation

The ieee80211_uhr_capa_size_ok() function returns a boolean,
but we need an error code here. Fix that.

Fixes: 072e6f7f416f ("wifi: cfg80211: add initial UHR support")
Cc: <stable+noautosel@kernel.org> # no drivers with UHR yet
Link: https://patch.msgid.link/20260303151614.e87ea9995be5.Ie164040a51855a3e548f05f0d0291d7d7993c7ee@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

+3 -1
+3 -1
net/wireless/nl80211.c
··· 339 339 const u8 *data = nla_data(attr); 340 340 unsigned int len = nla_len(attr); 341 341 342 - return ieee80211_uhr_capa_size_ok(data, len, false); 342 + if (!ieee80211_uhr_capa_size_ok(data, len, false)) 343 + return -EINVAL; 344 + return 0; 343 345 } 344 346 345 347 /* policy for the attributes */