aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ice/ice_txrx.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-09-21 13:10:05 -0700
committerJakub Kicinski <kuba@kernel.org>2022-09-22 07:33:17 -0700
commitc31f26c8f69f776759cbbdfb38e40ea91aa0dd65 (patch)
tree3a8a2ac4e7ee88d6dfde72b4b9948c4c2708db81 /drivers/net/ethernet/intel/ice/ice_txrx.c
parent3aac7ada64d8c26ccc922f1ca966043c0dae88da (diff)
bnxt: prevent skb UAF after handing over to PTP worker
When reading the timestamp is required bnxt_tx_int() hands over the ownership of the completed skb to the PTP worker. The skb should not be used afterwards, as the worker may run before the rest of our code and free the skb, leading to a use-after-free. Since dev_kfree_skb_any() accepts NULL make the loss of ownership more obvious and set skb to NULL. Fixes: 83bb623c968e ("bnxt_en: Transmit and retrieve packet timestamps") Reviewed-by: Andy Gospodarek <gospo@broadcom.com> Reviewed-by: Michael Chan <michael.chan@broadcom.com> Link: https://lore.kernel.org/r/20220921201005.335390-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_txrx.c')
0 files changed, 0 insertions, 0 deletions