HomeFreeBSD

realloc: Fix KASAN(9) shadow map updates

Description

realloc: Fix KASAN(9) shadow map updates

When copying from the old buffer to the new buffer, we don't know the
requested size of the old allocation, but only the size of the
allocation provided by UMA. This value is "alloc". Because the copy
may access bytes in the old allocation's red zone, we must mark the full
allocation valid in the shadow map. Do so using the correct size.

Reported by: kp
Tested by: kp
Sponsored by: The FreeBSD Foundation

Details

Provenance
markjAuthored on May 5 2021, 9:05 PM
Parents
rG1b2806931ae3: src.conf.5: Regen.
Branches
Unknown
Tags
Unknown