+ fix-potential-stack-overflow-in-net-core-utilsc.patch added to -mm tree

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

 



The patch titled

     fix potential stack overflow in net/core/utils.c

has been added to the -mm tree.  Its filename is

     fix-potential-stack-overflow-in-net-core-utilsc.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: fix potential stack overflow in net/core/utils.c
From: "Siddha, Suresh B" <suresh.b.siddha@xxxxxxxxx>

On High end systems (1024 or so cpus) this can potentially cause stack
overflow.  Fix the stack usage.

Signed-off-by: Suresh Siddha <suresh.b.siddha@xxxxxxxxx>
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 net/core/utils.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff -puN net/core/utils.c~fix-potential-stack-overflow-in-net-core-utilsc net/core/utils.c
--- a/net/core/utils.c~fix-potential-stack-overflow-in-net-core-utilsc
+++ a/net/core/utils.c
@@ -130,12 +130,13 @@ void __init net_random_init(void)
 static int net_random_reseed(void)
 {
 	int i;
-	unsigned long seed[NR_CPUS];
+	unsigned long seed;
 
-	get_random_bytes(seed, sizeof(seed));
 	for_each_possible_cpu(i) {
 		struct nrnd_state *state = &per_cpu(net_rand_state,i);
-		__net_srandom(state, seed[i]);
+
+		get_random_bytes(&seed, sizeof(seed));
+		__net_srandom(state, seed);
 	}
 	return 0;
 }
_

Patches currently in -mm which might be from suresh.b.siddha@xxxxxxxxx are

fix-potential-stack-overflow-in-net-core-utilsc.patch
fix-potential-stack-overflow-in-mm-slabc.patch
sched-remove-unnecessary-sched-group-allocations.patch
sched-remove-unnecessary-sched-group-allocations-fix.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux