Re: [PATCH] tipc: check for null after calling kmemdup
From: Jakub Kicinski
Date: Fri Nov 12 2021 - 23:08:39 EST
On Thu, 11 Nov 2021 12:59:15 -0800 Tadeusz Struk wrote:
> kmemdup can return a null pointer so need to check for it, otherwise
> the null key will be dereferenced later in tipc_crypto_key_xmit as
> can be seen in the trace [1].
> Reported-by: Dmitry Vyukov <dvyukov@xxxxxxxxxx>
> Signed-off-by: Tadeusz Struk <tadeusz.struk@xxxxxxxxxx>
Fixes: 1ef6f7c9390f ("tipc: add automatic session key exchange")