Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1779704yba; Thu, 4 Apr 2019 18:52:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwypbjwhCx5gHiXahhvcI1UJeEb8FKHG9Y0meAvEkH7r32orZPtkUAdIZKvfTVwd0yeMJZY X-Received: by 2002:a62:b418:: with SMTP id h24mr9425642pfn.145.1554429169024; Thu, 04 Apr 2019 18:52:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554429169; cv=none; d=google.com; s=arc-20160816; b=ZUV6jMokvp2yDfsN73sJQ4WNDR4tiBhn+BVS0d2tiNlL7jM75oMXpP5E5wimL5ZyqK lXgjAq0WqIF2KrK6qjSBxID6bBC3wJO35uo/rLwP2QhC5TgutGuOWOe05mwjibstXdBo k3sKQStnnkTtrvu3bdLhKBYujKC5QUojIgi0hKjXFbj5E+u5fteccicIAnM10HnwQ4x9 4jOgKjM3wspslLc9oPN4PANDhupTq4WjTxrCw99AsMm19PYTb+PnVxlzrGL/Q96wCNlr hu3iJ1oV9oZ0eSvdFvuqeGZ3jP+UQmxa/CTZnK/lZO1OxquQMeZZKgSLvPWqQeRCbArB qsDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=N19BjdX8YQDXguhlA5glQ5mh6aSqEJIq0xYKMc2V6dk=; b=0qWlo32JkXYQMo+nyZ9LNXfYFukRy6A/PUk5IQHeNtD379nU04EAqxm2jQmj45f/s1 iSVD+VroXOJZi6DYSSL7sF7av8mR0srcS4U0tD0tgYFOfqIyZInzF86ZZQo9SpdAuPFG yBWV8bHTz8aE9EefwS3bvoxerZkTTPmhsLsZT/dIAYeSLt/rCh2ZMzrh8XJkbUssURsb RbTpxBFK2mWumaxaOONnbkC6Y+GMhFYARo5xsI0t4cg2a/dHaR+p1M7XHqeRSEIzMQU9 dCksKPkDB4skK3tuumc8n/0zz/d8Rt0UTVmz1UnLlKgwIQsTc1xTk79grl+DA2YGu/n7 FrQA== 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 s21si17891140pfh.260.2019.04.04.18.52.20; Thu, 04 Apr 2019 18:52:49 -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 S1730251AbfDEAcm (ORCPT + 99 others); Thu, 4 Apr 2019 20:32:42 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:55148 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727053AbfDEAcm (ORCPT ); Thu, 4 Apr 2019 20:32:42 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::d71]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 6CF08147260CA; Thu, 4 Apr 2019 17:32:41 -0700 (PDT) Date: Thu, 04 Apr 2019 17:32:40 -0700 (PDT) Message-Id: <20190404.173240.1338878948110207179.davem@davemloft.net> To: ms@dev.tdt.de Cc: andrew.hendry@gmail.com, khc@pm.waw.pl, isdn@linux-pingi.de, edumazet@google.com, linux-x25@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/4] wan/hdlc_x25: fix skb handling From: David Miller In-Reply-To: <20190403050118.12785-2-ms@dev.tdt.de> References: <20190403050118.12785-1-ms@dev.tdt.de> <20190403050118.12785-2-ms@dev.tdt.de> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 04 Apr 2019 17:32:41 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Martin Schiller Date: Wed, 3 Apr 2019 07:01:16 +0200 > /* X.25 to LAPB */ > switch (skb->data[0]) { > case X25_IFACE_DATA: /* Data to be transmitted */ > - skb_pull(skb, 1); > - if ((result = lapb_data_request(dev, skb)) != LAPB_OK) > - dev_kfree_skb(skb); > - return NETDEV_TX_OK; > + skbn = skb_copy(skb, GFP_ATOMIC); > + skb_pull(skbn, 1); > + skb_reset_network_header(skbn); > + if ((result = lapb_data_request(dev, skbn)) != LAPB_OK) > + dev_kfree_skb(skbn); This leaks 'skb'. No way I'm applying this stuff.