diff options
author | subashab@codeaurora.org <subashab@codeaurora.org> | 2015-01-23 22:26:02 +0000 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2015-05-09 23:16:37 +0100 |
commit | cfd16467dd2b98642b547df2d25121b7c1599462 (patch) | |
tree | caf3564d70d83734148b6b3308dcc240774c81e8 /drivers | |
parent | c9568b84ff6fd86075ec67cb9368e8fde1f249ce (diff) | |
download | kernel_samsung_smdk4412-cfd16467dd2b98642b547df2d25121b7c1599462.zip kernel_samsung_smdk4412-cfd16467dd2b98642b547df2d25121b7c1599462.tar.gz kernel_samsung_smdk4412-cfd16467dd2b98642b547df2d25121b7c1599462.tar.bz2 |
ping: Fix race in free in receive path
[ Upstream commit fc752f1f43c1c038a2c6ae58cc739ebb5953ccb0 ]
An exception is seen in ICMP ping receive path where the skb
destructor sock_rfree() tries to access a freed socket. This happens
because ping_rcv() releases socket reference with sock_put() and this
internally frees up the socket. Later icmp_rcv() will try to free the
skb and as part of this, skb destructor is called and which leads
to a kernel panic as the socket is freed already in ping_rcv().
-->|exception
-007|sk_mem_uncharge
-007|sock_rfree
-008|skb_release_head_state
-009|skb_release_all
-009|__kfree_skb
-010|kfree_skb
-011|icmp_rcv
-012|ip_local_deliver_finish
Fix this incorrect free by cloning this skb and processing this cloned
skb instead.
This patch was suggested by Eric Dumazet
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions