History

cfg80211: further limit wiphy names to 64 bytes

wiphy names were recently limited to 128 bytes by commit a7cfebcb7594 ("cfg80211: limit wiphy names to 128 bytes"). As it turns out though, this isn't sufficient because dev_vprintk_emit() needs the syslog header string "SUBSYSTEM=ieee80211\0DEVICE=+ieee80211:$devname" to fit into 128 bytes. This triggered the "device/subsystem name too long" WARN when the device name was >= 90 bytes. As before, this was reproduced by syzbot by sending an HWSIM_CMD_NEW_RADIO command to the MAC80211_HWSIM generic netlink family. Fix it by further limiting wiphy names to 64 bytes.

Eric Biggers committed 8 years ago

Commit 81459641 parent 6caf9fb1 file · +1 −1Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/nl80211.h+1−1
@@ -2698,7 +2698,7 @@ enum nl80211_attrs { · 2697 unmodified lines
2698#define NL80211_ATTR_KEYS NL80211_ATTR_KEYS2698#define NL80211_ATTR_KEYS NL80211_ATTR_KEYS
2699#define NL80211_ATTR_FEATURE_FLAGS NL80211_ATTR_FEATURE_FLAGS2699#define NL80211_ATTR_FEATURE_FLAGS NL80211_ATTR_FEATURE_FLAGS
2700 2700
2701#define NL80211_WIPHY_NAME_MAXLEN 1282701#define NL80211_WIPHY_NAME_MAXLEN 64
2702 2702
2703#define NL80211_MAX_SUPP_RATES 322703#define NL80211_MAX_SUPP_RATES 32
2704#define NL80211_MAX_SUPP_HT_RATES 772704#define NL80211_MAX_SUPP_HT_RATES 77