public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Vlad Buslov <vladbu@nvidia•com>
To: Eric Dumazet <edumazet@google•com>
Cc: Eric Dumazet <eric.dumazet@gmail•com>,
	"David S . Miller" <davem@davemloft•net>,
	Jakub Kicinski <kuba@kernel•org>, netdev <netdev@vger•kernel.org>,
	Vlad Buslov <vladbu@mellanox•com>, Jiri Pirko <jiri@mellanox•com>,
	Cong Wang <xiyou.wangcong@gmail•com>,
	syzbot <syzkaller@googlegroups•com>
Subject: Re: [PATCH net] net: sched: fix use-after-free in tc_new_tfilter()
Date: Mon, 31 Jan 2022 21:36:23 +0200	[thread overview]
Message-ID: <ygnhtudjofyg.fsf@nvidia.com> (raw)
In-Reply-To: <CANn89iL7_FtnUmTxY=tN5dQuB82QL=LANXKxo+vwO90yu1fcJg@mail.gmail.com>

On Mon 31 Jan 2022 at 21:31, Eric Dumazet <edumazet@google•com> wrote:
> On Mon, Jan 31, 2022 at 11:28 AM Vlad Buslov <vladbu@nvidia•com> wrote:
>>
>> Yeah, but I also didn't get how the "chain" variable can get reused in
>> that other function (tcf_new_tfilter()). It seems to always be
>> unconditionally assigned with return value of tcf_chain_get().
>>
>
> This is why I removed the chain=NULL initialization which is not needed.
>
> The potential issue about replay was really about @q variable.

Got it. Initially it wasn't clear because I got the impression from
commit message that reuse of both variables can lead to use-after-free:
"we need to make sure @q and @chain local variables are cleared again,
or risk use-after-free".


  reply	other threads:[~2022-01-31 19:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-31 17:20 [PATCH net] net: sched: fix use-after-free in tc_new_tfilter() Eric Dumazet
2022-01-31 18:53 ` Vlad Buslov
2022-01-31 19:08   ` Eric Dumazet
2022-01-31 19:28     ` Vlad Buslov
2022-01-31 19:31       ` Eric Dumazet
2022-01-31 19:36         ` Vlad Buslov [this message]
2022-02-02  4:20 ` patchwork-bot+netdevbpf
2022-04-01  7:33 ` Denis Efremov

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=ygnhtudjofyg.fsf@nvidia.com \
    --to=vladbu@nvidia$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=edumazet@google$(echo .)com \
    --cc=eric.dumazet@gmail$(echo .)com \
    --cc=jiri@mellanox$(echo .)com \
    --cc=kuba@kernel$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=syzkaller@googlegroups$(echo .)com \
    --cc=vladbu@mellanox$(echo .)com \
    --cc=xiyou.wangcong@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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