]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rtnetlink: extend RTEXT_FILTER_SKIP_STATS to IFLA_VF_INFO
authorEdwin Peer <edwin.peer@broadcom.com>
Sun, 11 Jun 2023 10:51:08 +0000 (13:51 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2023 06:37:10 +0000 (08:37 +0200)
commit2ba902da9090f443c5d1b54c00a1d99ab1ddd2c5
tree89767eb4929376abe008dece89b627b32be976a3
parent786e264b37d2e865d4aaf4fe6beaec694a762118
rtnetlink: extend RTEXT_FILTER_SKIP_STATS to IFLA_VF_INFO

[ Upstream commit fa0e21fa44438a0e856d42224bfa24641d37b979 ]

This filter already exists for excluding IPv6 SNMP stats. Extend its
definition to also exclude IFLA_VF_INFO stats in RTM_GETLINK.

This patch constitutes a partial fix for a netlink attribute nesting
overflow bug in IFLA_VFINFO_LIST. By excluding the stats when the
requester doesn't need them, the truncation of the VF list is avoided.

While it was technically only the stats added in commit c5a9f6f0ab40
("net/core: Add drop counters to VF statistics") breaking the camel's
back, the appreciable size of the stats data should never have been
included without due consideration for the maximum number of VFs
supported by PCI.

Fixes: 3b766cd83232 ("net/core: Add reading VF statistics through the PF netdevice")
Fixes: c5a9f6f0ab40 ("net/core: Add drop counters to VF statistics")
Signed-off-by: Edwin Peer <edwin.peer@broadcom.com>
Cc: Edwin Peer <espeer@gmail.com>
Signed-off-by: Gal Pressman <gal@nvidia.com>
Link: https://lore.kernel.org/r/20230611105108.122586-1-gal@nvidia.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/core/rtnetlink.c