git: wg: Fix noise_remote_alloc() to acquire 'l_identity_lock' lock

Aaron LI aly at crater.dragonflybsd.org
Thu Feb 8 00:32:35 PST 2024


commit c69b9a261b35f1623cf3fc7fa29da229dce32fe3
Author: Aaron LI <aly at aaronly.me>
Date:   Tue Jan 16 20:27:35 2024 +0800

    wg: Fix noise_remote_alloc() to acquire 'l_identity_lock' lock
    
    The 'l_identity_lock' lock must be acquired to access 'l_has_identity'
    and 'l_private' members; i.e., noise_precompute_ss() must be called with
    the 'l_identity_lock' locked.  So fix noise_remote_alloc() to acquire
    the lock before calling noise_precompute_ss().  Meanwhile, add an
    assertion to the latter to assert the required lock is held.

Summary of changes:
 sys/net/wg/wg_noise.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/c69b9a261b35f1623cf3fc7fa29da229dce32fe3


-- 
DragonFly BSD source repository


More information about the Commits mailing list