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. AppPkg/
  2. ArmPkg/
  3. ArmPlatformPkg/
  4. ArmVirtPkg/
  5. BaseTools/
  6. BeagleBoardPkg/
  7. Conf/
  8. CorebootModulePkg/
  9. CorebootPayloadPkg/
  10. CryptoPkg/
  11. DynamicTablesPkg/
  12. EdkCompatibilityPkg/
  13. EmbeddedPkg/
  14. EmulatorPkg/
  15. FatPkg/
  16. FmpDevicePkg/
  17. IntelFrameworkModulePkg/
  18. IntelFrameworkPkg/
  19. IntelFsp2Pkg/
  20. IntelFsp2WrapperPkg/
  21. IntelFspPkg/
  22. IntelFspWrapperPkg/
  23. IntelSiliconPkg/
  24. MdeModulePkg/
  25. MdePkg/
  26. NetworkPkg/
  27. Nt32Pkg/
  28. Omap35xxPkg/
  29. OptionRomPkg/
  30. OvmfPkg/
  31. PcAtChipsetPkg/
  32. QuarkPlatformPkg/
  33. QuarkSocPkg/
  34. SecurityPkg/
  35. ShellBinPkg/
  36. ShellPkg/
  37. SignedCapsulePkg/
  38. SourceLevelDebugPkg/
  39. StandaloneMmPkg/
  40. StdLib/
  41. StdLibPrivateInternalFiles/
  42. UefiCpuPkg/
  43. Vlv2DeviceRefCodePkg/
  44. Vlv2TbltDevicePkg/
  45. .gitignore
  46. .gitmodules
  47. BuildNotes2.txt
  48. Contributions.txt
  49. edksetup.bat
  50. edksetup.sh
  51. License.txt
  52. Maintainers.txt
  53. Readme.md
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