Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp157344pxx; Wed, 28 Oct 2020 01:02:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRXeGhwN5vNpHmZb3msREWUYBVGVEDqj55BKG3dX7RZsAKwFPoBdLthkC6z05kZC81VmZK X-Received: by 2002:a05:6402:1586:: with SMTP id c6mr6650464edv.84.1603872123091; Wed, 28 Oct 2020 01:02:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603872123; cv=none; d=google.com; s=arc-20160816; b=s0LvmK4hpV08ker0kdF1MyzX6sggbNjaO5euqniRj+PX8DbMPxhhxypP27GhMBwmDI pJR6hd2jS2pXq1z3B1Rf9rRupJ/B5IUNUbwqDCfmsWodf7U2ARO3VSy6vsyDWuzmJPE9 ABwJh1PrkeP34hL18h97d88tDwVwde1zecX6kjfyDD9ewHxwlPTm6bbZHczBZj1pXRiF gyzZX19vScwYymZ7+5osrrI7P30GBukjRqyB+n7GOB/OuR7/SIUoKBA2CZrnG0nG5acc 8H5HDVLuBHnUtuO1Xfxg3PQrzXO7vhKtOOuOvPyP8j6BVAGKUfianVyFNjxErV7kqHXM TCRQ== 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=Bmow2av7wuQZCUqcDOu5Mfcmxa7jfLv7zFoCJdeWkcA=; b=o8cibkNXFQPUqUWWA7588bJtXvtRv4DFvYOMbWCgp71ZrwImyNJQehHbJJhEWPDfTc ZlyeZhI6toRoivwh3mIqMDHX27OkLhDWtskwZ/A1JOrtsl6bt129tvR0uramgyQA7wtg zZ6pDytNMgdXPnhHnw0UsVbskxYXdgI7FCKBtcSNdrJ0pG/l0WY6QZ/y6XPqErmwLXcA rU2rU2qtge/1OwoVk7Svz8bOKTSH21B+PAp3J7GayryOo1OH6Fs0iFO3aROmDfwp702m rthafiih5px3Uin9e2IlSbMPW4e2oAmYLzHJ5F5cD2n7LNmzB0cAtLBqX4mHIJ1XDPTr +hhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YDeIA9Er; 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 q18si2524555edb.466.2020.10.28.01.01.41; Wed, 28 Oct 2020 01:02:03 -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=YDeIA9Er; 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 S368122AbgJ0N5A (ORCPT + 99 others); Tue, 27 Oct 2020 09:57:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:43420 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S368116AbgJ0N47 (ORCPT ); Tue, 27 Oct 2020 09:56:59 -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 83C462074B; Tue, 27 Oct 2020 13:56:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807019; bh=Y0LEP7xtmW9aZ9+uKOXS1UM96fe9IIZEIvUNvxHAsuQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YDeIA9ErhYNxHWs5oZU7fvFxNvrPkpwOvurA0ID0R6lblV+yfNmLqsHCtrRpY9+Nq CIhtcV4VuorRYAkS76+yByXyfIWHbskJeGVs6775F0GJmf7o+e5rOpBAsLEG7S9o6k dCcMQUSYJg5ISTP+BYt0JXbTnER8uQgtsq5YUEr4= 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 4.4 013/112] net: hdlc_raw_eth: Clear the IFF_TX_SKB_SHARING flag after calling ether_setup Date: Tue, 27 Oct 2020 14:48:43 +0100 Message-Id: <20201027134901.188343674@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134900.532249571@linuxfoundation.org> References: <20201027134900.532249571@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 @@ -101,6 +101,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); netif_dormant_off(dev); return 0;