In the Linux kernel, the following vulnerability has been resolved:
PCI: kirin: Fix buffer overflow in kirinpcieparse_port()
Within kirinpcieparseport(), the pcie->numslots is compared to pcie->gpioidreset size (MAXPCISLOTS) which is correct and would lead to an overflow.
Thus, fix condition to pcie->numslots + 1 >= MAXPCISLOTS and move pcie->numslots increment below the if-statement to avoid out-of-bounds array access.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
[kwilczynski: commit log]