linux/net/ipv6
Maciej Żenczykowski 97a4f78fea ipv6: fix ndisc_is_useropt() handling for PIO
[ Upstream commit a46c68debf ]

The current logic only works if the PIO is between two
other ND user options.  This fixes it so that the PIO
can also be either before or after other ND user options
(for example the first or last option in the RA).

side note: there's actually Android tests verifying
a portion of the old broken behaviour, so:
  https://android-review.googlesource.com/c/kernel/tests/+/3196704
fixes those up.

Cc: Jen Linkova <furry@google.com>
Cc: Lorenzo Colitti <lorenzo@google.com>
Cc: Patrick Rohr <prohr@google.com>
Cc: David Ahern <dsahern@kernel.org>
Cc: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
Cc: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Fixes: 048c796beb ("ipv6: adjust ndisc_is_useropt() to also return true for PIO")
Link: https://patch.msgid.link/20240730001748.147636-1-maze@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-19 05:32:09 +02:00
..
ila ila: block BH in ila_output() 2024-07-27 10:33:41 +02:00
netfilter treewide: Remove uninitialized_var() usage 2023-08-11 11:45:01 +02:00
addrconf_core.c ipv6: Ensure natural alignment of const ipv6 loopback and router addresses 2024-02-23 08:12:52 +01:00
addrconf.c ipv6: take care of scope when choosing the src addr 2024-08-19 05:32:02 +02:00
addrlabel.c ipv6: addrlabel: fix infoleak when sending struct ifaddrlblmsg to network 2022-11-25 17:40:17 +01:00
af_inet6.c ipv6: annotate some data-races around sk->sk_prot 2024-07-05 09:00:35 +02:00
ah6.c ah6: fix error return code in ah6_input() 2020-11-24 13:27:15 +01:00
anycast.c ipv6: fix memory leaks on IPV6_ADDRFORM path 2020-08-11 15:32:34 +02:00
calipso.c cipso,calipso: resolve a number of problems with the DOI refcounts 2021-03-17 16:43:44 +01:00
datagram.c ipv6: Fix datagram socket connection with DSCP. 2023-02-22 12:47:21 +01:00
esp6_offload.c xfrm: Linearize the skb after offloading if needed. 2023-06-28 10:15:29 +02:00
esp6.c net: ipv6: fix return value check in esp_remove_trailer 2023-10-25 11:16:45 +02:00
exthdrs_core.c ipv6: Fix out-of-bounds access in ipv6_find_tlv() 2023-05-30 12:42:14 +01:00
exthdrs_offload.c
exthdrs.c ipv6: fix out-of-bound access in ip6_parse_tlv() 2021-07-20 16:15:52 +02:00
fib6_notifier.c
fib6_rules.c ipv6: fib6_rules: avoid possible NULL dereference in fib6_rule_action() 2024-05-17 11:42:42 +02:00
fou6.c
icmp.c icmp6: Fix null-ptr-deref of ip6_null_entry->rt6i_idev in icmp6_dev(). 2023-08-11 11:45:18 +02:00
inet6_connection_sock.c net: ipv6: add net argument to ip6_dst_lookup_flow 2020-04-29 16:31:16 +02:00
inet6_hashtables.c secure_seq: use the 64 bits of the siphash for port offset calculation 2022-06-06 08:24:20 +02:00
ip6_checksum.c net: udp: fix handling of CHECKSUM_COMPLETE packets 2018-11-04 14:50:51 +01:00
ip6_fib.c ipv6: fib: hide unused 'pn' variable 2024-05-02 16:17:08 +02:00
ip6_flowlabel.c treewide: Remove uninitialized_var() usage 2023-08-11 11:45:01 +02:00
ip6_gre.c erspan: make sure erspan_base_hdr is present in skb->head 2024-04-13 12:50:14 +02:00
ip6_icmp.c net: icmp: pass zeroed opts from icmp{,v6}_ndo_send before sending 2021-03-04 09:39:59 +01:00
ip6_input.c tcp/udp: Make early_demux back namespacified. 2022-11-10 17:46:54 +01:00
ip6_offload.c gso: do not skip outer ip header in case of ipip and net_failover 2022-03-02 11:38:12 +01:00
ip6_offload.h
ip6_output.c ipv6: avoid atomic fragment on GSO packets 2023-11-20 10:29:17 +01:00
ip6_tunnel.c ip6_tunnel: fix NEXTHDR_FRAGMENT handling in ip6_tnl_parse_tlv_enc_lim() 2024-01-25 14:33:35 -08:00
ip6_udp_tunnel.c ipv6: explicitly initialize udp6_addr in udp_sock_create6() 2019-01-09 17:38:31 +01:00
ip6_vti.c ip6_vti: fix slab-use-after-free in decode_session6 2023-08-30 16:31:48 +02:00
ip6mr.c ip6mr: Fix skb_under_panic in ip6mr_cache_report() 2023-08-11 11:45:37 +02:00
ipcomp6.c
ipv6_sockglue.c tcp: Fix data races around icsk->icsk_af_ops. 2024-07-05 09:00:35 +02:00
Kconfig net: ipv6: fix kconfig dependency warning for IPV6_SEG6_HMAC 2020-09-26 18:01:29 +02:00
Makefile
mcast_snoop.c
mcast.c mld: fix panic in mld_newpack() 2021-06-03 08:38:11 +02:00
mip6.c
ndisc.c ipv6: fix ndisc_is_useropt() handling for PIO 2024-08-19 05:32:09 +02:00
netfilter.c netfilter: use actual socket sk rather than skb sk when routing harder 2020-11-18 19:18:44 +01:00
output_core.c ipv6: use prandom_u32() for ID generation 2021-07-20 16:16:00 +02:00
ping.c ping6: Fix send to link-local addresses with VRF. 2023-06-21 15:39:58 +02:00
proc.c
protocol.c
raw.c ipv{4,6}/raw: fix output xfrm lookup wrt protocol 2023-06-09 10:23:54 +02:00
reassembly.c vrf: Increment Icmp6InMsgs on the original netdev 2023-08-11 11:45:18 +02:00
route.c ipv6: prevent possible NULL dereference in rt6_probe() 2024-07-05 09:00:28 +02:00
seg6_hmac.c ipv6: sr: fix memleak in seg6_hmac_init_algo 2024-06-16 13:23:35 +02:00
seg6_iptunnel.c ipv6: sr: block BH in seg6_output_core() and seg6_input_core() 2024-07-05 09:00:20 +02:00
seg6_local.c seg6: fix skb checksum in SRv6 End.B6 and End.B6.Encaps behaviors 2022-07-21 21:09:29 +02:00
seg6.c ipv6: sr: fix invalid unregister error path 2024-06-16 13:23:29 +02:00
sit.c sit: update dev->needed_headroom in ipip6_tunnel_bind_dev() 2023-05-17 11:13:23 +02:00
syncookies.c dccp/tcp: Call security_inet_conn_request() after setting IPv6 addresses. 2023-11-20 10:29:21 +01:00
sysctl_net_ipv6.c
tcp_ipv6.c tcp: Fix data races around icsk->icsk_af_ops. 2024-07-05 09:00:35 +02:00
tcpv6_offload.c
tunnel6.c
udp_impl.h tcp/udp: Call inet6_destroy_sock() in IPv6 sk->sk_destruct(). 2023-04-26 11:21:52 +02:00
udp_offload.c
udp.c udp: preserve the connected status if only UDP cmsg 2024-05-02 16:17:14 +02:00
udplite.c udplite: Fix NULL pointer dereference in __sk_mem_raise_allocated(). 2023-05-30 12:42:14 +01:00
xfrm6_input.c
xfrm6_mode_beet.c
xfrm6_mode_ro.c
xfrm6_mode_transport.c
xfrm6_mode_tunnel.c
xfrm6_output.c xfrm: fix tunnel model fragmentation behavior 2022-04-15 14:14:36 +02:00
xfrm6_policy.c xfrm6: check ip6_dst_idev() return value in xfrm6_get_saddr() 2024-07-05 09:00:28 +02:00
xfrm6_protocol.c
xfrm6_state.c
xfrm6_tunnel.c xfrm: clean up xfrm protocol checks 2019-05-25 18:23:41 +02:00