diff options
| author | Atish Patra <[email protected]> | 2022-07-20 14:50:33 -0700 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2022-07-30 11:22:50 +0530 |
| commit | 83db3af5f93dbbffb599af41c58e26a24b1abc1c (patch) | |
| tree | 955e10549dd22cb3029950be3c5cc372ce384ad6 /lib/utils/timer/objects.mk | |
| parent | 1545afd342f2e22aaf91c4760dc5706965ec7fdf (diff) | |
lib: sbi: Add the bound check for events during config match
Currently, there is no sanity check for firmware event code. We don't see
any issue as Linux kernel driver does a bound check on firmware events
already. However, OpenSBI can't assume sane supervisor mode software
always. Thus, an invalid event idx can cause a buffer overflow error.
For hardware events, the match will fail for invalid event code anyways.
However, a search is unecessary if event code is invalid.
Add a event ID validation function to solve the issue.
Signed-off-by: Atish Patra <[email protected]>
Reviewed-by: Andrew Jones <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'lib/utils/timer/objects.mk')
0 files changed, 0 insertions, 0 deletions
