On 2019/1/8 20:54, Zhu Yanjun wrote:
å 2019/1/8 20:45, Jia-Ju Bai åé:
In drivers/net/ethernet/nvidia/forcedeth.c, the functions
nv_start_xmit() and nv_start_xmit_optimized() can be concurrently
executed with nv_poll_controller().
nv_start_xmit
ÂÂ line 2321: prev_tx_ctx->skb = skb;
nv_start_xmit_optimized
ÂÂ line 2479: prev_tx_ctx->skb = skb;
nv_poll_controller
ÂÂ nv_do_nic_poll
ÂÂÂÂ line 4134: spin_lock(&np->lock);
ÂÂÂÂ nv_drain_rxtx
ÂÂÂÂÂÂ nv_drain_tx
ÂÂÂÂÂÂÂÂ nv_release_txskb
ÂÂÂÂÂÂÂÂÂÂ line 2004: dev_kfree_skb_any(tx_skb->skb);
Thus, two possible concurrency use-after-free bugs may occur.
To fix these possible bugs,
Does this really occur? Can you reproduce this ?
This bug is not found by the real execution.
It is found by a static tool written by myself, and then I check it by manual code review.
Best wishes,
Jia-Ju Bai