• S
    apb: Fix out-of-bounds array write access · 68716da7
    Stefan Weil 提交于
    The array regs is declared with IOMMU_NREGS (3) elements and accessed
    using IOMMU_CTRL (0) and IOMMU_BASE (8). In most cases, those values
    are right shifted before being used as an index which results in indices
    0 and 1. In one case, this right shift was missing for IOMMU_BASE which
    results in an out-of-bounds write access with index 8.
    
    The patch adds the missing shift operation also for IOMMU_CTRL where
    it is needed only for cosmetic reasons.
    Signed-off-by: NStefan Weil <sw@weilnetz.de>
    Signed-off-by: NMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
    68716da7
apb.c 25.2 KB