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
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D30166

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
rGad22ba2b9f3b: if: Remove unnecessary validation in the SIOCSIFNAME handler
Branches
Unknown
Tags
Unknown