Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2019-06-07 16:46:07 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-25 11:36:54 +0800
commit4ef48fdde36790c6331e5b8629c758a1f2c74856 (patch)
tree94ce43d0f7d37fab5b32ab93e9ea918649064d9d
parent66a60fda031c1c91f0ba1026ed76d6006a2cb81d (diff)
can: purge socket error queue on sock destruct
commit fd704bd5ee749d560e86c4f1fd2ef486d8abf7cf upstream. CAN supports software tx timestamps as of the below commit. Purge any queued timestamp packets on socket destroy. Fixes: 51f31cabe3ce ("ip: support for TX timestamps on UDP and RAW sockets") Reported-by: syzbot+a90604060cb40f5bdd16@syzkaller.appspotmail.com Signed-off-by: Willem de Bruijn <willemb@google.com> Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--net/can/af_can.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/can/af_can.c b/net/can/af_can.c
index e3626e8500c2..9de9678fa7d0 100644
--- a/net/can/af_can.c
+++ b/net/can/af_can.c
@@ -105,6 +105,7 @@ EXPORT_SYMBOL(can_ioctl);
static void can_sock_destruct(struct sock *sk)
{
skb_queue_purge(&sk->sk_receive_queue);
+ skb_queue_purge(&sk->sk_error_queue);
}
static const struct can_proto *can_get_proto(int protocol)