kernel_samsung_a53x/net/ipv6
Hagar Hemdan 520a2c2f7f net: esp: cleanup esp_output_tail_tcp() in case of unsupported ESPINTCP
[ Upstream commit 96f887a612e4cda89efc3f54bc10c1997e3ab0e9 ]

xmit() functions should consume skb or return error codes in error
paths.
When the configuration "CONFIG_INET_ESPINTCP" is not set, the
implementation of the function "esp_output_tail_tcp" violates this rule.
The function frees the skb and returns the error code.
This change removes the kfree_skb from both functions, for both
esp4 and esp6.
WARN_ON is added because esp_output_tail_tcp() should never be called if
CONFIG_INET_ESPINTCP is not set.

This bug was discovered and resolved using Coverity Static Analysis
Security Testing (SAST) by Synopsys, Inc.

Fixes: e27cca96cd68 ("xfrm: add espintcp (RFC 8229)")
Signed-off-by: Hagar Hemdan <hagarhem@amazon.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:20:06 +01:00
..
ila ila: block BH in ila_output() 2024-11-19 14:19:47 +01:00
netfilter netfilter: complete validation of user input 2024-11-19 11:32:20 +01:00
addrconf.c ipv6: fix race condition between ipv6_get_ifaddr and ipv6_del_addr 2024-11-19 11:32:19 +01:00
addrconf_core.c ipv6: Ensure natural alignment of const ipv6 loopback and router addresses 2024-11-18 12:13:22 +01:00
addrlabel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
af_inet6.c ipv6: annotate some data-races around sk->sk_prot 2024-11-19 14:19:35 +01:00
ah6.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
anycast.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
calipso.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
datagram.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
esp6.c net: esp: cleanup esp_output_tail_tcp() in case of unsupported ESPINTCP 2024-11-23 23:20:06 +01:00
esp6_offload.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exthdrs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exthdrs_core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exthdrs_offload.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fib6_notifier.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fib6_rules.c ipv6: fib6_rules: avoid possible NULL dereference in fib6_rule_action() 2024-11-19 11:32:46 +01:00
fou6.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
icmp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
inet6_connection_sock.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
inet6_hashtables.c net: remove duplicate reuseport_lookup functions 2024-11-19 12:26:55 +01:00
ip6_checksum.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip6_fib.c ipv6: fix possible race in __fib6_drop_pcpu_from() 2024-11-19 14:19:01 +01:00
ip6_flowlabel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip6_gre.c erspan: make sure erspan_base_hdr is present in skb->head 2024-11-19 09:22:47 +01:00
ip6_icmp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip6_input.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip6_offload.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip6_offload.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip6_output.c ipv6: avoid atomic fragment on GSO packets 2024-11-18 11:42:50 +01:00
ip6_tunnel.c Revert "ip6_tunnel: fix NEXTHDR_FRAGMENT handling in ip6_tnl_parse_tlv_enc_lim()" 2024-11-18 20:12:45 +01:00
ip6_udp_tunnel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip6_vti.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip6mr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipcomp6.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipv6_sockglue.c tcp: Fix data races around icsk->icsk_af_ops. 2024-11-19 14:19:35 +01:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcast.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcast_snoop.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mip6.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ndisc.c net: change accept_ra_min_rtr_lft to affect all RA lifetimes 2024-11-08 11:25:47 +01:00
netfilter.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
output_core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ping.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
proc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
protocol.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
raw.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
reassembly.c net: ipv6: fix wrong start position when receive hop-by-hop fragment 2024-11-19 12:26:56 +01:00
route.c ipv6: prevent possible NULL dereference in rt6_probe() 2024-11-19 14:19:08 +01:00
rpl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rpl_iptunnel.c net: ipv6: rpl_iptunnel: block BH in rpl_output() and rpl_input() 2024-11-19 14:19:47 +01:00
seg6.c ipv6: sr: fix invalid unregister error path 2024-11-19 12:26:57 +01:00
seg6_hmac.c ipv6: sr: fix memleak in seg6_hmac_init_algo 2024-11-19 12:27:09 +01:00
seg6_iptunnel.c ipv6: sr: block BH in seg6_output_core() and seg6_input_core() 2024-11-19 14:19:00 +01:00
seg6_local.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sit.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
syncookies.c dccp/tcp: Call security_inet_conn_request() after setting IPv6 addresses. 2024-11-18 11:43:07 +01:00
sysctl_net_ipv6.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tcp_ipv6.c tcp: Fix data races around icsk->icsk_af_ops. 2024-11-19 14:19:35 +01:00
tcpv6_offload.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tunnel6.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
udp.c udp: Avoid call to compute_score on multiple sites 2024-11-19 12:26:55 +01:00
udp_impl.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
udp_offload.c udp: do not transition UDP GRO fraglist partial checksums to unnecessary 2024-11-19 09:22:47 +01:00
udplite.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xfrm6_input.c xfrm: Preserve vlan tags for transport mode software GRO 2024-11-19 11:32:45 +01:00
xfrm6_output.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xfrm6_policy.c xfrm6: check ip6_dst_idev() return value in xfrm6_get_saddr() 2024-11-19 14:19:08 +01:00
xfrm6_protocol.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xfrm6_state.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xfrm6_tunnel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00