Skip to contentSkip to conversation

Patch "addrconf: always initialize sysctl table data" has been added to the 4.1-stable tree

PATCH [email protected] 1 participant 1 message Jan 27, 2016

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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

addrconf: always initialize sysctl table data

to the 4.1-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:
addrconf-always-initialize-sysctl-table-data.patch
and it can be found in the queue-4.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Tue Jan 26 21:37:04 PST 2016

From: WANG Cong <[email protected]>
Date: Mon, 21 Dec 2015 10:55:45 -0800
Subject: addrconf: always initialize sysctl table data

From: WANG Cong <[email protected]>

[ Upstream commit 5449a5ca9bc27dd51a462de7ca0b1cd861cd2bd0 ]

When sysctl performs restrict writes, it allows to write from a middle position of a sysctl file, which requires us to initialize the table data before calling proc_dostring() for the write case.

Fixes 3d1bec99320d ("ipv6: introduce secret_stable to ipv6_devconf")
---
 net/ipv6/addrconf.c |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
net/ipv6/addrconf.c +4 -7
@@ -5267,13 +5267,10 @@ static int addrconf_sysctl_stable_secret
 		goto out;
 	}
 
-	if (!write) {
-		err = snprintf(str, sizeof(str), "%pI6",
-			       &secret->secret);
-		if (err >= sizeof(str)) {
-			err = -EIO;
-			goto out;
-		}
+	err = snprintf(str, sizeof(str), "%pI6", &secret->secret);
+	if (err >= sizeof(str)) {
+		err = -EIO;
+		goto out;
 	}
 
 	err = proc_dostring(&lctl, write, buffer, lenp, ppos);

Patches currently in stable-queue which might be from [email protected] are

queue-4.1/addrconf-always-initialize-sysctl-table-data.patch