Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43976 )
Change subject: lib/Makefile.inc: Enable UBSAN on SMM, too ......................................................................
Patch Set 1: Code-Review-2
Patch Set 1:
We don't want SMM running into UB, but I'm not sure we can easily enable this here: The sanitizers usually have some extra memory somewhere to keep track of things, and while I'm not sure if that's true for UBSAN, if it is, we ought to ensure that this memory isn't somewhere in userspace (both due to the resulting attack surface against SMM and because SMM could unwittingly corrupt non-SMM data if that stuff is simply placed anywhere)
I agree, I've yet to test this on real hardware. In any case, I could make this optional (that is, add a Kconfig option for it) and explain the risks there.