Re: [PATCH v2] firmware: google: update vpd_decode from upstream

From: Greg Kroah-Hartman
Date: Thu Aug 29 2019 - 07:24:12 EST


On Thu, Aug 29, 2019 at 06:19:45PM +0800, Hung-Te Lin wrote:
> The VPD implementation from Chromium Vital Product Data project used to
> parse data from untrusted input without checking if there is invalid
> data (for example the if the size becomes negative, or larger than whole
> input buffer), which may cause buffer overflow on corrupted data.
>
> To fix that, the upstream driver 'vpd_decode' has changed size
> parameters to unsigned integer (u32), and refactored the parsing of
> entry header so the size is always checked properly.

"the upstream driver"? That's the code you are touching here.

What do you mean by "upstream"? Your subject and this paragraph does
not make much sense.

Please describe exactly what you are doing here, we don't care what
anyone else did with this code in any random repo that is not Linus's
tree.

thanks,

greg k-h