lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 13 Apr 2022 09:10:39 +0300 From: Ido Schimmel <idosch@...sch.org> To: Petr Machata <petrm@...dia.com> Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, Ido Schimmel <idosch@...dia.com> Subject: Re: [PATCH net] rtnetlink: Fix handling of disabled L3 stats in RTM_GETSTATS replies On Tue, Apr 12, 2022 at 10:25:06PM +0200, Petr Machata wrote: > When L3 stats are disabled, rtnl_offload_xstats_get_size_stats() returns > size of 0, which is supposed to be an indication that the corresponding > attribute should not be emitted. However, instead, the current code > reserves a 0-byte attribute. > > The reason this does not show up as a citation on a kasan kernel is that > netdev_offload_xstats_get(), which is supposed to fill in the data, never > ends up getting called, because rtnl_offload_xstats_get_stats() notices > that the stats are not actually used and skips the call. > > Thus a zero-length IFLA_OFFLOAD_XSTATS_L3_STATS attribute ends up in a > response, confusing the userspace. > > Fix by skipping the L3-stats related block in rtnl_offload_xstats_fill(). > > Fixes: 0e7788fd7622 ("net: rtnetlink: Add UAPI for obtaining L3 offload xstats") > Signed-off-by: Petr Machata <petrm@...dia.com> Reviewed-by: Ido Schimmel <idosch@...dia.com>
Powered by blists - more mailing lists