linux/drivers/net/ethernet/meta/fbnic
Jakub Kicinski 62b68b774f eth: fbnic: don't cache shinfo across skb realloc
fbnic_tx_lso() calls skb_cow_head() which may reallocate the skb
including the shared info. We can't use the pointer calculated
before the call.

    BUG: KASAN: slab-use-after-free in fbnic_tx_lso.isra.0+0x668/0x8e0
    Read of size 4 at addr ff110000262edd98 by task swapper/5/0
    Call Trace:
     fbnic_tx_lso.isra.0+0x668/0x8e0
     fbnic_xmit_frame+0x622/0xba0
     dev_hard_start_xmit+0xf4/0x620

    Allocated by task 8653:
     __alloc_skb+0x11e/0x5f0
     alloc_skb_with_frags+0xcc/0x6c0
     sock_alloc_send_pskb+0x327/0x3f0
     __ip_append_data+0x188b/0x47a0
     ip_make_skb+0x24a/0x300
     udp_sendmsg+0x14d2/0x21e0

    Freed by task 0:
     kfree+0x123/0x5a0
     pskb_expand_head+0x36c/0xfa0
     fbnic_tx_lso.isra.0+0x500/0x8e0
     fbnic_xmit_frame+0x622/0xba0
     dev_hard_start_xmit+0xf4/0x620
     sch_direct_xmit+0x25b/0x1100

    The buggy address belongs to the object at ff110000262edc40
     which belongs to the cache skbuff_small_head of size 640
    The buggy address is located 344 bytes inside of
     freed 640-byte region [ff110000262edc40, ff110000262ede

Link: https://netdev.bots.linux.dev/logs/vmksft/fbnic-qemu-dbg/results/705762/15-uso-py/stderr
Fixes: b0b0f52042 ("eth: fbnic: support TCP segmentation offload")
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
Link: https://patch.msgid.link/20260625160508.3327986-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-06-29 17:29:15 -07:00
..
fbnic_csr.c eth fbnic: Add register self test 2026-03-10 13:53:53 +01:00
fbnic_csr.h net: eth: fbnic: Add pma read and write access 2026-05-05 14:40:39 +02:00
fbnic_debugfs.c eth: fbnic: Fix debugfs output for BDQ's with page frags 2026-03-27 20:30:23 -07:00
fbnic_devlink.c fbnic: Set Relaxed Ordering PCIe TLP attributes for DMA engines 2026-03-31 16:05:19 +02:00
fbnic_drvinfo.h
fbnic_ethtool.c net: ethtool: keep rtnl_lock for ops using ethtool_op_get_link() 2026-06-25 10:18:34 -07:00
fbnic_fw_log.c fbnic: close fw_log race between users and teardown 2026-02-13 12:30:28 -08:00
fbnic_fw_log.h eth: fbnic: make fbnic_fw_log_write() parameter const 2025-09-18 11:37:23 +02:00
fbnic_fw.c eth: fbnic: fix ordering of heartbeat vs ownership 2026-06-23 19:53:13 -07:00
fbnic_fw.h eth fbnic: Add mailbox self test 2026-03-10 13:53:53 +01:00
fbnic_hw_stats.c eth: fbnic: Add pause stats support 2025-08-27 18:56:19 -07:00
fbnic_hw_stats.h eth: fbnic: Fetch TX pause storm stats 2026-03-05 16:26:52 +01:00
fbnic_hwmon.c eth: fbnic: Add hardware monitoring support via HWMON interface 2025-01-15 14:14:11 -08:00
fbnic_irq.c eth fbnic: Add msix self test 2026-03-10 13:53:53 +01:00
fbnic_mac.c eth: fbnic: Fetch TX pause storm stats 2026-03-05 16:26:52 +01:00
fbnic_mac.h eth: fbnic: Add protection against pause storm 2026-03-05 16:26:52 +01:00
fbnic_mdio.c net: eth: fbnic: Fix addr validation in pcs write 2026-05-10 10:09:13 -07:00
fbnic_netdev.c eth: fbnic: take netif_addr_lock_bh() around rx mode address programming 2026-06-18 18:36:26 -07:00
fbnic_netdev.h fbnic: convert to ndo_set_rx_mode_async 2026-04-21 12:50:24 +02:00
fbnic_pci.c eth: fbnic: take netif_addr_lock_bh() around rx mode address programming 2026-06-18 18:36:26 -07:00
fbnic_phylink.c fbnic: Replace use of internal PCS w/ Designware XPCS 2025-11-27 10:41:31 +01:00
fbnic_rpc.c eth: fbnic: take netif_addr_lock_bh() around rx mode address programming 2026-06-18 18:36:26 -07:00
fbnic_rpc.h fbnic: Add logic to repopulate RPC TCAM if BMC enables channel 2025-08-28 14:51:07 +02:00
fbnic_time.c eth: fbnic: fix various typos in comments and strings 2025-10-14 12:16:17 -07:00
fbnic_tlv.c eth fbnic: TLV support for use by MBX self test 2026-03-10 13:53:53 +01:00
fbnic_tlv.h eth fbnic: TLV support for use by MBX self test 2026-03-10 13:53:53 +01:00
fbnic_txrx.c eth: fbnic: don't cache shinfo across skb realloc 2026-06-29 17:29:15 -07:00
fbnic_txrx.h eth: fbnic: Increase FBNIC_QUEUE_SIZE_MIN to 64 2026-04-02 08:38:34 -07:00
fbnic.h fbnic: Set Relaxed Ordering PCIe TLP attributes for DMA engines 2026-03-31 16:05:19 +02:00
Makefile fbnic: Add SW shim for MDIO interface to PMD and PCS 2025-11-27 10:41:31 +01:00