firmware: qcom: scm: Fix missing read barrier in qcom_scm_get_tzmem_pool()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.12.146.13.36.14In the Linux kernel, the following vulnerability has been resolved:
firmware: qcom: scm: Fix missing read barrier in qcom_scm_get_tzmem_pool()
Commit 2e4955167ec5 ("firmware: qcom: scm: Fix __scm and waitq completion variable initialization") introduced a write barrier in probe function to store global '__scm' variable. We all known barriers are paired (see memory-barriers.txt: "Note that write barriers should normally be paired with read or address-dependency barriers"), therefore accessing it from concurrent contexts requires read barrier. Previous commit added such barrier in qcom_scm_is_available(), so let's use that directly.
Lack of this read barrier can result in fetching stale '__scm' variable value, NULL, and dereferencing it.
Note that barrier in qcom_scm_is_available() satisfies here the control dependency.
From the CVE record · Linux
The Linux kernel's qcom_scm_get_tzmem_pool() lacks a read barrier when accessing a global variable. During concurrent access, it can read a stale NULL value and dereference it. The input does not establish whether an attacker can trigger this or specify network, authentication, or user-interaction requirements.
Engineers running Linux kernels with Qualcomm SCM firmware support should check their installations; affected versions are not specified.