Commit 6380c410 authored by Johannes Berg's avatar Johannes Berg Committed by Alistair Strachan
Browse files

UPSTREAM: mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length



[ Upstream commit ff4dd73d ]

Unfortunately, the nla policy was defined to have HWSIM_ATTR_RADIO_NAME
as an NLA_STRING, rather than NLA_NUL_STRING, so we can't use it as a
NUL-terminated string in the kernel.

Rather than break the API, kasprintf() the string to a new buffer to
guarantee NUL termination.

Reported-by: default avatarAndrew Zaborowski <andrew.zaborowski@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 3e8c1a04)
Bug: 70214720
Change-Id: Ia69ed70a7768a004fb4198732e2531091ede1aeb
Signed-off-by: default avatarAlistair Strachan <astrachan@google.com>
parent 92501a7f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment