diff options
| author | Johannes Berg <johannes.berg@intel.com> | 2022-10-13 11:59:16 +0200 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2022-10-13 11:59:56 +0200 |
| commit | e7ad651c31c5e1289323e6c680be6e582a593b26 (patch) | |
| tree | 7170b192203a8fafc16ccee7ce79d475d8df0272 /include | |
| parent | abf93f369419249ca482a8911039fe1c75a94227 (diff) | |
| parent | c90b93b5b782891ebfda49d4e5da36632fefd5d1 (diff) | |
Merge branch 'cve-fixes-2022-10-13'
Pull in the fixes for various scan parsing bugs found by
Sönke Huster by fuzzing.
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/ieee802154_netdev.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/net/ieee802154_netdev.h b/include/net/ieee802154_netdev.h index a8994f307fc3..03b64bf876a4 100644 --- a/include/net/ieee802154_netdev.h +++ b/include/net/ieee802154_netdev.h @@ -185,21 +185,27 @@ static inline int ieee802154_sockaddr_check_size(struct sockaddr_ieee802154 *daddr, int len) { struct ieee802154_addr_sa *sa; + int ret = 0; sa = &daddr->addr; if (len < IEEE802154_MIN_NAMELEN) return -EINVAL; switch (sa->addr_type) { + case IEEE802154_ADDR_NONE: + break; case IEEE802154_ADDR_SHORT: if (len < IEEE802154_NAMELEN_SHORT) - return -EINVAL; + ret = -EINVAL; break; case IEEE802154_ADDR_LONG: if (len < IEEE802154_NAMELEN_LONG) - return -EINVAL; + ret = -EINVAL; + break; + default: + ret = -EINVAL; break; } - return 0; + return ret; } static inline void ieee802154_addr_from_sa(struct ieee802154_addr *a, |
