]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: further limit wiphy names to 64 bytes
authorEric Biggers <ebiggers@google.com>
Tue, 15 May 2018 03:09:24 +0000 (20:09 -0700)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 18 May 2018 08:01:06 +0000 (10:01 +0200)
commitc1a6410be249ad52e8bcd1fbf51ba7e1ac0faa14
treeb959b02ce2feee5aeece71a5593e81951339cc0d
parentd6deb4c0de220acd2890252d8e9e5ae5e6008cfd
cfg80211: further limit wiphy names to 64 bytes

wiphy names were recently limited to 128 bytes by commit 36d9faecf2cf
("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: 36d9faecf2cf ("cfg80211: limit wiphy names to 128 bytes")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/uapi/linux/nl80211.h