* Patch "net: avoid NULL deref in inet_ctl_sock_destroy()" has been added to the 4.2-stable tree
@ 2015-11-17 22:41 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-11-17 22:41 UTC (permalink / raw)
To: edumazet, davem, dvyukov, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
net: avoid NULL deref in inet_ctl_sock_destroy()
to the 4.2-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-avoid-null-deref-in-inet_ctl_sock_destroy.patch
and it can be found in the queue-4.2 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 Tue Nov 17 14:34:38 PST 2015
From: Eric Dumazet <edumazet@google.com>
Date: Mon, 2 Nov 2015 07:50:07 -0800
Subject: net: avoid NULL deref in inet_ctl_sock_destroy()
From: Eric Dumazet <edumazet@google.com>
[ Upstream commit 8fa677d2706d325d71dab91bf6e6512c05214e37 ]
Under low memory conditions, tcp_sk_init() and icmp_sk_init()
can both iterate on all possible cpus and call inet_ctl_sock_destroy(),
with eventual NULL pointer.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/net/inet_common.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/include/net/inet_common.h
+++ b/include/net/inet_common.h
@@ -41,7 +41,8 @@ int inet_recv_error(struct sock *sk, str
static inline void inet_ctl_sock_destroy(struct sock *sk)
{
- sock_release(sk->sk_socket);
+ if (sk)
+ sock_release(sk->sk_socket);
}
#endif
Patches currently in stable-queue which might be from edumazet@google.com are
queue-4.2/ipv6-gre-support-sit-encapsulation.patch
queue-4.2/ipmr-fix-possible-race-resulting-from-improper-usage-of-ip_inc_stats_bh-in-preemptible-context.patch
queue-4.2/net-avoid-null-deref-in-inet_ctl_sock_destroy.patch
queue-4.2/net-fix-a-race-in-dst_release.patch
queue-4.2/sit-fix-sit0-percpu-double-allocations.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-11-17 22:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-17 22:41 Patch "net: avoid NULL deref in inet_ctl_sock_destroy()" has been added to the 4.2-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).