Skip to content

Commit 8145964

Browse files
ebiggersjmberg-intel
authored andcommitted
cfg80211: further limit wiphy names to 64 bytes
wiphy names were recently limited to 128 bytes by commit a7cfebc ("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. Reported-by: syzbot+e64565577af34b3768dc@syzkaller.appspotmail.com Fixes: a7cfebc ("cfg80211: limit wiphy names to 128 bytes") Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent 6caf9fb commit 8145964

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎include/uapi/linux/nl80211.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2698,7 +2698,7 @@ enum nl80211_attrs {
26982698
#define NL80211_ATTR_KEYS NL80211_ATTR_KEYS
26992699
#define NL80211_ATTR_FEATURE_FLAGS NL80211_ATTR_FEATURE_FLAGS
27002700

2701-
#define NL80211_WIPHY_NAME_MAXLEN 128
2701+
#define NL80211_WIPHY_NAME_MAXLEN 64
27022702

27032703
#define NL80211_MAX_SUPP_RATES 32
27042704
#define NL80211_MAX_SUPP_HT_RATES 77

0 commit comments

Comments
 (0)