1. Jan 22, 2023
  2. Jan 13, 2023
    • Samuel Holland's avatar
      platform: generic: allwinner: Fix PLIC array bounds · da5594bf
      Samuel Holland authored
      The two referenced commits passed incorrect bounds to the PLIC save/
      restore functions, causing out-of-bounds memory access. The functions
      expect "num" to be the 1-based number of interrupt sources, equivalent
      to the "riscv,ndev" devicetree property. Thus, "num" must be strictly
      smaller than the 0-based size of the array storing the register values.
      
      However, the referenced commits incorrectly passed in the unmodified
      size of the array as "num". Fix this by reducing PLIC_SOURCES (matching
      "riscv,ndev" on this platform), while keeping the same array sizes.
      
      Addresses-Coverity-ID: 1530251 ("Out-of-bounds access")
      Addresses-Coverity-ID: 1530252 ("Out-of-bounds access")
      Fixes: 8509e46c ("lib: utils/irqchip: plic: Ensure no out-of-bound access in priority save/restore helpers")
      Fixes: 9a2eeb4a
      
       ("lib: utils/irqchip: plic: Ensure no out-of-bound access in context save/restore helpers")
      Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
      Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
      da5594bf
  3. Jan 09, 2023
  4. Jan 07, 2023
  5. Jan 06, 2023
  6. Dec 24, 2022
  7. Dec 17, 2022
  8. Dec 12, 2022