From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 589A9C48BE9 for ; Mon, 24 Jun 2019 10:00:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 233A2216C8 for ; Mon, 24 Jun 2019 10:00:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561370410; bh=sLCeOjCrzZWFX3mgX9qYm4q7YOx5AuqolYxd8ZsyC4k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=0QhcUe4X8PlnzfJy7acD0VumBe2MTu7pLLrc8xHYtQ55ibTXwbTTwFqeUDKOJhbB8 FXf+E+g8e4PUzr7HOueMtOnGem1gmpzJjLAyK1U9yZT62kavOXtJf1yCyww4jQPm82 e811UCnVam22vXMWsPSR0mgT8BmvWCt7e4t/B13E= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729330AbfFXJ7w (ORCPT ); Mon, 24 Jun 2019 05:59:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:59272 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729299AbfFXJ7v (ORCPT ); Mon, 24 Jun 2019 05:59:51 -0400 Received: from localhost (f4.8f.5177.ip4.static.sl-reverse.com [119.81.143.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E370C213F2; Mon, 24 Jun 2019 09:59:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561370390; bh=sLCeOjCrzZWFX3mgX9qYm4q7YOx5AuqolYxd8ZsyC4k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hieOBxde6RWPLbZEvyfV0LscjK8WkTKbE6o6yXg0kWs6CX1nBuY7Y1GDyqHk30run yuxVod13kPCqOkb6L1r33CH+F27xjIdMbsIvN6GZ8E3N8fMnbKl2K4epBNElFhMQXV 7uCbFbT3ykF5YJuEE05+XrFe/Wl7fSxgWyZ/VQFM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot+a90604060cb40f5bdd16@syzkaller.appspotmail.com, Willem de Bruijn , Marc Kleine-Budde Subject: [PATCH 4.14 41/51] can: purge socket error queue on sock destruct Date: Mon, 24 Jun 2019 17:56:59 +0800 Message-Id: <20190624092310.785286474@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190624092305.919204959@linuxfoundation.org> References: <20190624092305.919204959@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Willem de Bruijn 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 Cc: linux-stable Signed-off-by: Marc Kleine-Budde Signed-off-by: Greg Kroah-Hartman --- net/can/af_can.c | 1 + 1 file changed, 1 insertion(+) --- 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)