HomeFreeBSD

nd6: Avoid using an uninitialized sockaddr in nd6_prefix_offlink()

Description

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)

Details

Provenance
markjAuthored on May 12 2021, 3:49 PM
Reviewer
donner
Differential Revision
D30166: nd6: Avoid using an uninitialized sockaddr in nd6_prefix_offlink()
Parents
rG4a6c5c8f592f: swap_pager: Zero swap info before exporting to userspace
Branches
Unknown
Tags
Unknown