]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
if_wg: fix access to noise_local->l_has_identity and l_private
authorAaron LI <aly@aaronly.me>
Wed, 17 Jan 2024 23:29:23 +0000 (23:29 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Tue, 30 Jan 2024 05:37:57 +0000 (23:37 -0600)
commitce2d249b207045f27ec03719997168c92d0f6104
treefa5147a2977f8bd25e91ec301cb7691f983e0e63
parentbbda52e814e0c760b2beaeae40a2c76ff43d1975
if_wg: fix access to noise_local->l_has_identity and l_private

These members are protected by the identity lock, so rlock it in
noise_remote_alloc() and then assert that we have it held to some extent
in noise_precompute_ss().

PR: 276392

(cherry picked from commit 7a4d1d1df0b2e369adcb32aea9ef8c180f885751)
sys/dev/wg/wg_noise.c