[dpdk-dev] [dpdk-stable] [PATCH] lib/table: fix table autotest ut crashes in ipv6

Thomas Monjalon thomas at monjalon.net
Thu Jul 4 23:25:32 CEST 2019


02/07/2019 13:50, Dumitrescu, Cristian:
> From: David Marchand [mailto:david.marchand at redhat.com]
> On Tue, Jul 2, 2019 at 1:22 PM Jananee Parthasarathy <jananeex.m.parthasarathy at intel.com<mailto:jananeex.m.parthasarathy at intel.com>> wrote:
> Unit test table_autotest results in segmentation fault.
> Crash occurs in test_table_lpm_ipv6_combined().
> 
> Variable 'nht_pos0' used as array subscript is not initialized
> in rte_table_lpm_ipv6_entry_add(). It will not be assigned,
> if a rule does not exist.
> 
> In such case a junk number or invalid array index might result in
> segmentation fault due to array out of bounds when
> lpm->nht_users is used with such invalid array index.
> 
> Fix is to initialize the variables used for array subscript.
> 
> Bugzilla ID: 285
> 
> Fixes: d89a5bce1d ("lpm6: extend next hop field")
> Cc: stable at dpdk.org<mailto:stable at dpdk.org>
> 
> Signed-off-by: Jananee Parthasarathy <jananeex.m.parthasarathy at intel.com<mailto:jananeex.m.parthasarathy at intel.com>>
[...]
> It fixes the segfault I saw, leaving the ack to the maintainer.
> Tested-by: David Marchand <david.marchand at redhat.com<mailto:david.marchand at redhat.com>>
> 
> Acked-by: Cristian Dumitrescu <cristian.dumitrescu at intel.com>

Applied, thanks




More information about the dev mailing list