]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'macvlan-uaf'
authorDavid S. Miller <davem@davemloft.net>
Mon, 14 Mar 2022 10:06:54 +0000 (10:06 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Mar 2022 10:06:54 +0000 (10:06 +0000)
commit56e271b1f0974f8afeac0883bd6ad7cf5e260b6b
tree016666de92847148d489058102bdd5023d62869b
parent17a1e446c1ac24aae118eb92ec090c26cc718d68
parent2b7942f8e7a4e71ea4f56b52f16ebe8fa6c354fb
Merge branch 'macvlan-uaf'

Ziyang Xuan says:

====================
net: macvlan: fix potential UAF problem for lowerdev

Add the reference operation to lowerdev of macvlan to avoid
the potential UAF problem under the following known scenario:

Someone module puts the NETDEV_UNREGISTER event handler to a
work, and lowerdev is accessed in the work handler. But when
the work is excuted, lowerdev has been destroyed because upper
macvlan did not get reference to lowerdev correctly.

In addition, add net device refcount tracker to macvlan.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>