linux-stable/net/core
Thomas Weißschuh 92b8881bf7 net: avoid build bug in skb extension length calculation
commit d6e5794b06 upstream.

GCC seems to incorrectly fail to evaluate skb_ext_total_length() at
compile time under certain conditions.

The issue even occurs if all values in skb_ext_type_len[] are "0",
ruling out the possibility of an actual overflow.

As the patch has been in mainline since v6.6 without triggering the
problem it seems to be a very uncommon occurrence.

As the issue only occurs when -fno-tree-loop-im is specified as part of
CFLAGS_GCOV, disable the BUILD_BUG_ON() only when building with coverage
reporting enabled.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202312171924.4FozI5FG-lkp@intel.com/
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/lkml/487cfd35-fe68-416f-9bfd-6bb417f98304@app.fastmail.com/
Fixes: 5d21d0a65b ("net: generalize calculation of skb extensions length")
Cc: <stable@vger.kernel.org>
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20231218-net-skbuff-build-bug-v1-1-eefc2fb0a7d3@weissschuh.net
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-01 12:42:42 +00:00
..
bpf_sk_storage.c
datagram.c
dev.c net: check dev->gso_max_size in gso_features_check() 2024-01-01 12:42:33 +00:00
dev.h net: check for altname conflicts when changing netdev's netns 2023-10-19 15:51:16 +02:00
dev_addr_lists.c
dev_addr_lists_test.c
dev_ioctl.c
drop_monitor.c drop_monitor: Require 'CAP_SYS_ADMIN' when joining "events" group 2023-12-13 18:45:10 +01:00
dst.c net: remove unnecessary input parameter 'how' in ifdown function 2023-08-22 13:19:02 +02:00
dst_cache.c
failover.c
fib_notifier.c
fib_rules.c
filter.c bpf: sockmap, updating the sg structure should also update curr 2023-12-13 18:45:10 +01:00
flow_dissector.c net/core: Fix ETH_P_1588 flow dissector 2023-09-15 10:40:04 +01:00
flow_offload.c
gen_estimator.c
gen_stats.c
gro.c
gro_cells.c
gso.c
hwbm.c
link_watch.c
lwt_bpf.c lwt: Fix return values of BPF xmit ops 2023-08-18 16:05:26 +02:00
lwtunnel.c
Makefile
neighbour.c neighbour: fix various data-races 2023-10-20 17:41:29 -07:00
net-procfs.c
net-sysfs.c
net-sysfs.h
net-traces.c
net_namespace.c
netclassid_cgroup.c
netdev-genl-gen.c
netdev-genl-gen.h
netdev-genl.c
netevent.c
netpoll.c
netprio_cgroup.c
of_net.c
page_pool.c net: page_pool: add missing free_percpu when page_pool_init fail 2023-11-20 11:59:34 +01:00
pktgen.c net: pktgen: Fix interface flags printing 2023-10-18 10:12:30 +01:00
ptp_classifier.c
request_sock.c
rtnetlink.c netlink: Correct offload_xstats size 2023-10-16 17:32:59 -07:00
scm.c io_uring/af_unix: disable sending io_uring over sockets 2023-12-13 18:45:20 +01:00
secure_seq.c
selftests.c
skbuff.c net: avoid build bug in skb extension length calculation 2024-01-01 12:42:42 +00:00
skmsg.c bpf, sockmap: af_unix stream sockets need to hold ref for pair sock 2023-12-08 08:52:23 +01:00
sock.c net: annotate data-races around sk->sk_dst_pending_confirm 2023-11-28 17:19:38 +00:00
sock_destructor.h
sock_diag.c
sock_map.c bpf: syzkaller found null ptr deref in unix_bpf proto add 2024-01-01 12:42:28 +00:00
sock_reuseport.c
stream.c net: Return error from sk_stream_wait_connect() if sk_wait_event() fails 2024-01-01 12:42:30 +00:00
sysctl_net_core.c networking: Update to register_net_sysctl_sz 2023-08-15 15:26:18 -07:00
timestamping.c
tso.c
utils.c
xdp.c