diff mbox series

Fix buffer overflow in hinic_devlink.c:hinic_flash_fw

Message ID 20220616235743.36564-1-huzh@nyu.edu (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series Fix buffer overflow in hinic_devlink.c:hinic_flash_fw | expand

Checks

Context Check Description
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 11 this patch: 11
netdev/cc_maintainers warning 4 maintainers not CCed: davem@davemloft.net pabeni@redhat.com kuba@kernel.org edumazet@google.com
netdev/build_clang success Errors and warnings before: 4 this patch: 4
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff fail author Signed-off-by missing
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 11 this patch: 11
netdev/checkpatch warning WARNING: Missing commit description - Add an appropriate one
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Zhenghao Hu June 16, 2022, 11:57 p.m. UTC
---
 drivers/net/ethernet/huawei/hinic/hinic_port.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/huawei/hinic/hinic_port.h b/drivers/net/ethernet/huawei/hinic/hinic_port.h
index c9ae3d4dc547..4a50e75a2424 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_port.h
+++ b/drivers/net/ethernet/huawei/hinic/hinic_port.h
@@ -13,6 +13,7 @@ 
 #include <linux/bitops.h>
 
 #include "hinic_dev.h"
+#include "hinic_devlink.h"
 
 #define HINIC_RSS_KEY_SIZE	40
 #define HINIC_RSS_INDIR_SIZE	256
@@ -751,7 +752,7 @@  struct hinic_cmd_update_fw {
 	u32 setion_total_len;
 	u32 fw_section_version;
 	u32 section_offset;
-	u32 data[384];
+	u32 data[MAX_FW_FRAGMENT_LEN];
 };
 
 int hinic_port_add_mac(struct hinic_dev *nic_dev, const u8 *addr,