CVE-2008-1685
CVE-2008-1685 is a medium-severity vulnerability in Gnu Gcc with a CVSS 2.0 base score of 6.8. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-119.
Key facts
- Severity: Medium (CVSS 2.0 base score 6.8)
- EPSS exploit prediction: 1% (70th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-119
- Affected product: Gnu Gcc
- Published:
- Last modified:
Description
gcc 4.2.0 through 4.3.0 in GNU Compiler Collection, when casts are not used, considers the sum of a pointer and an int to be greater than or equal to the pointer, which might lead to removal of length testing code that was intended as a protection mechanism against integer overflow and buffer overflow attacks, and provide no diagnostic message about this removal. NOTE: the vendor has determined that this compiler behavior is correct according to section 6.5.6 of the C99 standard (aka ISO/IEC 9899:1999)
Frequently asked questions
- What is CVE-2008-1685?
- gcc 4.2.0 through 4.3.0 in GNU Compiler Collection, when casts are not used, considers the sum of a pointer and an int to be greater than or equal to the pointer, which might lead to removal of length testing code that was intended as a protection mechanism against integer overflow and buffer overflow attacks, and provide no diagnostic message about this removal. NOTE: the vendor has determined that this compiler behavior is correct according to section 6.5.6 of the C99 standard (aka ISO/IEC 9899:1999)
- How severe is CVE-2008-1685?
- CVE-2008-1685 has a CVSS 2.0 base score of 6.8, rated medium severity.
- Is CVE-2008-1685 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (70th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2008-1685?
- CVE-2008-1685 primarily affects Gnu Gcc. In total, 6 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2008-1685?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
- When was CVE-2008-1685 published?
- CVE-2008-1685 was published on 2008-04-06 and last updated on 2026-06-16.
References
- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26763
- http://www.kb.cert.org/vuls/id/162289
- https://exchange.xforce.ibmcloud.com/vulnerabilities/41686
Affected products (6)
- cpe:2.3:a:gnu:gcc:4.2.0:*:*:*:*:*:*:*
- cpe:2.3:a:gnu:gcc:4.2.1:*:*:*:*:*:*:*
- cpe:2.3:a:gnu:gcc:4.2.2:*:*:*:*:*:*:*
- cpe:2.3:a:gnu:gcc:4.2.3:*:*:*:*:*:*:*
- cpe:2.3:a:gnu:gcc:4.2.4:*:*:*:*:*:*:*
- cpe:2.3:a:gnu:gcc:4.3.0:*:*:*:*:*:*:*
More vulnerabilities in Gnu Gcc
- CVE-2018-12886 — High (CVSS 8.1): stack_protect_prologue in cfgexpand.c and stack_protect_epilogue in function.c in GNU Compiler Collection (GCC) 4.1…
- CVE-2021-37322 — High (CVSS 7.8): GCC c++filt v2.26 was discovered to contain a use-after-free vulnerability via the component cplus-dem.c.
- CVE-2002-2439 — High (CVSS 7.8): Integer overflow in the new[] operator in gcc before 4.8.0 allows attackers to have unspecified impacts.
- CVE-2019-15847 — High (CVSS 7.5): The POWER9 backend in GNU Compiler Collection (GCC) before version 10 could optimize multiple calls of the…
- CVE-2008-1367 — High (CVSS 7.5): gcc 4.3.x does not generate a cld instruction while compiling functions used for string manipulation such as memcpy and…
- CVE-2000-1219 — High (CVSS 7.5): The -ftrapv compiler option in gcc and g++ 3.3.3 and earlier does not handle all types of integer overflows, which may…
Other CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer) vulnerabilities
- CVE-2026-133993 — Critical (CVSS 10.0): A security flaw has been discovered in D-Link DIR-600L 2.17b02. This affects the function FUN_0040efb0 of the file…
- CVE-2026-129354 — Critical (CVSS 10.0): A flaw has been found in D-Link DIR-600L 2.17b02. Affected by this issue is the function hnap_main of the file…
- CVE-2026-129353 — Critical (CVSS 10.0): A vulnerability was detected in D-Link DIR-600L 2.17/2.17b02. Affected by this vulnerability is the function…
- CVE-2026-129351 — Critical (CVSS 10.0): A security vulnerability has been detected in TRENDnet TEW-657BRM 1.00.1. This vulnerability affects the function…
- CVE-2026-123966 — Critical (CVSS 10.0): A vulnerability was determined in Tenda AC19 16.03.10.07. Affected by this issue is the function saveParentControlInfo…
- CVE-2026-120283 — Critical (CVSS 10.0): A vulnerability was identified in Linksys E8450 1.2.00.360516. Affected is the function strcpy of the file…