Thread (18 messages) flat view 18 messages, 5 authors, 2021-11-26

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

From: Petr Machata <petrm@nvidia.com>
Date: 2021-11-16 14:21:14
Also in: lkml

Jakub Kicinski [off-list ref] writes:
On Mon, 15 Nov 2021 18:04:42 +0100 Petr Machata wrote:
quoted
I'm not sure why this wasn't happening before. After the veto,
register_vlan_dev() follows with a goto out_unregister_netdev, which
calls unregister_netdevice() calls unregister_netdevice_queue(), which
issues a notifier NETDEV_UNREGISTER, which invokes vlan_device_event(),
which calls unregister_vlan_dev(), which used to dev_put(real_dev),
which seems like it should have caused the same issue. Dunno.
Does the notifier trigger unregister_vlan_dev()? I thought the notifier
triggers when lower dev is unregistered.
Right, I misinterpreted this bit:

        vlan_info = rtnl_dereference(dev->vlan_info);
        if (!vlan_info)
                goto out;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help