netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Eggers <ceggers@arri.de>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next] net: dsa: avoid potential use-after-free error
Date: Thu, 19 Nov 2020 06:27:50 +0100	[thread overview]
Message-ID: <2398833.qWU5Cqh0tX@n95hx1g2> (raw)
In-Reply-To: <20201118233357.ihifojr62ly4pas3@skbuf>

On Thursday, 19 November 2020, 00:33:57 CET, Vladimir Oltean wrote:
> On Wed, Nov 18, 2020 at 04:43:35PM +0100, Christian Eggers wrote:
> > If dsa_switch_ops::port_txtstamp() returns false, clone will be freed
> > immediately. Storing the pointer in DSA_SKB_CB(skb)->clone anyway,
> > supports annoying use-after-free bugs.
> 
> Like what?
In my own code. I test for DSA_SKB_CB(skb)->clone in order to determine 
whether a skb has been selected for TX time stamping by 
ksz9477_ptp_port_txtstamp().

> 
> > Signed-off-by: Christian Eggers <ceggers@arri.de>
> > Fixes 146d442c2357 ("net: dsa: Keep a pointer to the skb clone for TX
> > timestamping")
> Not the right format for a Fixes: tag, please try to set up your
> .gitconfig to automate the creation of this tag.
I think you (or somebody else) already noted this. Sorry for postponing.

regards
Christian




      reply	other threads:[~2020-11-19  5:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-18 15:43 [PATCH net-next] net: dsa: avoid potential use-after-free error Christian Eggers
2020-11-18 23:33 ` Vladimir Oltean
2020-11-19  5:27   ` Christian Eggers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2398833.qWU5Cqh0tX@n95hx1g2 \
    --to=ceggers@arri.de \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vivien.didelot@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).