Unverified Commit 82ec2796 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!10834 v2 wifi: cfg80211: restrict NL80211_ATTR_TXQ_QUANTUM values

parents dc3e4805 99481cee
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -468,6 +468,10 @@ static struct netlink_range_validation nl80211_punct_bitmap_range = {
	.max = 0xffff,
};
static struct netlink_range_validation q_range = {
	.max = INT_MAX,
};
static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
	[0] = { .strict_start_type = NL80211_ATTR_HE_OBSS_PD },
	[NL80211_ATTR_WIPHY] = { .type = NLA_U32 },
@@ -750,7 +754,7 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
	[NL80211_ATTR_TXQ_LIMIT] = { .type = NLA_U32 },
	[NL80211_ATTR_TXQ_MEMORY_LIMIT] = { .type = NLA_U32 },
	[NL80211_ATTR_TXQ_QUANTUM] = { .type = NLA_U32 },
	[NL80211_ATTR_TXQ_QUANTUM] = NLA_POLICY_FULL_RANGE(NLA_U32, &q_range),
	[NL80211_ATTR_HE_CAPABILITY] =
		NLA_POLICY_VALIDATE_FN(NLA_BINARY, validate_he_capa,
				       NL80211_HE_MAX_CAPABILITY_LEN),