]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: fix size validations for the MSG_CRYPTO type
authorMax VA <maxv@sentinelone.com>
Mon, 25 Oct 2021 15:31:53 +0000 (17:31 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Oct 2021 12:43:07 +0000 (13:43 +0100)
commit10fd40d9abd4aa97604d7f8848baddbc6b156efe
tree2502de8e8e71fbaba8c5cb8611ec2ba84c225451
parent23b35d1c8ff95148c8af7f752e665c49eacf4242
tipc: fix size validations for the MSG_CRYPTO type

The function tipc_crypto_key_rcv is used to parse MSG_CRYPTO messages
to receive keys from other nodes in the cluster in order to decrypt any
further messages from them.
This patch verifies that any supplied sizes in the message body are
valid for the received message.

Fixes: 9c57edf86ba6 ("tipc: add automatic session key exchange")
Signed-off-by: Max VA <maxv@sentinelone.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Jon Maloy <jmaloy@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/crypto.c