mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] net: macvlan: fix potential UAF problem for lowerdev
@ 2022-03-11  9:02 Ziyang Xuan
  2022-03-11  9:03 ` [PATCH net-next 1/2] " Ziyang Xuan
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ziyang Xuan @ 2022-03-11  9:02 UTC (permalink / raw)
  To: davem, kuba, netdev; +Cc: linux-kernel

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.

Ziyang Xuan (2):
  net: macvlan: fix potential UAF problem for lowerdev
  net: macvlan: add net device refcount tracker

 drivers/net/macvlan.c      | 14 +++++++++++++-
 include/linux/if_macvlan.h |  1 +
 2 files changed, 14 insertions(+), 1 deletion(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-14 10:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-11  9:02 [PATCH net-next 0/2] net: macvlan: fix potential UAF problem for lowerdev Ziyang Xuan
2022-03-11  9:03 ` [PATCH net-next 1/2] " Ziyang Xuan
2022-03-11  9:04 ` [PATCH net-next 2/2] net: macvlan: add net device refcount tracker Ziyang Xuan
2022-03-14 10:10 ` [PATCH net-next 0/2] net: macvlan: fix potential UAF problem for lowerdev patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®