Bug 5312 - BUG: null-ptr-deref in mlxfw_mfa2_tlv_next()
Summary: BUG: null-ptr-deref in mlxfw_mfa2_tlv_next()
Status: RESOLVED FIXED
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: drivers (show other bugs) drivers
Version: 5.10.y-15
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: GuixinLiu
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-25 15:19 UTC by ljubomir
Modified: 2023-08-17 17:05 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ljubomir inspur_group 2023-05-25 15:19:51 UTC
Description of problem:

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.
Comment 1 小龙 admin 2023-05-25 15:24:47 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/1663
Comment 2 GuixinLiu alibaba_cloud_group 2023-08-17 17:05:24 UTC
already fixed