linux-yocto/net/ipv6
Ido Schimmel d2507aeea4 seg6: Fix validation of nexthop addresses
[ Upstream commit 7632fedb266d93ed0ed9f487133e6c6314a9b2d1 ]

The kernel currently validates that the length of the provided nexthop
address does not exceed the specified length. This can lead to the
kernel reading uninitialized memory if user space provided a shorter
length than the specified one.

Fix by validating that the provided length exactly matches the specified
one.

Fixes: d1df6fd8a1 ("ipv6: sr: define core operations for seg6local lightweight tunnel")
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20250604113252.371528-1-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-19 15:28:35 +02:00
..
ila net: ipv6: fix missing dst ref drop in ila lwtunnel 2025-03-13 12:58:32 +01:00
netfilter netfilter: nf_tables: nft_fib_ipv6: fix VRF ipv4/ipv6 result discrepancy 2025-06-19 15:28:17 +02:00
addrconf_core.c ipv6: Ensure natural alignment of const ipv6 loopback and router addresses 2024-02-05 20:14:36 +00:00
addrconf.c gre: Fix again IPv6 link-local address generation. 2025-05-18 08:24:04 +02:00
addrlabel.c ipv6: addrlabel: fix infoleak when sending struct ifaddrlblmsg to network 2022-11-07 12:26:15 +00:00
af_inet6.c net: inet6: do not leave a dangling sk pointer in inet6_create() 2024-12-14 20:00:04 +01:00
ah6.c net: ipv6: Remove completion function scaffolding 2023-02-13 18:35:15 +08:00
anycast.c IPv6: add extack info for IPv6 address add/delete 2023-07-28 11:01:56 +01:00
calipso.c netlabel: Fix NULL pointer exception caused by CALIPSO on IPv4 sockets 2025-04-10 14:37:39 +02:00
datagram.c inet: introduce inet->inet_flags 2023-08-16 11:09:16 +01:00
esp6_offload.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-06-22 18:40:38 -07:00
esp6.c espintcp: remove encap socket caching to avoid reference leak 2025-06-04 14:42:17 +02:00
exthdrs_core.c ipv6: Fix out-of-bounds access in ipv6_find_tlv() 2023-05-24 08:43:39 +01:00
exthdrs_offload.c
exthdrs.c Fix write to cloned skb in ipv6_hop_ioam() 2024-03-01 13:35:10 +01:00
fib6_notifier.c
fib6_rules.c ip: fib_rules: Fetch net from fib_rule in fib[46]_rule_configure(). 2025-06-04 14:42:11 +02:00
fou6.c
icmp.c ipv6: icmp: convert to dev_net_rcu() 2025-02-21 13:57:21 +01:00
inet6_connection_sock.c net: annotate lockless accesses to sk->sk_err_soft 2023-03-17 08:25:05 +00:00
inet6_hashtables.c net: remove duplicate INDIRECT_CALLABLE_DECLARE of udp[6]_ehashfn 2023-07-31 13:53:10 -07:00
ioam6_iptunnel.c ipv6: ioam: block BH from ioam6_output() 2024-06-21 14:38:15 +02:00
ioam6.c
ip6_checksum.c
ip6_fib.c ipv6: Fix soft lockups in fib6_select_path under high next hop churn 2025-02-01 18:37:52 +01:00
ip6_flowlabel.c ipv6: flowlabel: do not disable BH where not needed 2023-03-21 21:32:18 -07:00
ip6_gre.c net: add netdev_lockdep_set_classes() to virtual drivers 2024-04-13 13:07:30 +02:00
ip6_icmp.c
ip6_input.c ipv6: annotate data-races around cnf.disable_ipv6 2024-05-17 12:02:24 +02:00
ip6_offload.c net: gro: fix udp bad offset in socket lookup by adding {inner_}network_offset to napi_gro_cb 2024-05-17 12:02:07 +02:00
ip6_offload.h
ip6_output.c ipv6: save dontfrag in cork 2025-06-04 14:42:00 +02:00
ip6_tunnel.c ipv4: Convert ip_route_input() to dscp_t. 2025-03-07 16:45:39 +01:00
ip6_udp_tunnel.c
ip6_vti.c net: add netdev_lockdep_set_classes() to virtual drivers 2024-04-13 13:07:30 +02:00
ip6mr.c inet: ipmr: fix data-races 2025-02-08 09:52:02 +01:00
ipcomp6.c xfrm: ipcomp: add extack to ipcomp{4,6}_init_state 2022-09-29 07:18:00 +02:00
ipv6_sockglue.c net: use unrcu_pointer() helper 2024-12-09 10:32:10 +01:00
Kconfig net: ipv6: select DST_CACHE from IPV6_RPL_LWTUNNEL 2024-10-04 16:29:41 +02:00
Makefile
mcast_snoop.c
mcast.c ipv6: mcast: add RCU protection to mld_newpack() 2025-02-21 13:57:24 +01:00
mip6.c xfrm: mip6: add extack to mip6_destopt_init_state, mip6_rthdr_init_state 2022-09-29 07:18:01 +02:00
ndisc.c ndisc: extend RCU protection in ndisc_send_skb() 2025-02-21 13:57:24 +01:00
netfilter.c netfilter: bridge: Move specific fragmented packet to slow_path instead of dropping it 2025-06-19 15:28:13 +02:00
output_core.c treewide: use get_random_u32_{above,below}() instead of manual loop 2022-11-18 02:15:22 +01:00
ping.c ipv6: introduce dst_rt6_info() helper 2024-12-14 19:59:35 +01:00
proc.c net: fix IPSTATS_MIB_OUTPKGS increment in OutForwDatagrams. 2024-04-03 15:28:39 +02:00
protocol.c
raw.c ipv6: introduce dst_rt6_info() helper 2024-12-14 19:59:35 +01:00
reassembly.c net: Rename mono_delivery_time to tstamp_type for scalabilty 2025-05-09 09:43:57 +02:00
route.c ipv6: Align behavior across nexthops during path selection 2025-04-25 10:45:09 +02:00
rpl_iptunnel.c net: ipv6: fix dst ref loop on input in rpl lwt 2025-03-07 16:45:42 +01:00
rpl.c ipv6: rpl: Remove pskb(_may)?_pull() in ipv6_rpl_srh_rcv(). 2023-06-19 11:32:58 -07:00
seg6_hmac.c ipv6: sr: fix memleak in seg6_hmac_init_algo 2024-06-12 11:12:48 +02:00
seg6_iptunnel.c net: ipv6: fix dst ref loop on input in seg6 lwt 2025-03-07 16:45:42 +01:00
seg6_local.c seg6: Fix validation of nexthop addresses 2025-06-19 15:28:35 +02:00
seg6.c ipv6: sr: fix invalid unregister error path 2024-06-12 11:11:53 +02:00
sit.c net: add netdev_lockdep_set_classes() to virtual drivers 2024-04-13 13:07:30 +02:00
syncookies.c tcp: annotate data-races around tp->window_clamp 2024-08-11 12:47:19 +02:00
sysctl_net_ipv6.c networking: Update to register_net_sysctl_sz 2023-08-15 15:26:18 -07:00
tcp_ipv6.c net: Rename mono_delivery_time to tstamp_type for scalabilty 2025-05-09 09:43:57 +02:00
tcpv6_offload.c net: Make gro complete function to return void 2023-05-31 09:50:17 +01:00
tunnel6.c
udp_impl.h tcp/udp: Call inet6_destroy_sock() in IPv6 sk->sk_destruct(). 2022-10-12 17:50:37 -07:00
udp_offload.c net: gro: fix udp bad offset in socket lookup by adding {inner_}network_offset to napi_gro_cb 2024-05-17 12:02:07 +02:00
udp.c udp: gso: do not drop small packets when PMTU reduces 2025-02-17 09:40:12 +01:00
udplite.c udplite: remove UDPLITE_BIT 2023-11-20 11:58:56 +01:00
xfrm6_input.c xfrm: Preserve vlan tags for transport mode software GRO 2024-05-17 12:02:20 +02:00
xfrm6_output.c
xfrm6_policy.c ipv6: introduce dst_rt6_info() helper 2024-12-14 19:59:35 +01:00
xfrm6_protocol.c
xfrm6_state.c
xfrm6_tunnel.c xfrm: tunnel: add extack to ipip_init_state, xfrm6_tunnel_init_state 2022-09-29 07:18:00 +02:00