linux/include/net
Jakub Kicinski aec7961916 tls: fix race between async notify and socket close
The submitting thread (one which called recvmsg/sendmsg)
may exit as soon as the async crypto handler calls complete()
so any code past that point risks touching already freed data.

Try to avoid the locking and extra flags altogether.
Have the main thread hold an extra reference, this way
we can depend solely on the atomic ref counter for
synchronization.

Don't futz with reiniting the completion, either, we are now
tightly controlling when completion fires.

Reported-by: valis <sec@valis.email>
Fixes: 0cada33241 ("net/tls: fix race condition causing kernel panic")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-02-10 21:38:19 +00:00
..
9p
bluetooth Bluetooth: Fix bogus check for re-auth no supported with non-ssp 2023-12-22 12:56:21 -05:00
caif
iucv iucv: make iucv_bus const 2023-12-29 07:46:38 +00:00
mana RDMA v6.8 merge window 2024-01-12 13:52:21 -08:00
netfilter netfilter: nf_tables: use timestamp to check for set element timeout 2024-02-08 12:10:19 +01:00
netns net: Namespace-ify sysctl_optmem_max 2023-12-15 11:01:27 +00:00
nfc
page_pool skbuff: Optimization of SKB coalescing for page pool 2023-12-17 10:56:33 +00:00
phonet
sctp
tc_act net/sched: Retire ipt action 2024-01-02 12:41:16 +00:00
6lowpan.h
act_api.h net/sched: simplify tc_action_load_ops parameters 2024-01-07 14:58:26 +00:00
addrconf.h net: ipv6: support reporting otherwise unknown prefix flags in RTM_NEWPREFIX 2023-12-08 10:40:51 +00:00
af_ieee802154.h
af_rxrpc.h rxrpc, afs: Allow afs to pin rxrpc_peer objects 2023-12-24 15:22:50 +00:00
af_unix.h af_unix: fix lockdep positive in sk_diag_dump_icons() 2024-01-31 17:51:55 -08:00
af_vsock.h virtio/vsock: send credit update during setting SO_RCVLOWAT 2023-12-15 10:37:35 +00:00
ah.h
amt.h
arp.h
atmclip.h
ax25.h
ax88796.h
bareudp.h
bond_3ad.h
bond_alb.h
bond_options.h
bonding.h
bpf_sk_storage.h
busy_poll.h
calipso.h
cfg80211-wext.h
cfg80211.h wifi: cfg80211: detect stuck ECSA element in probe resp 2024-02-02 13:08:58 +01:00
cfg802154.h mac802154: Avoid new associations while disassociating 2023-12-15 11:14:57 +01:00
checksum.h
cipso_ipv4.h
cls_cgroup.h
codel.h
codel_impl.h
codel_qdisc.h
compat.h
datalink.h
dcbevent.h
dcbnl.h
devlink.h devlink: convert most of devlink_fmsg_*() to return void 2023-10-20 11:34:51 +01:00
dropreason-core.h net: sched: Add initial TC error skb drop reasons 2023-12-20 11:50:13 +00:00
dropreason.h
dsa.h net: dsa: Use conduit and user terms 2023-10-24 13:08:14 -07:00
dsa_stubs.h net: dsa: Use conduit and user terms 2023-10-24 13:08:14 -07:00
dsfield.h
dst.h ipv6: drop feature RTAX_FEATURE_ALLFRAG 2023-10-25 18:04:29 -07:00
dst_cache.h
dst_metadata.h
dst_ops.h
erspan.h
esp.h
espintcp.h
ethoc.h
failover.h
fib_notifier.h
fib_rules.h fib: remove unnecessary input parameters in fib_default_rule_add 2024-01-03 16:42:48 -08:00
firewire.h
flow.h inet: shrink struct flowi_common 2023-11-02 09:31:02 +01:00
flow_dissector.h
flow_offload.h
fou.h
fq.h
fq_impl.h
garp.h
gen_stats.h
genetlink.h genetlink: Use internal flags for multicast groups 2023-12-29 08:43:59 +00:00
geneve.h
gre.h
gro.h
gro_cells.h
gso.h
gtp.h
gue.h
handshake.h
hwbm.h
icmp.h
ieee80211_radiotap.h
ieee802154_netdev.h mac802154: Handle association requests from peers 2023-11-20 11:43:03 +01:00
if_inet6.h net: ipv6: support reporting otherwise unknown prefix flags in RTM_NEWPREFIX 2023-12-08 10:40:51 +00:00
ife.h
inet6_connection_sock.h
inet6_hashtables.h
inet_common.h
inet_connection_sock.h tcp: make sure init the accept_queue's spinlocks once 2024-01-19 21:13:25 -08:00
inet_dscp.h
inet_ecn.h
inet_frag.h
inet_hashtables.h tcp: Remove dead code and fields for bhash2. 2023-12-22 22:15:35 +00:00
inet_sock.h udp: fix busy polling 2024-01-21 18:09:30 +00:00
inet_timewait_sock.h tcp: Remove dead code and fields for bhash2. 2023-12-22 22:15:35 +00:00
inetpeer.h
ioam6.h
ip.h ipmr: fix kernel panic when forwarding mcast packets 2024-01-26 21:05:26 -08:00
ip6_checksum.h
ip6_fib.h net/ipv6: Remove gc_link warn on in fib6_info_release 2023-12-21 22:16:47 +01:00
ip6_route.h
ip6_tunnel.h
ip_fib.h
ip_tunnels.h vxlan: add support for flowlabel inherit 2023-11-16 22:33:31 +00:00
ip_vs.h
ipcomp.h
ipconfig.h
ipv6.h tcp: Save v4 address as v4-mapped-v6 in inet_bind2_bucket.v6_rcv_saddr. 2023-12-22 22:15:34 +00:00
ipv6_frag.h
ipv6_stubs.h ipsec-next-2023-10-28 2023-10-30 14:36:57 -07:00
iw_handler.h
kcm.h
l3mdev.h
lag.h
lapb.h
lib80211.h
llc.h
llc_c_ac.h
llc_c_ev.h
llc_c_st.h
llc_conn.h
llc_if.h
llc_pdu.h llc: Drop support for ETH_P_TR_802_2. 2024-01-19 21:30:09 -08:00
llc_s_ac.h
llc_s_ev.h
llc_s_st.h
llc_sap.h
lwtunnel.h
mac80211.h wifi: mac80211: add a driver callback to check active_links 2023-12-21 20:35:15 +01:00
mac802154.h
macsec.h net: macsec: introduce mdo_insert_tx_tag 2023-12-27 13:08:10 +00:00
mctp.h
mctpdevice.h
mip6.h
mld.h
mpls.h
mpls_iptunnel.h
mptcp.h
mrp.h
ncsi.h
ndisc.h
neighbour.h neighbour: Fix __randomize_layout crash in struct neighbour 2023-11-28 12:18:29 +01:00
net_debug.h
net_failover.h
net_namespace.h
net_ratelimit.h
net_trackers.h
netdev_queues.h net: netdev_queue: netdev_txq_completed_mb(): fix wake condition 2024-01-13 18:26:23 +00:00
netdev_rx_queue.h net: Add queue and napi association 2023-12-04 18:04:05 -08:00
netevent.h
netkit.h bpf, netkit: Add indirect call wrapper for fetching peer dev 2023-11-20 10:15:16 -08:00
netlabel.h
netlink.h genetlink: introduce helpers to do filtered multicast 2023-12-19 15:31:40 +01:00
netprio_cgroup.h
netrom.h
nexthop.h
nl802154.h ieee802154: Give the user the association list 2023-11-20 11:43:45 +01:00
nsh.h
p8022.h
pie.h
ping.h
pkt_cls.h net: sched: Make tc-related drop reason more flexible for remaining qdiscs 2023-12-20 11:50:13 +00:00
pkt_sched.h net: sched: Make tc-related drop reason more flexible for remaining qdiscs 2023-12-20 11:50:13 +00:00
pptp.h
protocol.h
psample.h
psnap.h
raw.h
rawv6.h
red.h
regulatory.h
request_sock.h
rose.h
route.h
rpl.h
rsi_91x.h
rtnetlink.h
rtnh.h
sch_generic.h net/sched: flower: Fix chain template offload 2024-01-24 01:33:59 +00:00
scm.h file: remove __receive_fd() 2023-12-12 14:24:14 +01:00
secure_seq.h
seg6.h
seg6_hmac.h
seg6_local.h
selftests.h
slhc_vj.h
smc.h net/smc: manage system EID in SMC stack instead of ISM driver 2023-12-26 20:24:33 +00:00
snmp.h
sock.h udp: fix busy polling 2024-01-21 18:09:30 +00:00
sock_reuseport.h
Space.h
stp.h
strparser.h
switchdev.h
tc_wrapper.h net/sched: Retire ipt action 2024-01-02 12:41:16 +00:00
tcp.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-01-04 18:06:46 -08:00
tcp_ao.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-01-04 18:06:46 -08:00
tcp_states.h tcp: Dump bound-only sockets in inet_diag. 2023-12-04 14:45:26 -08:00
tcx.h bpf, tcx: Get rid of tcx_link_const 2023-10-23 15:01:53 -07:00
timewait_sock.h
tipc.h
tls.h tls: fix race between async notify and socket close 2024-02-10 21:38:19 +00:00
tls_prot.h
tls_toe.h
transp_v6.h
tso.h
tun_proto.h
udp.h
udp_tunnel.h ipv6: add new arguments to udp_tunnel6_dst_lookup() 2023-10-23 08:48:57 +01:00
udplite.h
vsock_addr.h
vxlan.h vxlan: add support for flowlabel inherit 2023-11-16 22:33:31 +00:00
wext.h
x25.h
x25device.h
xdp.h net, xdp: Correct grammar 2023-12-14 16:38:59 +01:00
xdp_priv.h
xdp_sock.h xsk: Add TX timestamp and TX checksum offload support 2023-11-29 14:59:40 -08:00
xdp_sock_drv.h xsk: fix usage of multi-buffer BPF helpers for ZC XDP 2024-01-24 16:24:06 -08:00
xfrm.h bpf: xfrm: Add bpf_xdp_get_xfrm_state() kfunc 2023-12-14 17:12:49 -08:00
xsk_buff_pool.h xsk: add functions to fill control buffer 2023-12-13 16:16:40 -08:00