Comment # 74 on bug 1185232 from
I probably found the root cause for comment#0. When tracking a crash in
aarch64, I found that a part of Fat driver memory was overwritten with a series
of 0s. Fortunately, I added a few more debug messages to the AArch64 firmware
and narrowed down the problem to these 2 sections of shim code:

1) https://github.com/rhboot/shim/blob/shim-15.4/mok.c#L988-L991

2) https://github.com/rhboot/shim/blob/shim-15.4/mok.c#L1017-L1041

The code 1) calculates the size of the config table for MOK variables and the
code 2) copies the content of MOK variables into the config table. However, the
code 1) skips the empty variables but the code 2) adds the table templates for
the empty variables, so the code 2) copies more data than the allocated space.
The end of the table list is a zeroed 264 bytes array, and I guess the extra
part of the table overwrote the existing EFI Loaded Image handle, so
HandleProtocol returned "Invalid Parameter".


You are receiving this mail because: