Bug 219933 - Missing null check in exynos-chipid
Summary: Missing null check in exynos-chipid
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: drivers_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-28 07:54 UTC by henry
Modified: 2025-03-30 17:31 UTC (History)
0 users

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description henry 2025-03-28 07:54:00 UTC
soc: samsung: Add NULL check in exynos-chipid

devm_kasprintf() can return a NULL pointer on failure, but this soc_dev_attr->revision returned value in exynos-chipid is not checked.
Add NULL check in exynos-chipid, to handle kernel NULL pointer dereference error. This is similar to the commit 050b23d081da.
Comment 1 Jean Delvare 2025-03-30 17:31:53 UTC
The exynos-chipid driver is not a hardware monitoring driver, so not something I can help with. Please use the right component when filling out bug reports.

Also this is IMHO a misuse of bugzilla, this tool is meant for actual bug reports, not development. If you want to help with Linux kernel development, better report your findings to the appropriate mailing list, ideally with a fix for the problem you found.

Anyway... This specific issue is in fact already fixed:

commit c8222ef6cf29dd7cad21643228f96535cc02b327
Author: Chenyuan Yang
Date:   Wed Feb 12 15:35:18 2025 -0600

    soc: samsung: exynos-chipid: Add NULL pointer check in exynos_chipid_probe()

Please always check in the upstream git repository if problems are still present there before reporting.

Note You need to log in before you can comment on or make changes to this bug.