[PATCH v4 0/3] Address NBL Coverity issues
Dimon Zhao
dimon.zhao at nebula-matrix.com
Wed Feb 4 04:07:19 CET 2026
Address multiple issues reported by Coverity static analysis:
Check return values of ioctl() calls for NBL_DEV_USER_GET_BAR_SIZE
and NBL_DEV_USER_CLEAR_EVENTFD. The original code tested the return
value without capturing it from the ioctl call.
Move debug log statement after NULL pointer validation in
nbl_dev_configure() to prevent dereference of adapter before the
check.
Cast u16 operands to u64 before multiplication when calculating
buffer sizes and offsets to prevent potential integer overflow.
The num_txq_entries, num_rxq_entries, txq_buf_size, and rxq_buf_size
fields are all u16 types, and their product could overflow before
assignment to size_t or u64 destination variables.
Dimon Zhao (3):
net/nbl: fix integer handling issues
net/nbl: fix null pointer dereferences issues
net/nbl: fix error handling issues
drivers/net/nbl/nbl_common/nbl_userdev.c | 25 ++++++++++++++----------
drivers/net/nbl/nbl_dev/nbl_dev.c | 4 ++--
drivers/net/nbl/nbl_hw/nbl_channel.c | 17 ++++++++--------
3 files changed, 26 insertions(+), 20 deletions(-)
--
2.34.1
More information about the dev
mailing list