Skip to content

Copying memory with source and destination overlap should use memmove(), merged offset may be wrong

Moderate
jbech-linaro published GHSA-3qfx-fpf3-rgvh Jun 28, 2021

Package

OP-TEE

Affected versions

< 3.6.0

Patched versions

>= 3.6.0

Description

get_elf_segments() final stage tries to aggregate segments. Inside the while (idx < num_segs) loop, the logic to remove the current index is to run a memcpy() to shift down everything beyond that point, basically "moving" down the rest of the segments.

Patches

optee_os.git

  • core: get_elf_segments(): use memmove on overlapping memory (3bcb882)

Workarounds

N/A

References

N/A

OP-TEE ID

OP-TEE-2019-0010

Reported by

Netflix (Bastien Simondi)

For more information

For more information regarding the security incident process in OP-TEE, please read the information that can be found when going to the "Security" page at https://www.trustedfirmware.org.

Severity

Moderate

CVE ID

No known CVE

Weaknesses

No CWEs