ipv6: Fix out-of-bounds access in ipv6_find_tlv()
stable inclusion from stable-v5.10.181 commit e5f82688ae10f5f386952e65e941bb8868ee54dc category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8GJZJ Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e5f82688ae10f5f386952e65e941bb8868ee54dc -------------------------------- commit 878ecb08 upstream. optlen is fetched without checking whether there is more than one byte to parse. It can lead to out-of-bounds access. Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org) with SVACE. Fixes: c61a4043 ("[IPV6]: Find option offset by type.") Signed-off-by:Gavrilov Ilia <Ilia.Gavrilov@infotecs.ru> Reviewed-by:
Jiri Pirko <jiri@nvidia.com> Reviewed-by:
David Ahern <dsahern@kernel.org> Signed-off-by:
David S. Miller <davem@davemloft.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com> (cherry picked from commit eed7ba7b)
Loading
Please sign in to comment