diff options
author | Nikita Zhandarovich <[email protected]> | 2023-04-17 05:07:18 -0700 |
---|---|---|
committer | Paolo Abeni <[email protected]> | 2023-04-18 13:26:44 +0200 |
commit | c0e73276f0fcbbd3d4736ba975d7dc7a48791b0c (patch) | |
tree | c5dedfc8b7d71123d91f9736200ef9ed0406e708 /scripts/gdb/linux/utils.py | |
parent | 28e63d01a9f46d47b73045817f95c114a7769c71 (diff) |
mlxfw: fix null-ptr-deref in mlxfw_mfa2_tlv_next()
Function mlxfw_mfa2_tlv_multi_get() returns NULL if 'tlv' in
question does not pass checks in mlxfw_mfa2_tlv_payload_get(). This
behaviour may lead to NULL pointer dereference in 'multi->total_len'.
Fix this issue by testing mlxfw_mfa2_tlv_multi_get()'s return value
against NULL.
Found by Linux Verification Center (linuxtesting.org) with static
analysis tool SVACE.
Fixes: 410ed13cae39 ("Add the mlxfw module for Mellanox firmware flash process")
Co-developed-by: Natalia Petrova <[email protected]>
Signed-off-by: Nikita Zhandarovich <[email protected]>
Reviewed-by: Ido Schimmel <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions