Skip to content
Snippets Groups Projects
  • bjorn3's avatar
    09de72e9
    common: Fix mmap overwriting unintended memory in Sgl · 09de72e9
    bjorn3 authored
    If unaligned_length is for example 8193, the initial reservation would
    be rounded up to the next page resulting in 12288. However the physmap
    would previously round up to the next power of two forming 16384,
    potentially overwriting one page of data directly after the reservation.
    In case of bigger allocations, more pages could be overwritten.
    09de72e9
    History
    common: Fix mmap overwriting unintended memory in Sgl
    bjorn3 authored
    If unaligned_length is for example 8193, the initial reservation would
    be rounded up to the next page resulting in 12288. However the physmap
    would previously round up to the next power of two forming 16384,
    potentially overwriting one page of data directly after the reservation.
    In case of bigger allocations, more pages could be overwritten.