linux/net/rxrpc
David Howells 2d914c1bf0 rxrpc: Fix accept on a connection that need securing
When a new incoming call arrives at an userspace rxrpc socket on a new
connection that has a security class set, the code currently pushes it onto
the accept queue to hold a ref on it for the socket.  This doesn't work,
however, as recvmsg() pops it off, notices that it's in the SERVER_SECURING
state and discards the ref.  This means that the call runs out of refs too
early and the kernel oopses.

By contrast, a kernel rxrpc socket manually pre-charges the incoming call
pool with calls that already have user call IDs assigned, so they are ref'd
by the call tree on the socket.

Change the mode of operation for userspace rxrpc server sockets to work
like this too.  Although this is a UAPI change, server sockets aren't
currently functional.

Fixes: 248f219cb8 ("rxrpc: Rewrite the data and ack handling code")
Signed-off-by: David Howells <dhowells@redhat.com>
2020-10-05 16:35:57 +01:00
..
af_rxrpc.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ar-internal.h rxrpc: Fix accept on a connection that need securing 2020-10-05 16:35:57 +01:00
call_accept.c rxrpc: Fix accept on a connection that need securing 2020-10-05 16:35:57 +01:00
call_event.c rxrpc: Fix afs large storage transmission performance drop 2020-06-17 23:01:39 +01:00
call_object.c rxrpc: Fix accept on a connection that need securing 2020-10-05 16:35:57 +01:00
conn_client.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
conn_event.c rxrpc: Fix accept on a connection that need securing 2020-10-05 16:35:57 +01:00
conn_object.c rxrpc: Fix race between recvmsg and sendmsg on immediate call failure 2020-07-30 16:50:20 -07:00
conn_service.c rxrpc: Fix missing security check on incoming calls 2019-12-20 16:21:32 +00:00
input.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-03 18:50:48 -07:00
insecure.c rxrpc: Fix -Wframe-larger-than= warnings from on-stack crypto 2019-07-30 10:32:35 -07:00
Kconfig docs: networking: convert rxrpc.txt to ReST 2020-04-30 12:56:38 -07:00
key.c rxrpc: Downgrade the BUG() for unsupported token type in rxrpc_read() 2020-10-05 16:33:37 +01:00
local_event.c rxrpc: Use the tx-phase skb flag to simplify tracing 2019-08-27 10:04:18 +01:00
local_object.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
Makefile rxrpc: Fix the excessive initial retransmission timeout 2020-05-11 16:42:28 +01:00
misc.c rxrpc: Fix the excessive initial retransmission timeout 2020-05-11 16:42:28 +01:00
net_ns.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 36 2019-05-24 17:27:11 +02:00
output.c rxrpc: Fix loss of RTT samples due to interposed ACK 2020-08-20 17:59:27 +01:00
peer_event.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
peer_object.c rxrpc: Make rxrpc_kernel_get_srtt() indicate validity 2020-08-20 18:21:28 +01:00
proc.c rxrpc: Adjust /proc/net/rxrpc/calls to display call->debug_id not user_ID 2020-05-31 15:19:51 +01:00
protocol.h rxrpc: Improve jumbo packet counting 2019-08-27 09:48:37 +01:00
recvmsg.c rxrpc: Fix accept on a connection that need securing 2020-10-05 16:35:57 +01:00
rtt.c rxrpc: Fix loss of RTT samples due to interposed ACK 2020-08-20 17:59:27 +01:00
rxkad.c rxrpc: Fix memory leak in rxkad_verify_response() 2020-08-27 12:59:45 -07:00
security.c rxrpc: Fix missing security check on incoming calls 2019-12-20 16:21:32 +00:00
sendmsg.c rxrpc: Fix accept on a connection that need securing 2020-10-05 16:35:57 +01:00
skbuff.c rxrpc: Use skb_unshare() rather than skb_cow_data() 2019-08-27 10:13:46 +01:00
sysctl.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-05-24 13:47:27 -07:00
utils.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 36 2019-05-24 17:27:11 +02:00