]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
nd6: Avoid using an uninitialized sockaddr in nd6_prefix_offlink()
authorMark Johnston <markj@FreeBSD.org>
Wed, 12 May 2021 15:49:24 +0000 (11:49 -0400)
committerMark Johnston <markj@FreeBSD.org>
Wed, 19 May 2021 13:32:28 +0000 (09:32 -0400)
commit010f19777085561cae108e5fd228ff258f7d102a
treede345ec0d740ed3db835be599ece31456e43ba35
parent4a6c5c8f592f320bd72616836239b765f042b323
nd6: Avoid using an uninitialized sockaddr in nd6_prefix_offlink()

Commit 81728a538 ("Split rtinit() into multiple functions.") removed
the initialization of sa6, but not one of its uses.  This meant that we
were passing an uninitialized sockaddr as the address to
lltable_prefix_free().  Remove the variable outright to fix the problem.
The caller is expected to hold a reference on pr.

Fixes: 81728a538 ("Split rtinit() into multiple functions.")
Reported by: KMSAN
Reviewed by: donner
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D30166

(cherry picked from commit c1dd4d642fa0e2c8ea4f9a879f2cc4e5d6c39211)
sys/netinet6/nd6_rtr.c