Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp242236pxx; Wed, 28 Oct 2020 03:53:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHmYHMpl/eceGzxyXNEyophkNQintm10uMfy/6V6FRmc8z8ol6ZVghuEbOXlaSkgFqS+dl X-Received: by 2002:a17:906:4a8d:: with SMTP id x13mr7094632eju.47.1603882436811; Wed, 28 Oct 2020 03:53:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603882436; cv=none; d=google.com; s=arc-20160816; b=jloITTnhaqJGVt1JuQWlzPmKCFnGsiddEPUu5xEoFDljSS1evowdaryLJnvkf+CAq1 VjqTpyxOkDevOrDGm7mEXrbc1J/sXkrF7y8BPLBhPXL1Yw7T8nqumoKIKy9PIlZsUoxS fLUgyLlME8OxPVMvxtX8OoS03zCnTqa2hhBhVxEI62hDp9r/C1qwvm29iMezL+qMOkZd vV/X9GaJB0T0jU3MaHEflVMUcSBdztMhPUt2bPDKfP81ldir5hwj4YruZSDux+gAnWcJ RjLK9DqyM6e/kz0ty6HR1R9X88YNSO5OaOrnd07WURw/4OYYJVSaYI6I8OHMvOJpB8Kp TpKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=px7wYJvyQ0Yap5n2a2ua51FmTNmtqJ3oqfKvu/uzphE=; b=ez2F3KjvtzXWqNEgnOXhBvMAmbnk0zIQexYWXk7cDMlgdl6hYsazotYnYe0s9ARcFk 4QaegTrvN5IVxqzYOlgZrX1rP9qL0zyLtYkRqGkctGRLvmtLKj6oV7nr52CMFmAxLZae uCRPOJrLstrBrhe/8Lu65WGa8Td9Vqb/iX1xZ2ZS8wFVUEGIvIF86KEz/nPFUp6GvpmZ egiYzWv1PTc1lZtUU8u57Enf8hVWcnX227GBCgbOiotwLKVCsCoHdRwd3EtuLBhp1o2r pWZVzprkGXe2ACQLFURclefXWwJl6WkrDVgSEcjFw5evMxaEow1VcWoiMAgmUVfhZdDV jFGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="m5K9y/Wj"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w17si2969573ejk.629.2020.10.28.03.53.34; Wed, 28 Oct 2020 03:53:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="m5K9y/Wj"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S368516AbgJ0Oy4 (ORCPT + 99 others); Tue, 27 Oct 2020 10:54:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:50062 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1771826AbgJ0OuN (ORCPT ); Tue, 27 Oct 2020 10:50:13 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 8CC34206E5; Tue, 27 Oct 2020 14:50:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810213; bh=DXF48mq6FhP6yJuUDLkahPrjOE9J5yn6xuCS9tNPWvg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m5K9y/Wj1tvO1UM/oR6qw18DywaaXSda403NpCxbtY8EOnmXghiMq+4LTgGaDJkg3 xNoXLDp3nXx/wfmNBNfXa/r0iSWmKKnY8W9BA2X+24w7UdEiMnpPDKqy5Y5noyBGhi fQttll5wLZ1RVL2WWx27srsWkB0jquygrXK5e5yU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Neil Horman , Krzysztof Halasa , Xie He , Jakub Kicinski Subject: [PATCH 5.8 043/633] net: hdlc_raw_eth: Clear the IFF_TX_SKB_SHARING flag after calling ether_setup Date: Tue, 27 Oct 2020 14:46:26 +0100 Message-Id: <20201027135524.725341993@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xie He [ Upstream commit 5fce1e43e2d5bf2f7e3224d7b99b1c65ab2c26e2 ] This driver calls ether_setup to set up the network device. The ether_setup function would add the IFF_TX_SKB_SHARING flag to the device. This flag indicates that it is safe to transmit shared skbs to the device. However, this is not true. This driver may pad the frame (in eth_tx) before transmission, so the skb may be modified. Fixes: 550fd08c2ceb ("net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared") Cc: Neil Horman Cc: Krzysztof Halasa Signed-off-by: Xie He Link: https://lore.kernel.org/r/20201020063420.187497-1-xie.he.0141@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/wan/hdlc_raw_eth.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/wan/hdlc_raw_eth.c +++ b/drivers/net/wan/hdlc_raw_eth.c @@ -99,6 +99,7 @@ static int raw_eth_ioctl(struct net_devi old_qlen = dev->tx_queue_len; ether_setup(dev); dev->tx_queue_len = old_qlen; + dev->priv_flags &= ~IFF_TX_SKB_SHARING; eth_hw_addr_random(dev); call_netdevice_notifiers(NETDEV_POST_TYPE_CHANGE, dev); netif_dormant_off(dev);