diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-03-30 15:28:57 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-03-30 15:58:30 +0200 |
commit | ba631f262d929bba3a77f470a21c6ada45eadf3c (patch) | |
tree | 19bfb0bb69c999a3e67326e0510cd063dd2a8b5c /src/config.c | |
parent | config: do not allow peers with public keys the same as the interface (diff) | |
download | wireguard-monolithic-historical-ba631f262d929bba3a77f470a21c6ada45eadf3c.tar.xz wireguard-monolithic-historical-ba631f262d929bba3a77f470a21c6ada45eadf3c.zip |
curve25519: protect against potential invalid point attacks
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c index c420f7c..f307ff6 100644 --- a/src/config.c +++ b/src/config.c @@ -159,7 +159,7 @@ int config_set_device(struct wireguard_device *wg, void __user *user_device) u8 public_key[NOISE_PUBLIC_KEY_LEN] = { 0 }; struct wireguard_peer *peer; /* We remove before setting, to prevent race, which means doing two 25519-genpub ops. */ - curve25519_generate_public(public_key, in_device.private_key); + bool unused __attribute((unused)) = curve25519_generate_public(public_key, in_device.private_key); peer = pubkey_hashtable_lookup(&wg->peer_hashtable, public_key); if (peer) { peer_put(peer); |