Thread (3 messages) flat view 3 messages, 3 authors, 2021-10-06

Re: [PATCH net] rtnetlink: fix if_nlmsg_stats_size() under estimation

From: Roopa Prabhu <hidden>
Date: 2021-10-05 22:09:01

On 10/5/21 2:04 PM, Eric Dumazet wrote:
From: Eric Dumazet <edumazet@google.com>

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 <redacted>
---
Acked-by: Roopa Prabhu <redacted>

don't know how i missed this. Thanks for the patch Eric.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help