Patch "net: sctp: prevent writes to cookie_hmac_alg from accessing invalid memory" has been added to the 4.1-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
net: sctp: prevent writes to cookie_hmac_alg from accessing invalid memory
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:
net-sctp-prevent-writes-to-cookie_hmac_alg-from-accessing-invalid-memory.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: Sasha Levin <[email protected]>
Date: Thu, 7 Jan 2016 14:52:43 -0500
Subject: net: sctp: prevent writes to cookie_hmac_alg from accessing invalid memory
From: Sasha Levin <[email protected]>
[ Upstream commit 320f1a4a175e7cd5d3f006f92b4d4d3e2cbb7bb5 ]
proc_dostring() needs an initialized destination string, while the one provided in proc_sctp_do_hmac_alg() contains stack garbage.
Thus, writing to cookie_hmac_alg would strlen() that garbage and end up accessing invalid memory.
--- net/sctp/sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/sctp/sysctl.c +1 -1
@@ -320,7 +320,7 @@ static int proc_sctp_do_hmac_alg(structstruct ctl_table tbl;bool changed = false;char *none ="none" ; -char tmp[8 ]; +char tmp[8 ] = {0 };int ret;memset (&tbl,0 ,sizeof (struct ctl_table ));
Patches currently in stable-queue which might be from [email protected] are
queue-4.1/net-sctp-prevent-writes-to-cookie_hmac_alg-from-accessing-invalid-memory.patch queue-4.1/addrconf-always-initialize-sysctl-table-data.patch