summaryrefslogtreecommitdiff
path: root/net/unix/sysctl_net_unix.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2021-10-05 14:04:17 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-10-13 10:08:20 +0200
commitd83787c26d211735496b0325df08cd4830afea6d (patch)
tree5c5b69c0c38f6c27ea415f1585d2cb2edab7fe4a /net/unix/sysctl_net_unix.c
parent0311d9775390a75a60658ab865ba5f80b763ea4c (diff)
rtnetlink: fix if_nlmsg_stats_size() under estimation
[ Upstream commit d34367991933d28bd7331f67a759be9a8c474014 ] rtnl_fill_statsinfo() is filling skb with one mandatory if_stats_msg structure. nlmsg_put(skb, pid, seq, type, sizeof(struct if_stats_msg), flags); But if_nlmsg_stats_size() never considered the needed storage. This bug did not show up because alloc_skb(X) allocates skb with extra tailroom, because of added alignments. This could very well be changed in the future to have deterministic behavior. Fixes: 10c9ead9f3c6 ("rtnetlink: add new RTM_GETSTATS message to dump link stats") Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Roopa Prabhu <roopa@nvidia.com> Acked-by: Roopa Prabhu <roopa@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions