From: Android Tools Maintainers Date: Fri, 20 Jan 2023 08:36:41 +0000 (+0000) Subject: Off-by-one error in the dwarf_to_unw_regnum function in include/dwarf_i.h in X-Git-Tag: archive/raspbian/29.0.6-23+rpi1^2~37 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=62d33b08e715ef71e5971742e8880d98559dd826;p=android-platform-tools.git Off-by-one error in the dwarf_to_unw_regnum function in include/dwarf_i.h in libunwind 1.1 allows local users to have unspecified impact via invalid dwarf opcodes. Gbp-Pq: Topic external/libunwind Gbp-Pq: Name 20150704-CVE-2015-3239_dwarf_i.h.patch --- diff --git a/external/libunwind/include/dwarf_i.h b/external/libunwind/include/dwarf_i.h index 0e728457..86dcdb8e 100644 --- a/external/libunwind/include/dwarf_i.h +++ b/external/libunwind/include/dwarf_i.h @@ -20,7 +20,7 @@ extern const uint8_t dwarf_to_unw_regnum_map[DWARF_REGNUM_MAP_LENGTH]; /* REG is evaluated multiple times; it better be side-effects free! */ # define dwarf_to_unw_regnum(reg) \ - (((reg) <= DWARF_REGNUM_MAP_LENGTH) ? dwarf_to_unw_regnum_map[reg] : 0) + (((reg) < DWARF_REGNUM_MAP_LENGTH) ? dwarf_to_unw_regnum_map[reg] : 0) #endif #ifdef UNW_LOCAL_ONLY