mirror of
https://github.com/opnsense/src.git
synced 2026-04-01 07:25:10 -04:00
if_wg: avoid null ptr deref
While we're here, sync up with OpenBSD and don't use a keypair !kp_valid MFC after: 3 days
This commit is contained in:
parent
df55485085
commit
2b82c94acf
1 changed files with 1 additions and 1 deletions
|
|
@ -673,7 +673,7 @@ noise_remote_decrypt(struct noise_remote *r, struct noise_data *data,
|
|||
* REKEY_AFTER_TIME_RECV seconds. */
|
||||
ret = ESTALE;
|
||||
kp = r->r_current;
|
||||
if (kp->kp_is_initiator &&
|
||||
if (kp != NULL && kp->kp_valid && kp->kp_is_initiator &&
|
||||
noise_timer_expired(&kp->kp_birthdate, REKEY_AFTER_TIME_RECV, 0))
|
||||
goto error;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue