Loading
net: hns3: void array out of bound when loop tnl_num
maillist inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IAN3KC CVE: NA Reference: https://lore.kernel.org/all/20240813141024.1707252-5-shaojijie@huawei.com/ ---------------------------------------------------------------------- When query reg inf of SSU, it loops tnl_num times. However, tnl_num comes from hardware and the length of array is a fixed value. To void array out of bound, make sure the loop time is not greater than the length of array Fixes: 48c6a9ff ("net: hns3: dump more reg info based on ras mod") Signed-off-by:Peiyang Wang <wangpeiyang1@huawei.com> Signed-off-by:
Jijie Shao <shaojijie@huawei.com> Signed-off-by:
Paolo Abeni <pabeni@redhat.com>