linux/drivers/ntb
Koichiro Den a4f2387db6 NTB: ntb_transport: Reject oversized TX buffers
ntb_process_tx() handles an oversized buffer by calling tx_handler()
with a NULL data pointer and returning success. ntb_netdev therefore
neither frees the skb in its completion callback nor takes its enqueue
error path, leaking it.

Reject oversized buffers in ntb_transport_tx_enqueue() before acquiring
a queue entry and return -EMSGSIZE. The caller retains ownership of the
buffer, and the preceding netdev patch frees the skb when enqueue
returns this permanent error.

Fixes: fce8a7bb5b ("PCI-Express Non-Transparent Bridge Support")
Cc: stable@vger.kernel.org
Signed-off-by: Koichiro Den <den@valinux.co.jp>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20260817053519.4135287-5-den@valinux.co.jp
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-20 13:43:24 -07:00
..
hw NTB updates include an EPF bug fix to prevent an invalid unmap during 2026-06-28 07:46:12 -07:00
test kmalloc_obj treewide refactoring for v7.0-rc1 2026-02-21 11:02:58 -08:00
core.c ntb: Constify struct bus_type 2024-09-20 10:50:38 -04:00
Kconfig New feature to add support for NTB virtual MSI interrupts, the ability 2019-07-21 09:46:59 -07:00
Makefile New feature to add support for NTB virtual MSI interrupts, the ability 2019-07-21 09:46:59 -07:00
msi.c NTB/msi: Remove unused functions 2026-02-20 17:31:55 -05:00
ntb_transport.c NTB: ntb_transport: Reject oversized TX buffers 2026-08-20 13:43:24 -07:00