[PATCH] lib: sbi: expected trap must always clear MPRV

Radim Krčmář rkrcmar at ventanamicro.com
Tue Nov 25 03:12:11 PST 2025


2025-11-24T14:03:39-08:00, Deepak Gupta <debug at rivosinc.com>:
> Expected trap must always clear MPRV. Currently it doesn't. There is a
> security issue here where if firmware was doing ld/st with MPRV=1 and
> since there would be a expected trap, opensbi will continue to run as
> MPRV=1. Security impact is DoS where opensbi will just keep trapping.

Does the DoS happen on some implementation?

The expected trap came from M-mode, therefore will have mstatus.MPP=3,
so MPRV=1 should behave the same as MPRV=0.

Thanks.



More information about the opensbi mailing list