[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen/arm: efi: Avoid out-of-bounds write in meminfo_add_bank
commit a68ffd36e9eae8db318c5752f5319d2901ef74b3 Author: Julien Grall <julien.grall@xxxxxxx> AuthorDate: Thu May 4 20:36:41 2017 +0100 Commit: Stefano Stabellini <sstabellini@xxxxxxxxxx> CommitDate: Thu May 4 15:00:18 2017 -0700 xen/arm: efi: Avoid out-of-bounds write in meminfo_add_bank Commit 2c77db77 "xen/arm: efi: Avoid duplicating the addition of a new bank", introduced a new function meminfo_add_bank that add a new bank. This new code fails to check correctly the size of the array which may result to an out-of-bounds write. Coverity-ID: 1433183 Signed-off-by: Julien Grall <julien.grall@xxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> --- xen/arch/arm/efi/efi-boot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/efi/efi-boot.h b/xen/arch/arm/efi/efi-boot.h index e1e447a..2986c83 100644 --- a/xen/arch/arm/efi/efi-boot.h +++ b/xen/arch/arm/efi/efi-boot.h @@ -128,7 +128,7 @@ static bool __init meminfo_add_bank(struct meminfo *mem, { struct membank *bank; - if ( mem->nr_banks > NR_MEM_BANKS ) + if ( mem->nr_banks >= NR_MEM_BANKS ) return false; bank = &mem->bank[mem->nr_banks]; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |