diff options
author | Jérôme Pouiller <jerome.pouiller@silabs.com> | 2020-05-15 10:33:16 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-15 16:00:52 +0200 |
commit | 13839ef377124956dac8a58887abfd7d8d9414ca (patch) | |
tree | 8de46b8f61215ca88661f80f9876e21380299b17 /drivers/staging/wfx/data_tx.c | |
parent | ad83396891cd80f807ce271830fb5fd029b9dd92 (diff) |
staging: wfx: fix potential use-after-free
wfx_tx_policy_put() use data from the skb. However, the call to
skb_pull() has just discarded them (even if the memory is in fact not
really discarded).
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200515083325.378539-11-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/data_tx.c')
-rw-r--r-- | drivers/staging/wfx/data_tx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index 314cc2743a2b..d01e679b0880 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -494,8 +494,8 @@ static void wfx_skb_dtor(struct wfx_vif *wvif, struct sk_buff *skb) req->data_flags.fc_offset; WARN_ON(!wvif); - skb_pull(skb, offset); wfx_tx_policy_put(wvif, req->tx_flags.retry_policy_index); + skb_pull(skb, offset); ieee80211_tx_status_irqsafe(wvif->wdev->hw, skb); } |