lkml.org 
[lkml]   [2020]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH net-next] net: dsa: avoid potential use-after-free error
Date
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



\
 
 \ /
  Last update: 2020-11-19 06:29    [W:0.035 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site