[dpdk-dev] [PATCH v1] examples/vm_power_manager: fix buffer overrun

Hunt, David david.hunt at intel.com
Tue Apr 23 10:21:16 CEST 2019


Hi Thomas,

On 22/4/2019 10:54 PM, Thomas Monjalon wrote:
> 10/04/2019 14:49, David Hunt:
>> The freqs array in freq_info struct has RTE_MAX_LCORE_FREQS elements,
>> yet the code can attemtp to look at the index at POWER_MANAGER_MAX_CPUS,
>> which may be greater than RTE_MAX_LCORE_FREQS. Fix to limit index to
>> RTE_MAX_LCORE_FREQS.
>>
>> Fixes: d26c18c93260 ("examples/vm_power: cpu frequency in host")
>>       Coverity issue: 337660
>>
>> Signed-off-by: David Hunt <david.hunt at intel.com>
> It seems to have been fixed in another patch, isn't it?
>

It was not fixed in another patch, although I can see the confusion.

A previous patch made the #defines more consistent, and 
POWER_MGR_MAX_CPUS was changed to RTE_MAX_LCORE on the affected line. 
However, this was later revealed as a coverity issue, and was fixed in 
this patch to be RTE_LCORE_MAX_FREQS, which is the size of the array 
it's trying to index into.

So looking at RC2, this patch is still needed.

Rgds,
Dave.







More information about the dev mailing list