Bug 4348 - drm/amdkfd: Check for null pointer after calling kmemdup
Summary: drm/amdkfd: Check for null pointer after calling kmemdup
Status: RESOLVED FIXED
Alias: None
Product: ANCK 4.19 Dev
Classification: ANCK
Component: drivers (show other bugs) drivers
Version: 4.19-023.x
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: GuixinLiu
QA Contact: shuming
URL:
Whiteboard:
Keywords: CVE
Depends on:
Blocks:
 
Reported: 2023-03-04 13:25 UTC by zhangqiangwe
Modified: 2023-07-05 15:38 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 zhangqiangwe 2023-03-04 13:25:09 UTC
Description of problem:

As the possible failure of the allocation, kmemdup() may return NULL
pointer.
Therefore, it should be better to check the 'props2' in order to prevent
the dereference of NULL pointer.

Additional info:

See upstream:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=abfaf0eee97925905e742aa3b0b72e04a918fa9e
Comment 1 maqiao alibaba_cloud_group 2023-07-05 15:38:59 UTC
merged: https://gitee.com/anolis/cloud-kernel/pulls/1355