]> www.infradead.org Git - users/dwmw2/linux.git/commit
net: ethtool: correct MAX attribute value for stats
authorJakub Kicinski <kuba@kernel.org>
Thu, 8 Jun 2023 16:23:44 +0000 (09:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Jun 2023 14:02:15 +0000 (16:02 +0200)
commit1ce8b510a6c6073baceb7a38ba98d1d1e0f8c7cb
treef27f863e33157bbadf642868536636f388f32c81
parent2f884e6df67347301e51e6be5ad4b61cc8989114
net: ethtool: correct MAX attribute value for stats

[ Upstream commit 52f79609c0c5b25fddb88e85f25ce08aa7e3fb42 ]

When compiling YNL generated code compiler complains about
array-initializer-out-of-bounds. Turns out the MAX value
for STATS_GRP uses the value for STATS.

This may lead to random corruptions in user space (kernel
itself doesn't use this value as it never parses stats).

Fixes: f09ea6fb1272 ("ethtool: add a new command for reading standard stats")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/uapi/linux/ethtool_netlink.h