Files
opensbi/include/sbi
Atish Patra 83db3af5f9 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 <atishp@rivosinc.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
2022-07-30 11:22:50 +05:30
..
2020-03-11 15:29:45 +05:30
2021-04-05 13:43:08 +05:30
2021-07-11 10:23:18 +05:30
2020-01-07 12:11:48 +05:30
2021-10-11 09:59:29 +05:30
2022-06-25 09:12:10 +05:30