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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1f9eac11-cf42-68a4-632d-ce39677d9aac@nvidia.com>
Date:   Tue, 5 Oct 2021 12:04:11 +0300
From:   Nikolay Aleksandrov <nikolay@...dia.com>
To:     Eric Dumazet <eric.dumazet@...il.com>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Cc:     netdev <netdev@...r.kernel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        Vivien Didelot <vivien.didelot@...il.com>
Subject: Re: [PATCH net 2/2] net: bridge: fix under estimation in
 br_get_linkxstats_size()

On 05/10/2021 04:05, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@...gle.com>
> 
> Commit de1799667b00 ("net: bridge: add STP xstats")
> added an additional nla_reserve_64bit() in br_fill_linkxstats(),
> but forgot to update br_get_linkxstats_size() accordingly.
> 
> This can trigger the following in rtnl_stats_get()
> 
> 	WARN_ON(err == -EMSGSIZE);
> 
> Fixes: de1799667b00 ("net: bridge: add STP xstats")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Cc: Vivien Didelot <vivien.didelot@...il.com>
> Cc: Nikolay Aleksandrov <nikolay@...dia.com>
> ---
>  net/bridge/br_netlink.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
> index 29b8f6373fb925d48ce876dcda7fccc10539240a..5c6c4305ed235891b2ed5c5a17eb8382f2aec1a0 100644
> --- a/net/bridge/br_netlink.c
> +++ b/net/bridge/br_netlink.c
> @@ -1667,6 +1667,7 @@ static size_t br_get_linkxstats_size(const struct net_device *dev, int attr)
>  
>  	return numvls * nla_total_size(sizeof(struct bridge_vlan_xstats)) +
>  	       nla_total_size_64bit(sizeof(struct br_mcast_stats)) +
> +	       (p ? nla_total_size_64bit(sizeof(p->stp_xstats)) : 0) +
>  	       nla_total_size(0);
>  }
>  
> 

Acked-by: Nikolay Aleksandrov <nikolay@...dia.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ