android_kernel_motorola_sm6375/net/ipv6
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ahmed Abdelsalam 86527f07f5
UPSTREAM: seg6: fix seg6_validate_srh() to avoid slab-out-of-bounds
The seg6_validate_srh() is used to validate SRH for three cases:

case1: SRH of data-plane SRv6 packets to be processed by the Linux kernel.
Case2: SRH of the netlink message received  from user-space (iproute2)
Case3: SRH injected into packets through setsockopt

In case1, the SRH can be encoded in the Reduced way (i.e., first SID is
carried in DA only and not represented as SID in the SRH) and the
seg6_validate_srh() now handles this case correctly.

In case2 and case3, the SRH shouldn’t be encoded in the Reduced way
otherwise we lose the first segment (i.e., the first hop).

The current implementation of the seg6_validate_srh() allow SRH of case2
and case3 to be encoded in the Reduced way. This leads a slab-out-of-bounds
problem.

This patch verifies SRH of case1, case2 and case3. Allowing case1 to be
reduced while preventing SRH of case2 and case3 from being reduced .

Reported-by: syzbot+e8c028b62439eac42073@syzkaller.appspotmail.com
Reported-by: YueHaibing <yuehaibing@huawei.com>
Fixes: 0cb7498f234e ("seg6: fix SRH processing to comply with RFC8754")
Change-Id: I2917c075b16c8887f80f74f380e2f26b12d1c19c
Signed-off-by: Ahmed Abdelsalam <ahabdels@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2026-01-14 17:48:10 -08:00
..
ila net: ipv6: fix missing dst ref drop in ila lwtunnel 2025-03-13 12:43:30 +01:00
netfilter This is the 5.4.295 stable release 2025-06-30 08:05:33 +00:00
addrconf.c BACKPORT: crypto: lib/sha1 - rename "sha" to "sha1" 2025-12-23 13:36:17 -08:00
addrconf_core.c
addrlabel.c
af_inet6.c UPSTREAM: bpf: Add get{peer, sock}name attach types for sock_addr 2026-01-14 17:44:17 -08:00
ah6.c net: ipv6: fix field-spanning memcpy warning in AH output 2025-12-03 12:45:09 +01:00
anycast.c
calipso.c calipso: Fix null-ptr-deref in calipso_req_{set,del}attr(). 2025-06-27 11:02:57 +01:00
datagram.c
esp6.c
esp6_offload.c
exthdrs.c
exthdrs_core.c
exthdrs_offload.c
fib6_notifier.c
fib6_rules.c ip: fib_rules: Fetch net from fib_rule in fib[46]_rule_configure(). 2025-06-04 14:32:34 +02:00
fou6.c
icmp.c
inet6_connection_sock.c
inet6_hashtables.c
ip6_checksum.c
ip6_fib.c UPSTREAM: bpf: Enable bpf_iter targets registering ctx argument types 2026-01-14 17:41:40 -08:00
ip6_flowlabel.c
ip6_gre.c
ip6_icmp.c This is the 5.4.299 stable release 2025-09-10 05:55:28 +00:00
ip6_input.c BACKPORT: bpf: Add socket assign support 2025-12-23 13:36:11 -08:00
ip6_offload.c ipv6: reject malicious packets in ipv6_gso_segment() 2025-08-28 16:21:22 +02:00
ip6_offload.h
ip6_output.c ipv6: prevent possible UAF in ip6_xmit() 2025-01-09 13:23:33 +01:00
ip6_tunnel.c net/ip6_tunnel: Prevent perpetual tunnel growth 2025-10-29 13:59:56 +01:00
ip6_udp_tunnel.c BACKPORT: net: Make locking in sock_bindtoindex optional 2026-01-14 17:48:07 -08:00
ip6_vti.c
ip6mr.c ipmr: convert /proc handlers to rcu_read_lock() 2024-12-14 19:44:33 +01:00
ipcomp6.c
ipv6_sockglue.c UPSTREAM: seg6: fix seg6_validate_srh() to avoid slab-out-of-bounds 2026-01-14 17:48:10 -08:00
Kconfig
Makefile
mcast.c
mcast_snoop.c
mip6.c
ndisc.c BACKPORT: sysctl: pass kernel pointers to ->proc_handler 2025-12-23 13:36:15 -08:00
netfilter.c netfilter: bridge: Move specific fragmented packet to slow_path instead of dropping it 2025-06-27 11:02:46 +01:00
output_core.c
ping.c
proc.c
protocol.c
raw.c ipv6: np->rxpmtu race annotation 2025-12-03 12:45:13 +01:00
reassembly.c
route.c UPSTREAM: bpf: Enable bpf_iter targets registering ctx argument types 2026-01-14 17:41:40 -08:00
seg6.c UPSTREAM: seg6: fix seg6_validate_srh() to avoid slab-out-of-bounds 2026-01-14 17:48:10 -08:00
seg6_hmac.c ipv6: sr: validate HMAC algorithm ID in seg6_hmac_info_add 2025-08-28 16:21:37 +02:00
seg6_iptunnel.c UPSTREAM: seg6: fix seg6_validate_srh() to avoid slab-out-of-bounds 2026-01-14 17:48:10 -08:00
seg6_local.c UPSTREAM: seg6: fix seg6_validate_srh() to avoid slab-out-of-bounds 2026-01-14 17:48:10 -08:00
sit.c
syncookies.c
sysctl_net_ipv6.c BACKPORT: sysctl: pass kernel pointers to ->proc_handler 2025-12-23 13:36:15 -08:00
tcp_ipv6.c Merge tag 'ASB-2025-03-05_11-5.4' into android13-5.4-lahaina 2025-04-12 09:31:28 +00:00
tcpv6_offload.c
tunnel6.c
udp.c UPSTREAM: net: Track socket refcounts in skb_steal_sock() 2025-12-23 13:36:11 -08:00
udp_impl.h
udp_offload.c UPSTREAM: udp: do not transition UDP GRO fraglist partial checksums to unnecessary 2025-03-10 16:20:02 +00:00
udplite.c
xfrm6_input.c
xfrm6_output.c
xfrm6_policy.c
xfrm6_protocol.c
xfrm6_state.c
xfrm6_tunnel.c