Thread (8 messages) 8 messages, 5 authors, 2022-04-01

Re: [PATCH net] net: sched: fix use-after-free in tc_new_tfilter()

From: Vlad Buslov <hidden>
Date: 2022-01-31 19:36:34

On Mon 31 Jan 2022 at 21:31, Eric Dumazet [off-list ref] wrote:
On Mon, Jan 31, 2022 at 11:28 AM Vlad Buslov [off-list ref] wrote:
quoted
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".
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help