Re: [PATCH net v2] net: vlan: fix a UAF in vlan_dev_real_dev()

From: Jakub Kicinski
Date: Thu Nov 18 2021 - 09:17:41 EST


On Thu, 18 Nov 2021 09:46:24 +0800 Ziyang Xuan (William) wrote:
> >> I think we should move the dev_hold() to ndo_init(), otherwise
> >> it's hard to reason if destructor was invoked or not if
> >> register_netdevice() errors out.
> >
> > Ziyang Xuan, do you intend to take care of this?
> > .
>
> I am reading the related processes according to the problem scenario.
> And I will give a more clear sequence and root cause as soon as possible
> by some necessary tests.

Okay, I still don't see the fix.

Petr would you mind submitting since you have a repro handy?