netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] Fix buffer overflow in hinic_devlink.c:hinic_flash_fw
@ 2022-06-17  5:01 HighW4y2H3ll
  2022-06-18  3:01 ` Jakub Kicinski
  2022-06-27 16:15 ` kernel test robot
  0 siblings, 2 replies; 4+ messages in thread
From: HighW4y2H3ll @ 2022-06-17  5:01 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: HighW4y2H3ll, netdev, linux-kernel

Signed-off-by: zhenghao hu <huzh@nyu.edu>
---
 drivers/net/ethernet/huawei/hinic/hinic_port.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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,
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-06-27 17:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-17  5:01 [PATCH v2] Fix buffer overflow in hinic_devlink.c:hinic_flash_fw HighW4y2H3ll
2022-06-18  3:01 ` Jakub Kicinski
2022-06-27 16:15 ` kernel test robot
2022-06-27 17:19   ` Zhenghao Hu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).