Add edk2 Q1 stable tag
MdeModulePkg/HiiImage: Fix stack overflow when corrupted BMP is parsed (CVE-2018-12181)

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1135

For 4bit BMP, there are only 2^4 = 16 colors in the palette.
But when a corrupted BMP contains more than 16 colors in the palette,
today's implementation wrongly copies all colors to the local
PaletteValue[16] array which causes stack overflow.

The similar issue also exists in the logic to handle 8bit BMP.

The patch fixes the issue by only copies the first 16 or 256 colors
in the palette depending on the BMP type.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ray Ni <ray.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
1 file changed
tree: 20baa1bce4e39aca5ff6e27bfa5a8a24d690bbbe
  1. .gitignore
  2. .gitmodules
  3. AppPkg/
  4. ArmPkg/
  5. ArmPlatformPkg/
  6. ArmVirtPkg/
  7. BaseTools/
  8. BeagleBoardPkg/
  9. BuildNotes2.txt
  10. Conf/
  11. Contributions.txt
  12. CorebootModulePkg/
  13. CorebootPayloadPkg/
  14. CryptoPkg/
  15. DynamicTablesPkg/
  16. EdkCompatibilityPkg/
  17. EmbeddedPkg/
  18. EmulatorPkg/
  19. FatPkg/
  20. FmpDevicePkg/
  21. IntelFrameworkModulePkg/
  22. IntelFrameworkPkg/
  23. IntelFsp2Pkg/
  24. IntelFsp2WrapperPkg/
  25. IntelFspPkg/
  26. IntelFspWrapperPkg/
  27. IntelSiliconPkg/
  28. License.txt
  29. Maintainers.txt
  30. MdeModulePkg/
  31. MdePkg/
  32. NetworkPkg/
  33. Nt32Pkg/
  34. Omap35xxPkg/
  35. OptionRomPkg/
  36. OvmfPkg/
  37. PcAtChipsetPkg/
  38. QuarkPlatformPkg/
  39. QuarkSocPkg/
  40. Readme.md
  41. SecurityPkg/
  42. ShellBinPkg/
  43. ShellPkg/
  44. SignedCapsulePkg/
  45. SourceLevelDebugPkg/
  46. StandaloneMmPkg/
  47. StdLib/
  48. StdLibPrivateInternalFiles/
  49. UefiCpuPkg/
  50. Vlv2DeviceRefCodePkg/
  51. Vlv2TbltDevicePkg/
  52. edksetup.bat
  53. edksetup.sh
Readme.md

EDK II Project

A modern, feature-rich, cross-platform firmware development environment for the UEFI and PI specifications from www.uefi.org.

Contributions to the EDK II open source project are covered by the TianoCore Contribution Agreement 1.1

The majority of the content in the EDK II open source project uses a BSD 2-Clause License. The EDK II open source project contains the following components that are covered by additional licenses:

The EDK II Project is composed of packages. The maintainers for each package are listed in Maintainers.txt.

Resources