Patch "wireguard: allowedips: initialize list head in selftest" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    wireguard: allowedips: initialize list head in selftest

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     wireguard-allowedips-initialize-list-head-in-selftest.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 46cfe8eee285cde465b420637507884551f5d7ca Mon Sep 17 00:00:00 2001
From: "Jason A. Donenfeld" <Jason@xxxxxxxxx>
Date: Fri, 4 Jun 2021 17:17:35 +0200
Subject: wireguard: allowedips: initialize list head in selftest

From: Jason A. Donenfeld <Jason@xxxxxxxxx>

commit 46cfe8eee285cde465b420637507884551f5d7ca upstream.

The randomized trie tests weren't initializing the dummy peer list head,
resulting in a NULL pointer dereference when used. Fix this by
initializing it in the randomized trie test, just like we do for the
static unit test.

While we're at it, all of the other strings like this have the word
"self-test", so add it to the missing place here.

Fixes: e7096c131e51 ("net: WireGuard secure network tunnel")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Jason A. Donenfeld <Jason@xxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/net/wireguard/selftest/allowedips.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/net/wireguard/selftest/allowedips.c
+++ b/drivers/net/wireguard/selftest/allowedips.c
@@ -296,6 +296,7 @@ static __init bool randomized_test(void)
 			goto free;
 		}
 		kref_init(&peers[i]->refcount);
+		INIT_LIST_HEAD(&peers[i]->allowedips_list);
 	}
 
 	mutex_lock(&mutex);
@@ -333,7 +334,7 @@ static __init bool randomized_test(void)
 			if (wg_allowedips_insert_v4(&t,
 						    (struct in_addr *)mutated,
 						    cidr, peer, &mutex) < 0) {
-				pr_err("allowedips random malloc: FAIL\n");
+				pr_err("allowedips random self-test malloc: FAIL\n");
 				goto free_locked;
 			}
 			if (horrible_allowedips_insert_v4(&h,


Patches currently in stable-queue which might be from Jason@xxxxxxxxx are

queue-5.10/wireguard-use-synchronize_net-rather-than-synchronize_rcu.patch
queue-5.10/wireguard-do-not-use-o3.patch
queue-5.10/wireguard-allowedips-allocate-nodes-in-kmem_cache.patch
queue-5.10/wireguard-allowedips-initialize-list-head-in-selftest.patch
queue-5.10/wireguard-selftests-remove-old-conntrack-kconfig-value.patch
queue-5.10/wireguard-peer-allocate-in-kmem_cache.patch
queue-5.10/wireguard-allowedips-remove-nodes-in-o-1.patch
queue-5.10/wireguard-selftests-make-sure-rp_filter-is-disabled-on-vethc.patch
queue-5.10/wireguard-allowedips-free-empty-intermediate-nodes-when-removing-single-node.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux