diff options
| author | David S. Miller <davem@davemloft.net> | 2020-02-05 14:14:19 +0100 | 
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2020-02-05 14:14:19 +0100 | 
| commit | 7bb77d4b8567b35aadd57f3154a08d873572ae20 (patch) | |
| tree | d0e8cc6334f15c7c087c1007a1a549cf298e71e3 /drivers/net/wireguard/netlink.c | |
| parent | 52b5ae501c045010aeeb1d5ac0373ff161a88291 (diff) | |
| parent | 88f404a9b1d75388225b1c67b6dd327cb2182777 (diff) | |
Merge branch 'wg-fixes'
Jason A. Donenfeld says:
====================
wireguard fixes for 5.6-rc1
Here are fixes for WireGuard before 5.6-rc1 is tagged. It includes:
1) A fix for a UaF (caused by kmalloc failing during a very small
   allocation) that syzkaller found, from Eric Dumazet.
2) A fix for a deadlock that syzkaller found, along with an additional
   selftest to ensure that the bug fix remains correct, from me.
3) Two little fixes/cleanups to the selftests from Krzysztof Kozlowski
   and me.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireguard/netlink.c')
| -rw-r--r-- | drivers/net/wireguard/netlink.c | 6 | 
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireguard/netlink.c b/drivers/net/wireguard/netlink.c index 0fdbd1c45977..bda26405497c 100644 --- a/drivers/net/wireguard/netlink.c +++ b/drivers/net/wireguard/netlink.c @@ -569,10 +569,8 @@ static int wg_set_device(struct sk_buff *skb, struct genl_info *info)  							 private_key);  		list_for_each_entry_safe(peer, temp, &wg->peer_list,  					 peer_list) { -			if (wg_noise_precompute_static_static(peer)) -				wg_noise_expire_current_peer_keypairs(peer); -			else -				wg_peer_remove(peer); +			BUG_ON(!wg_noise_precompute_static_static(peer)); +			wg_noise_expire_current_peer_keypairs(peer);  		}  		wg_cookie_checker_precompute_device_keys(&wg->cookie_checker);  		up_write(&wg->static_identity.lock);  | 
