Search Linux Wireless

Re: [RFC PATCH] wifi: cfg80211: fix CQM for non-range use

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

 



On Tue, 2023-11-28 at 15:44 +0100, Michael Walle wrote:
> Hi,
> 
> > net/wireless/nl80211.c: In function 'nl80211_set_cqm_rssi.isra':
> > net/wireless/nl80211.c:12892:17: warning: 'memcpy' specified bound
> > 18446744073709551615 exceeds maximum object size 9223372036854775807
> > [-Wstringop-overflow=]
> 
> FWIW, I'm getting the same error with the current next (next-20231128).
> 

I actually forgot about that, but does anyone actually know what this is
trying to tell me?

The code seems to be

        if (n_thresholds) {
                cqm_config = kzalloc(struct_size(cqm_config, rssi_thresholds,
                                                 n_thresholds),
                                     GFP_KERNEL);
                if (!cqm_config)
                        return -ENOMEM;

                cqm_config->rssi_hyst = hysteresis;
                cqm_config->n_rssi_thresholds = n_thresholds;
                memcpy(cqm_config->rssi_thresholds, thresholds,
                       flex_array_size(cqm_config, rssi_thresholds,
                                       n_thresholds));


Or does it just want to say n_thresholds shouldn't be a signed variable?

johannes





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux