Loading
net: hns3: fix out-of-bounds access may occur when coalesce info is read via debugfs
mainline inclusion from mainline-v6.7-rc2 commit 53aba458f23846112c0d44239580ff59bc5c36c3 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9RFNY CVE: CVE-2023-52807 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=53aba458f23846112c0d44239580ff59bc5c36c3 -------------------------------- The hns3 driver define an array of string to show the coalesce info, but if the kernel adds a new mode or a new state, out-of-bounds access may occur when coalesce info is read via debugfs, this patch fix the problem. Fixes: c99fead7 ("net: hns3: add debugfs support for interrupt coalesce") Signed-off-by:Yonglong Liu <liuyonglong@huawei.com> Signed-off-by:
Jijie Shao <shaojijie@huawei.com> Signed-off-by:
David S. Miller <davem@davemloft.net> Signed-off-by:
Wei Li <liwei391@huawei.com>