Searched hist:"291 ac68478d95cb2b897915da3dc13c6e86d2218" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/net/ |
H A D | macvlan.c | diff 291ac68478d95cb2b897915da3dc13c6e86d2218 Fri Mar 11 03:03:26 CST 2022 Ziyang Xuan <william.xuanziyang@huawei.com> 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.
That likes as the scenario occurred by commit 563bcbae3ba2 ("net: vlan: fix a UAF in vlan_dev_real_dev()").
Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|