net: ipv6: check for validity before dereferencing cfg->fc_nlinfo.nlh
stable inclusion from linux-4.19.187 commit 426853f87e34c9945a655e8997d2f551b12ceb76 -------------------------------- commit 864db232 upstream. nlh is being checked for validtity two times when it is dereferenced in this function. Check for validity again when updating the flags through nlh pointer to make the dereferencing safe. CC: <stable@vger.kernel.org> Addresses-Coverity: ("NULL pointer dereference") Signed-off-by: NMuhammad Usama Anjum <musamaanjum@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录