diff options
| author | Sourav Mohapatra <mohapatr@codeaurora.org> | 2019-07-09 10:13:11 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-07-17 20:24:38 -0700 |
| commit | ab4371f93e72015a44b77d7007aa656400a2e037 (patch) | |
| tree | 0a977ee3c98974261fc981714f95dc7b75af411b /scripts/objdiff | |
| parent | d6fdf8ad66d2b3d4cc1862572e70a802dd8a9bf4 (diff) | |
qcacld-3.0: Properly typecast to avoid overread/write
In the function pld_get_thermal_state, the parameter thermal_state is of
type uint16. This parameter is then typecasted into unsigned long before
being passed by reference to the icnss API. As the typecasting occurs
from uint16 (lower) to unsigned long (higher), there can be scenarios
where the adjacent memory gets affected. This can lead to potential
overread, overwrite and stack corruption.
Instead of typecasting from uint16 to unsigned long, change the API
implementation to typecast from unsigned long to uint16. As the expected
value may not exceed 16bits, this will prevent the above mentioned
scenarios from occurring without breaking any functionality.
Change-Id: Ifbf840dacab55d54ba836223a0d2a1a63dd06810
CRs-Fixed: 2486199
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions
