Re: [PATCH] net: ipv6: fix slab-out-of-bounda Read in xfrm6_tunnel_alloc_spi

From: David Miller
Date: Tue Jul 28 2020 - 20:29:13 EST


From: B K Karthik <bkkarthik@xxxxxxxxxxxx>
Date: Sat, 25 Jul 2020 18:15:53 +0530

> fix slab-out-of-bounds Read in xfrm6_tunnel_alloc_spi
> by checking for existance of head for the list spi_byspi

spi_byspi is an array, therefore as long as xfrm6_tn is not NULL
then spi_byspi will also not be NULL.