diff options
author | Tadeusz Struk <tadeusz.struk@linaro.org> | 2021-11-15 19:01:43 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-11-25 11:48:42 +0300 |
commit | 9404c4145542c23019a80ab1bb2ecf73cd057b10 (patch) | |
tree | 320aa68b9383989efea104b3385e825cf2c6ff1b /ipc | |
parent | 660859f0158c55f9ad4d4d58ea230c2535b9c0fe (diff) | |
download | linux-9404c4145542c23019a80ab1bb2ecf73cd057b10.tar.xz |
tipc: check for null after calling kmemdup
commit 3e6db079751afd527bf3db32314ae938dc571916 upstream.
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].
Cc: tipc-discussion@lists.sourceforge.net
Cc: stable@vger.kernel.org # 5.15, 5.14, 5.10
[1] https://syzkaller.appspot.com/bug?id=bca180abb29567b189efdbdb34cbf7ba851c2a58
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Tadeusz Struk <tadeusz.struk@linaro.org>
Acked-by: Ying Xue <ying.xue@windriver.com>
Acked-by: Jon Maloy <jmaloy@redhat.com>
Link: https://lore.kernel.org/r/20211115160143.5099-1-tadeusz.struk@linaro.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions