diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2020-10-31 14:08:43 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2020-10-31 14:08:43 +0000 |
commit | 77f9b4713239988ecd776c465ee6a812e5982290 (patch) | |
tree | e8f5281f9a5e7cec6a5cc8dca56f0c8f56eb903d /sys/net/wg_noise.c | |
parent | 9f75aec3365fb520623be174a2ba4e21eb453361 (diff) |
release the correct lock in noise_remote_begin_session()
fixes a "noise_keypair: lock not held" panic observed by Caspar Sc
hutijser
from Jason A. Donenfeld
Diffstat (limited to 'sys/net/wg_noise.c')
-rw-r--r-- | sys/net/wg_noise.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/wg_noise.c b/sys/net/wg_noise.c index 66bdecee80e..adb00568eb4 100644 --- a/sys/net/wg_noise.c +++ b/sys/net/wg_noise.c @@ -459,7 +459,7 @@ noise_remote_begin_session(struct noise_remote *r) NOISE_SYMMETRIC_KEY_LEN, NOISE_SYMMETRIC_KEY_LEN, 0, 0, hs->hs_ck); } else { - rw_exit_write(&r->r_keypair_lock); + rw_exit_write(&r->r_handshake_lock); return EINVAL; } |