* Patch "ipv6: make sure to initialize sockc.tsflags before first use" has been added to the 4.9-stable tree
@ 2017-03-27 16:19 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-03-27 16:19 UTC (permalink / raw)
To: glider, davem, gregkh, soheil; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
ipv6: make sure to initialize sockc.tsflags before first use
to the 4.9-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:
ipv6-make-sure-to-initialize-sockc.tsflags-before-first-use.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From foo@baz Mon Mar 27 18:17:54 CEST 2017
From: Alexander Potapenko <glider@google.com>
Date: Tue, 21 Mar 2017 17:14:27 +0100
Subject: ipv6: make sure to initialize sockc.tsflags before first use
From: Alexander Potapenko <glider@google.com>
[ Upstream commit d515684d78148884d5fc425ba904c50f03844020 ]
In the case udp_sk(sk)->pending is AF_INET6, udpv6_sendmsg() would
jump to do_append_data, skipping the initialization of sockc.tsflags.
Fix the problem by moving sockc.tsflags initialization earlier.
The bug was detected with KMSAN.
Fixes: c14ac9451c34 ("sock: enable timestamping using control messages")
Signed-off-by: Alexander Potapenko <glider@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv6/udp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -1037,6 +1037,7 @@ int udpv6_sendmsg(struct sock *sk, struc
ipc6.hlimit = -1;
ipc6.tclass = -1;
ipc6.dontfrag = -1;
+ sockc.tsflags = sk->sk_tsflags;
/* destination address check */
if (sin6) {
@@ -1156,7 +1157,6 @@ do_udp_sendmsg:
fl6.flowi6_oif = np->sticky_pktinfo.ipi6_ifindex;
fl6.flowi6_mark = sk->sk_mark;
- sockc.tsflags = sk->sk_tsflags;
if (msg->msg_controllen) {
opt = &opt_space;
Patches currently in stable-queue which might be from glider@google.com are
queue-4.9/ipv4-provide-stronger-user-input-validation-in-nl_fib_input.patch
queue-4.9/ipv6-make-sure-to-initialize-sockc.tsflags-before-first-use.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-27 16:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-27 16:19 Patch "ipv6: make sure to initialize sockc.tsflags before first use" has been added to the 4.9-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.