diff options
author | Pratyush Yadav | 2020-05-26 17:35:57 +0530 |
---|---|---|
committer | Simon Glass | 2020-06-11 20:52:11 -0600 |
commit | b59889bf344dd261b50d69a5eacfa2874573c7cd (patch) | |
tree | 478044461c720639bf8ee9abfc511ed9fc194678 /doc | |
parent | 42a768c6892ba3bdedea75a430dff234fddffc8d (diff) |
regmap: Check for out-of-range offsets before mapping them
In regmap_raw_{read,write}_range(), offsets are checked to make sure
they aren't out of range. But this check happens _after_ the address is
mapped from physical memory. Input should be sanity-checked before using
it. Mapping the address before validating it leaves the door open to
passing an invalid address to map_physmem(). So check for out of range
offsets _before_ mapping them.
This fixes a segmentation fault in sandbox when -1 is used as an offset
to regmap_{read,write}().
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions