Received: by 10.213.65.68 with SMTP id h4csp878665imn; Tue, 27 Mar 2018 10:26:47 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/EjeKYCKUs7q24kXVZIZo7Y/Tf3inSBw+P+GWoxlqzQ0be4b13NN36rOWkgFHyLnNuWLx9 X-Received: by 2002:a17:902:2d24:: with SMTP id o33-v6mr195525plb.143.1522171607277; Tue, 27 Mar 2018 10:26:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522171607; cv=none; d=google.com; s=arc-20160816; b=D8YEFEAiQB8RCewmEHf31SivsLJIaT209UnPuOsX7v1PZkb1YyJ/Cg/pNK5KsQXQ7Y jh+BlawWFLsmzte49MxngcuY2eWt7+R1E2ifz2zO8VGmvwIhW2CnPbtfDeD9z2UWoRFk UOWS7uH2ETtzxHxM+nmWwctqdg88yAVZP4hqhgcrMrlnTZ28ErLZlQe0vX+ynuMnXlo0 BRVS+b4fWQ5gR/RVQqWEJRkcF880b5RQNNCS/bV1hHW8TvXnzDGQlKT7+IUv+ksXsSSI T+SMG8aiSX37pbDqKR9s2d2A+XTKzV4dMsfhaTMAj1b0tKJYHk94INTl6/aKLTkVPLv9 F/8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=+asYKzsXBQ0+eD84EQgYhahPo0CnHv0y+0HodJABELo=; b=h/o5lV1JmQU5egkybmF4BACIxsUt65xUt61yXyxvXq60LPjDB875X8mNRrQOCBG2e8 aprJy6UGAGUoh5G5OrQD8qVCrXkNYHJYTjoaXwctHpeNIkN5P2MPHOZLc1zRmSvaExHM NeAlp/bEsjX4k+UF2aVu/hhqN5rKikMa8dzkou24h6Gfeug/Pn04C3Eyd9Zus7FXeDC3 CvZNoAWlD97D4fv5zjPilIhOFsCaV1zZxFkVfk0UEXQPiYDo6zWks30HJUd2OrQZaRiW cOmjMA+wbpSgAMWZFKrNjrw38QpiSx6rSpcAB7Ns1so5lLyP8niyumr4glM4H+jtdg8N 9UxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 34-v6si1668250pln.473.2018.03.27.10.26.32; Tue, 27 Mar 2018 10:26:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754861AbeC0QhJ (ORCPT + 99 others); Tue, 27 Mar 2018 12:37:09 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46034 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754849AbeC0QhI (ORCPT ); Tue, 27 Mar 2018 12:37:08 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 55684F8A; Tue, 27 Mar 2018 16:37:07 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andri Yngvason , Marc Kleine-Budde Subject: [PATCH 4.14 076/101] can: cc770: Fix use after free in cc770_tx_interrupt() Date: Tue, 27 Mar 2018 18:27:48 +0200 Message-Id: <20180327162754.749117466@linuxfoundation.org> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180327162749.993880276@linuxfoundation.org> References: <20180327162749.993880276@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Andri Yngvason commit 9ffd7503944ec7c0ef41c3245d1306c221aef2be upstream. This fixes use after free introduced by the last cc770 patch. Signed-off-by: Andri Yngvason Fixes: 746201235b3f ("can: cc770: Fix queue stall & dropped RTR reply") Cc: linux-stable Signed-off-by: Marc Kleine-Budde Signed-off-by: Greg Kroah-Hartman --- drivers/net/can/cc770/cc770.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/drivers/net/can/cc770/cc770.c +++ b/drivers/net/can/cc770/cc770.c @@ -706,13 +706,12 @@ static void cc770_tx_interrupt(struct ne return; } - can_put_echo_skb(priv->tx_skb, dev, 0); - can_get_echo_skb(dev, 0); - cf = (struct can_frame *)priv->tx_skb->data; stats->tx_bytes += cf->can_dlc; stats->tx_packets++; + can_put_echo_skb(priv->tx_skb, dev, 0); + can_get_echo_skb(dev, 0); priv->tx_skb = NULL; netif_wake_queue(dev);