]> git.baikalelectronics.ru Git - kernel.git/commit
rxrpc: Don't access connection from call if pointer is NULL
authorDavid Howells <dhowells@redhat.com>
Mon, 8 Aug 2016 09:27:26 +0000 (10:27 +0100)
committerDavid Howells <dhowells@redhat.com>
Tue, 9 Aug 2016 16:12:23 +0000 (17:12 +0100)
commita2f12a6f2ec589fc8b897c16f6c56272583cae73
treed662e7459b2cf9459629644ea9b604f50b666b44
parentdd063a9bb8b3bc8c38f1ed3acd5b00634e448229
rxrpc: Don't access connection from call if pointer is NULL

The call state machine processor sets up the message parameters for a UDP
message that it might need to transmit in advance on the basis that there's
a very good chance it's going to have to transmit either an ACK or an
ABORT.  This requires it to look in the connection struct to retrieve some
of the parameters.

However, if the call is complete, the call connection pointer may be NULL
to dissuade the processor from transmitting a message.  However, there are
some situations where the processor is still going to be called - and it's
still going to set up message parameters whether it needs them or not.

This results in a NULL pointer dereference at:

net/rxrpc/call_event.c:837

To fix this, skip the message pre-initialisation if there's no connection
attached.

Signed-off-by: David Howells <dhowells@redhat.com>
net/rxrpc/call_event.c