[PATCH 0/2] staging: octeon: cleanups and safety fixes in ethernet-tx.c
From: Oscar Alejandro Sánchez Lucero via B4 Relay
Date: Sat Nov 07 2026 - 06:29:09 EST
This series fixes memory safety and API correctness issues found in
drivers/staging/octeon/ethernet-tx.c during static analysis:
1. Fix return types in cvm_oct_xmit_pow() to use NETDEV_TX_OK instead of
naked integer '0', and change pointers to u8 * to avoid non-standard
void pointer arithmetic warnings.
2. Add packet length validation to avoid a buffer overflow when copying
into the FPA packet pool, and bound WQE data memcpys with min_t() to
prevent out-of-bounds reads on short/malformed frames.
Signed-off-by: Oscar Alejandro Sánchez Lucero <aleszlucero@xxxxxxxxx>
---
Oscar Alejandro Sánchez Lucero (2):
staging: octeon: fix return type and void arithmetic in cvm_oct_xmit_pow()
staging: octeon: prevent buffer overflow in cvm_oct_xmit_pow()
drivers/staging/octeon/ethernet-tx.c | 34 ++++++++++++++++++++++------------
1 file changed, 22 insertions(+), 12 deletions(-)
---
base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b
change-id: 20261107-octeon-tx-fixes-bf70dea7c3d0
Best regards,
--
Oscar Alejandro Sánchez Lucero <aleszlucero@xxxxxxxxx>