diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2021-05-08 06:36:21 +0000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-05-12 11:07:39 +1000 |
commit | 63970f3c37e75997ed86dbdfdc83df35f2152bb1 (patch) | |
tree | 0a0e52803737495d069d880441beea42a73ade0a /arch/powerpc/kvm/book3s_64_mmu_hv.c | |
parent | bc581dbab26edf0b6acc98c76943b4a0c7d672a2 (diff) |
powerpc/legacy_serial: Fix UBSAN: array-index-out-of-bounds
UBSAN complains when a pointer is calculated with invalid
'legacy_serial_console' index, allthough the index is verified
before dereferencing the pointer.
Fix it by checking 'legacy_serial_console' validity before
calculating pointers.
Fixes: 0bd3f9e953bd ("powerpc/legacy_serial: Use early_ioremap()")
Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210511010712.750096-1-mpe@ellerman.id.au
Diffstat (limited to 'arch/powerpc/kvm/book3s_64_mmu_hv.c')
0 files changed, 0 insertions, 0 deletions