Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 689f4c64 authored by David Howells's avatar David Howells
Browse files

rxrpc: Check the source of a packet to a client conn



When looking up a client connection to which to route a packet, we need to
check that the packet came from the correct source so that a peer can't try
to muck around with another peer's connection.

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent 88b99d0b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -508,7 +508,9 @@ struct rxrpc_connection *rxrpc_find_connection(struct rxrpc_local *local,
		}
	} else {
		conn = idr_find(&rxrpc_client_conn_ids, cid >> RXRPC_CIDSHIFT);
		if (conn && conn->proto.epoch == epoch)
		if (conn &&
		    conn->proto.epoch == epoch &&
		    conn->params.peer == peer)
			goto found;
	}