Loading
ipvlan: fix UAF after skb has been consume by xdp generic
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IB82XT ------------------------------------------ The AF_XDP currently implemented in ipvlan has some bugs. The SKB transferred by the ipvlan is transferred to th ipvlan as a two-dimensional pointer pskb, and then deliver to the xdp for processing. The XDP may release the original SKB and create a new SKB, assign the address of the new SKB to the pSKB. therefore, the pSKB transferred to the XDP must be the pSKB provided by the driver and must not be lost during the process from the driver to the XPD. Otherwist, the XDP determines that the original pSKB may have been released after the driver uploooads the data packet to the kernel for processing. This causes UAF in the kernel and affects the memory usage of the normal services. As a result, the kernel crashed. Fixes: 373ce97b ("ipvlan: support use xdp native mode") Signed-off-by:bitcoffee <liuxin350@huawei.com>