linux/drivers/net/ethernet/broadcom
Jakub Kicinski c31f26c8f6 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: 83bb623c96 ("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>
2022-09-22 07:33:17 -07:00
..
bnx2x bnx2x: Fix comment typo 2022-08-12 11:28:19 +01:00
bnxt bnxt: prevent skb UAF after handing over to PTP worker 2022-09-22 07:33:17 -07:00
genet net: bcmgenet: Indicate MAC is in charge of PHY PM 2022-08-05 19:02:18 -07:00
b44.c ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
b44.h
bcm63xx_enet.c bcm63xx: fix Tx cleanup when NAPI poll budget is zero 2022-07-11 11:36:32 -07:00
bcm63xx_enet.h bcm63xx_enet: convert to build_skb 2021-01-07 12:39:53 -08:00
bcm4908_enet.c net: switch to netif_napi_add_tx() 2022-05-05 15:54:12 -07:00
bcm4908_enet.h net: broadcom: rename BCM4908 driver & update DT binding 2021-02-11 15:04:17 -08:00
bcmsysport.c Bitmap patches for 5.19-rc1 2022-06-04 14:04:27 -07:00
bcmsysport.h net: systemport: Add global locking for descriptor lifecycle 2021-12-16 08:15:31 -08:00
bgmac-bcma-mdio.c net: ethernet: bgmac: Fix refcount leak in bcma_mdio_mii_register 2022-06-06 14:38:15 -07:00
bgmac-bcma.c net: bgmac: Fix an erroneous kfree() in bgmac_remove() 2022-06-14 19:16:36 -07:00
bgmac-platform.c Revert "net: ethernet: bgmac: Use devm_platform_ioremap_resource_byname" 2022-02-17 08:45:34 -08:00
bgmac.c net: bgmac: Fix a BUG triggered by wrong bytes_compl 2022-08-09 12:15:44 -07:00
bgmac.h net: bgmac: remove a copy of the NAPI_POLL_WEIGHT define 2022-04-29 11:56:41 +01:00
bnx2_fw.h
bnx2.c bnx2: Fix an error message 2022-03-03 14:48:40 +00:00
bnx2.h
cnic_defs.h
cnic_if.h
cnic.c cnic: Use the bitmap API to allocate bitmaps 2022-07-06 19:55:04 -07:00
cnic.h
Kconfig ethernet: fix PTP_1588_CLOCK dependencies 2021-08-13 17:49:05 -07:00
Makefile eth: tg3: silence the GCC 12 array-bounds warning 2022-05-22 22:21:11 +01:00
sb1250-mac.c eth: switch to netif_napi_add_weight() 2022-05-08 11:33:57 +01:00
tg3.c tg3: Disable tg3 device on system reboot to avoid triggering AER 2022-08-26 18:33:26 -07:00
tg3.h tg3: Read VPD with pci_vpd_alloc() 2021-08-20 15:49:00 -05:00
unimac.h net: broadcom: share header defining UniMAC registers 2021-01-08 19:17:28 -08:00