Search Linux Wireless

Re: [PATCH v2 2/3] cfg80211: mark regdomains with > NL80211_MAX_SUPP_REG_RULES invalid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2008-11-06 at 12:45 -0800, Luis R. Rodriguez wrote:
> Lets remain consistent and mark rds with > NL80211_MAX_SUPP_REG_RULES
> number of reg rules as invalid in is_valid_rd().
> 
> Signed-off-by: Luis R. Rodriguez <lrodriguez@xxxxxxxxxxx>

Seems fine, if that's not userspace triggerable, but it isn't, right?

Acked-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>

> ---
>  net/wireless/reg.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/net/wireless/reg.c b/net/wireless/reg.c
> index f8e7beb..f0ff3d1 100644
> --- a/net/wireless/reg.c
> +++ b/net/wireless/reg.c
> @@ -352,6 +352,9 @@ static bool is_valid_rd(const struct ieee80211_regdomain *rd)
>  	if (!rd->n_reg_rules)
>  		return false;
>  
> +	if (WARN_ON(rd->n_reg_rules > NL80211_MAX_SUPP_REG_RULES))
> +		return false;
> +
>  	for (i = 0; i < rd->n_reg_rules; i++) {
>  		reg_rule = &rd->reg_rules[i];
>  		if (!is_valid_reg_rule(reg_rule))

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux