CVE Vulnerabilities

CVE-2015-2305

Integer Overflow or Wraparound

Published: Mar 30, 2015 | Modified: Apr 12, 2025
CVSS 3.x
N/A
Source:
NVD
CVSS 2.x
6.8 MEDIUM
AV:N/AC:M/Au:N/C:P/I:P/A:P
RedHat/V2
5.1 MODERATE
AV:N/AC:H/Au:N/C:P/I:P/A:P
RedHat/V3
Ubuntu
MEDIUM
root.io logo minimus.io logo echo.ai logo

Integer overflow in the regcomp implementation in the Henry Spencer BSD regex library (aka rxspencer) alpha3.8.g5 on 32-bit platforms, as used in NetBSD through 6.1.5 and other products, might allow context-dependent attackers to execute arbitrary code via a large regular expression that leads to a heap-based buffer overflow.

Weakness

The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.

Affected Software

NameVendorStart VersionEnd Version
RxspencerRxspencer_project3.8.g5 (including)3.8.g5 (including)
Red Hat Software Collections for Red Hat Enterprise Linux 6RedHatphp55-0:2.0-1.el6*
Red Hat Software Collections for Red Hat Enterprise Linux 6RedHatphp55-php-0:5.5.21-2.el6*
Red Hat Software Collections for Red Hat Enterprise Linux 6RedHatphp54-0:2.0-1.el6*
Red Hat Software Collections for Red Hat Enterprise Linux 6RedHatphp54-php-0:5.4.40-1.el6*
Red Hat Software Collections for Red Hat Enterprise Linux 6RedHatphp54-php-pecl-zendopcache-0:7.0.4-3.el6*
Red Hat Software Collections for Red Hat Enterprise Linux 6.5 EUSRedHatphp55-0:2.0-1.el6*
Red Hat Software Collections for Red Hat Enterprise Linux 6.5 EUSRedHatphp55-php-0:5.5.21-2.el6*
Red Hat Software Collections for Red Hat Enterprise Linux 6.5 EUSRedHatphp54-0:2.0-1.el6*
Red Hat Software Collections for Red Hat Enterprise Linux 6.5 EUSRedHatphp54-php-0:5.4.40-1.el6*
Red Hat Software Collections for Red Hat Enterprise Linux 6.5 EUSRedHatphp54-php-pecl-zendopcache-0:7.0.4-3.el6*
Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUSRedHatphp55-0:2.0-1.el6*
Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUSRedHatphp55-php-0:5.5.21-2.el6*
Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUSRedHatphp54-0:2.0-1.el6*
Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUSRedHatphp54-php-0:5.4.40-1.el6*
Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUSRedHatphp54-php-pecl-zendopcache-0:7.0.4-3.el6*
Red Hat Software Collections for Red Hat Enterprise Linux 7RedHatphp55-0:2.0-1.el7*
Red Hat Software Collections for Red Hat Enterprise Linux 7RedHatphp55-php-0:5.5.21-2.el7*
Red Hat Software Collections for Red Hat Enterprise Linux 7RedHatphp54-0:2.0-1.el7*
Red Hat Software Collections for Red Hat Enterprise Linux 7RedHatphp54-php-0:5.4.40-1.el7*
Red Hat Software Collections for Red Hat Enterprise Linux 7RedHatphp54-php-pecl-zendopcache-0:7.0.4-3.el7*
ClamavUbuntuartful*
ClamavUbuntubionic*
ClamavUbuntucosmic*
ClamavUbuntudevel*
ClamavUbuntudisco*
ClamavUbuntueoan*
ClamavUbuntuesm-infra-legacy/trusty*
ClamavUbuntuesm-infra/bionic*
ClamavUbuntuesm-infra/focal*
ClamavUbuntuesm-infra/xenial*
ClamavUbuntufocal*
ClamavUbuntugroovy*
ClamavUbuntuhirsute*
ClamavUbuntuimpish*
ClamavUbuntujammy*
ClamavUbuntukinetic*
ClamavUbuntulucid*
ClamavUbuntulunar*
ClamavUbuntumantic*
ClamavUbuntunoble*
ClamavUbuntuoracular*
ClamavUbuntuplucky*
ClamavUbuntuprecise*
ClamavUbuntuquesting*
ClamavUbuntutrusty*
ClamavUbuntutrusty/esm*
ClamavUbuntuupstream*
ClamavUbuntuutopic*
ClamavUbuntuvivid*
ClamavUbuntuwily*
ClamavUbuntuxenial*
ClamavUbuntuyakkety*
ClamavUbuntuzesty*
Librcsb-core-wrapperUbuntutrusty*
Librcsb-core-wrapperUbuntuupstream*
Librcsb-core-wrapperUbuntuutopic*
Llvm-toolchain-3.4Ubuntuprecise*
Llvm-toolchain-3.4Ubuntutrusty*
Llvm-toolchain-3.4Ubuntuupstream*
Llvm-toolchain-3.4Ubuntuutopic*
Llvm-toolchain-3.4Ubuntuvivid*
Llvm-toolchain-3.4Ubuntuwily*
Llvm-toolchain-3.5Ubuntuutopic*
Llvm-toolchain-3.5Ubuntuvivid*
Llvm-toolchain-3.6Ubuntuupstream*
Llvm-toolchain-3.6Ubuntuvivid*
Llvm-toolchain-3.6Ubuntuvivid/stable-phone-overlay*
Llvm-toolchain-3.6Ubuntuwily*
Llvm-toolchain-3.6Ubuntuyakkety*
Llvm-toolchain-snapshotUbuntutrusty*
Llvm-toolchain-snapshotUbuntuupstream*
NewlibUbuntuartful*
NewlibUbuntulucid*
NewlibUbuntuprecise*
NewlibUbuntuupstream*
NewlibUbuntuutopic*
NewlibUbuntuvivid*
NewlibUbuntuwily*
NewlibUbuntuyakkety*
NewlibUbuntuzesty*
NviUbuntuartful*
NviUbuntuesm-apps/xenial*
NviUbuntulucid*
NviUbuntuprecise*
NviUbuntutrusty*
NviUbuntuupstream*
NviUbuntuutopic*
NviUbuntuvivid*
NviUbuntuwily*
NviUbuntuxenial*
NviUbuntuyakkety*
NviUbuntuzesty*
OpenrptUbuntuartful*
OpenrptUbuntubionic*
OpenrptUbuntucosmic*
OpenrptUbuntudisco*
OpenrptUbuntueoan*
OpenrptUbuntuesm-apps/bionic*
OpenrptUbuntuesm-apps/xenial*
OpenrptUbuntutrusty*
OpenrptUbuntuupstream*
OpenrptUbuntuutopic*
OpenrptUbuntuvivid*
OpenrptUbuntuwily*
OpenrptUbuntuxenial*
OpenrptUbuntuyakkety*
OpenrptUbuntuzesty*
Php5Ubuntuesm-infra-legacy/trusty*
Php5Ubuntulucid*
Php5Ubuntuprecise*
Php5Ubuntutrusty*
Php5Ubuntutrusty/esm*
Php5Ubuntuupstream*
Php5Ubuntuutopic*
Php5Ubuntuvivid*
Php5Ubuntuwily*
Radare2Ubuntuartful*
Radare2Ubuntuesm-apps/xenial*
Radare2Ubuntulunar*
Radare2Ubuntuprecise*
Radare2Ubuntutrusty*
Radare2Ubuntuupstream*
Radare2Ubuntuutopic*
Radare2Ubuntuvivid*
Radare2Ubuntuwily*
Radare2Ubuntuxenial*
Radare2Ubuntuyakkety*
Radare2Ubuntuzesty*
VigorUbuntuesm-infra-legacy/trusty*
VigorUbuntulucid*
VigorUbuntuprecise*
VigorUbuntutrusty*
VigorUbuntutrusty/esm*
VigorUbuntuupstream*
VigorUbuntuutopic*
YapUbuntulucid*
YapUbuntuprecise*
YapUbuntutrusty*
YapUbuntuupstream*
YapUbuntuutopic*

Potential Mitigations

  • Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
  • If possible, choose a language or compiler that performs automatic bounds checking.
  • Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482].
  • Use libraries or frameworks that make it easier to handle numbers without unexpected consequences.
  • Examples include safe integer handling packages such as SafeInt (C++) or IntegerLib (C or C++). [REF-106]
  • Perform input validation on any numeric input by ensuring that it is within the expected range. Enforce that the input meets both the minimum and maximum requirements for the expected range.
  • Use unsigned integers where possible. This makes it easier to perform validation for integer overflows. When signed integers are required, ensure that the range check includes minimum values as well as maximum values.
  • Understand the programming language’s underlying representation and how it interacts with numeric calculation (CWE-681). Pay close attention to byte size discrepancies, precision, signed/unsigned distinctions, truncation, conversion and casting between types, “not-a-number” calculations, and how the language handles numbers that are too large or too small for its underlying representation. [REF-7]
  • Also be careful to account for 32-bit, 64-bit, and other potential differences that may affect the numeric representation.

References