diff options
author | David Howells <dhowells@redhat.com> | 2016-06-30 11:34:30 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2016-07-06 10:43:05 +0100 |
commit | 689f4c646d6a8f0730eec11e06e5909de0b5d5d2 (patch) | |
tree | a8189f012e18787c8e375b095d110dfaa1b26800 /net/rxrpc/conn_object.c | |
parent | 88b99d0b7af859bbd97e76d66527f107843340a5 (diff) | |
download | linux-stable-689f4c646d6a8f0730eec11e06e5909de0b5d5d2.tar.gz linux-stable-689f4c646d6a8f0730eec11e06e5909de0b5d5d2.tar.bz2 linux-stable-689f4c646d6a8f0730eec11e06e5909de0b5d5d2.zip |
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: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/conn_object.c')
-rw-r--r-- | net/rxrpc/conn_object.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/rxrpc/conn_object.c b/net/rxrpc/conn_object.c index c86a3cff7585..2c2456ff2853 100644 --- a/net/rxrpc/conn_object.c +++ b/net/rxrpc/conn_object.c @@ -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; } |