Re: [U-Boot] Buffer overrun risk in UBI SPL for secure boot

2019-09-09 Thread Joel Peshkin
Hi Heiko, Adding a size limit without breaking things turns out to be much more difficult that it would seem. So, instead of capping the size, we have changed the memory map we are using for uboot. It is probably worthwhile for others using UBISPL in a secure boot nevironment to do the

Re: [U-Boot] Buffer overrun risk in UBI SPL for secure boot

2019-09-04 Thread Joel Peshkin
Hi Heiko, The place where the issue comes up is in ubispl_load_volumes(), but that calls ipl_load() internally. I guess there are several options 1) Create a distinct ubispl_scan() function to do the scan without loading anything and then a new load volume function that takes offset

Re: [U-Boot] Buffer overrun risk in UBI SPL for secure boot

2019-09-04 Thread Heiko Schocher
Hello Joel, Am 04.09.2019 um 06:57 schrieb Joel Peshkin: It seems that, in the process of doing any sort of secure boot chain of trust, anything loading a UBI volume in preparation to authenticate it, will load a volume of unknown size into a buffer prior to checking the signature of that

[U-Boot] Buffer overrun risk in UBI SPL for secure boot

2019-09-03 Thread Joel Peshkin
It seems that, in the process of doing any sort of secure boot chain of trust, anything loading a UBI volume in preparation to authenticate it, will load a volume of unknown size into a buffer prior to checking the signature of that volume. Has anyone considered a solution for this? Should all