]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: limit wiphy names to 128 bytes
authorJohannes Berg <johannes.berg@intel.com>
Tue, 3 Apr 2018 12:33:49 +0000 (14:33 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 19 Apr 2018 13:46:34 +0000 (15:46 +0200)
commitf05a0a671d68d72087f35d68ebeacf2f54450a5f
tree0d478a1526a6954b58dc0e9204eaa40591eaffdb
parent3538957811557725e04e5c62cf582fea764d750b
cfg80211: limit wiphy names to 128 bytes

There's currently no limit on wiphy names, other than netlink
message size and memory limitations, but that causes issues when,
for example, the wiphy name is used in a uevent, e.g. in rfkill
where we use the same name for the rfkill instance, and then the
buffer there is "only" 2k for the environment variables.

This was reported by syzkaller, which used a 4k name.

Limit the name to something reasonable, I randomly picked 128.

Reported-by: syzbot+230d9e642a85d3fec29c@syzkaller.appspotmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/uapi/linux/nl80211.h
net/wireless/core.c