android_kernel_xiaomi_sm8350/net/core
Eric Dumazet d83787c26d 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: 10c9ead9f3 ("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>
2021-10-13 10:08:20 +02:00
..
bpf_sk_storage.c
datagram.c
datagram.h
dev_addr_lists.c
dev_ioctl.c
dev.c net: Treat __napi_schedule_irqoff() as __napi_schedule() on PREEMPT_RT 2021-07-19 08:53:08 +02:00
devlink.c
drop_monitor.c
dst_cache.c
dst.c
ethtool.c net: ethtool: clear heap allocations for ethtool function 2021-06-30 08:47:47 -04:00
failover.c
fib_notifier.c
fib_rules.c fib: Return the correct errno code 2021-06-18 09:59:00 +02:00
filter.c bpf: Do not change gso_size during bpf_skb_change_proto() 2021-07-14 16:53:32 +02:00
flow_dissector.c flow_dissector: Fix out-of-bounds warnings 2021-09-22 12:26:29 +02:00
flow_offload.c
gen_estimator.c
gen_stats.c
gro_cells.c
hwbm.c
link_watch.c net: linkwatch: fix failure to restore device state across suspend/resume 2021-08-18 08:57:00 +02:00
lwt_bpf.c
lwtunnel.c
Makefile
neighbour.c neighbour: allow NUD_NOARP entries to be forced GCed 2021-06-10 13:37:16 +02:00
net_namespace.c netns: protect netns ID lookups with RCU 2021-09-15 09:47:31 +02:00
net-procfs.c
net-sysfs.c
net-sysfs.h
net-traces.c
netclassid_cgroup.c
netevent.c
netpoll.c
netprio_cgroup.c
page_pool.c mm: fix struct page layout on 32-bit systems 2021-05-19 10:08:31 +02:00
pktgen.c pktgen: fix misuse of BUG_ON() in pktgen_thread_worker() 2021-03-07 12:20:44 +01:00
ptp_classifier.c
request_sock.c
rtnetlink.c rtnetlink: fix if_nlmsg_stats_size() under estimation 2021-10-13 10:08:20 +02:00
scm.c
secure_seq.c
skbuff.c net: Fix zero-copy head len calculation. 2021-08-08 09:04:08 +02:00
skmsg.c
sock_diag.c
sock_map.c
sock_reuseport.c
sock.c af_unix: fix races in sk_peer_pid and sk_peer_cred accesses 2021-10-06 15:42:35 +02:00
stream.c
sysctl_net_core.c
timestamping.c
tso.c
utils.c
xdp.c