]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:28:25 +0000 (12:28 +0200)
commit10f267e89d1ef48669d341e4680519437cb60199
tree56fcbb12197c1c199556bfbf9eccf337256ef49d
parentf118686d74399c1b98be9cd15382c676e8c50e70
cfg80211: limit wiphy names to 128 bytes

BugLink: http://bugs.launchpad.net/bugs/1783418
commit a7cfebcb7594a24609268f91299ab85ba064bf82 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
include/uapi/linux/nl80211.h
net/wireless/core.c