]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ip6_output(): Check the return value of in6_getlinkifnet().
authormarkj <markj@FreeBSD.org>
Thu, 30 Jul 2020 17:43:23 +0000 (17:43 +0000)
committermarkj <markj@FreeBSD.org>
Thu, 30 Jul 2020 17:43:23 +0000 (17:43 +0000)
commit10c28d28ee1ef6e9c84f74022d16304b087a8bae
treeaabda2d3b3321b8f17568cb8e5623402fc222bd1
parenta75768e5cdd3c210d2da89e8142e7c4c0d48461f
ip6_output(): Check the return value of in6_getlinkifnet().

If the destination address has an embedded scope ID, make sure that it
corresponds to a valid ifnet before proceeding.  Otherwise a sendto()
with a bogus link-local address can trigger a NULL pointer dereference.

Reported by: syzkaller
Reviewed by: ae
Fixes: r358572
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25887
sys/netinet6/ip6_output.c