gcc: gcc-4.2 may optimize out certain length checks
Published Apr 6, 2008
6.8
MEDIUMCVSS 2.0
EPSS 1.25%
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)
Affected products
Remediation
Red Hat statement
The Red Hat Product Security is aware of this new gcc behavior and is currently working to determine what impact these changes will have on the source code processed by the compiler. These changes do not affect Red Hat Enterprise Linux 2, 3, 4, or 5.
Metrics
No CVSS v4.0 score for this CVE.
No CVSS v3.1 score for this CVE.
No CVSS v3.0 score for this CVE.
AV:N/AC:M/Au:N/C:P/I:P/A:P
This CVE is not in the KEV list.
No CISA SSVC assessment for this CVE yet.
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 1, 2026.
Score over time
2022–2026- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Percentile over time
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Table of values (11 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 1, 2026 | 1.25% (0.01253) | 68.37th | v5 (v2026.06.15) |
| Jun 15, 2026 | 1.25% (0.01253) | 65.46th | v5 (v2026.06.15) |
| Sep 15, 2025 | 2.01% (0.02013) | 83.02th | v4 (v2025.03.14) |
| Mar 17, 2025 | 0.49% (0.00487) | 63.35th | v4 (v2025.03.14) |
| Dec 12, 2024 | 0.22% (0.00222) | 61.39th | v3 (v2023.03.01) |
| Jun 26, 2024 | 0.19% (0.00187) | 56.26th | v3 (v2023.03.01) |
| Mar 7, 2023 | 0.19% (0.00187) | 54.24th | v3 (v2023.03.01) |
| Mar 6, 2023 | 0.95% (0.00954) | 36.37th | v2 (v2022.01.01) |
| Sep 2, 2022 | 0.95% (0.00954) | 34.50th | v2 (v2022.01.01) |
| Apr 1, 2022 | 0.95% (0.00954) | 32.50th | v2 (v2022.01.01) |
| Feb 4, 2022 | 0.95% (0.00954) | 16.28th | v2 (v2022.01.01) |
References (7)
- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26763 x_refsource_MISC
- http://www.kb.cert.org/vuls/id/162289 third-party-advisoryx_refsource_CERT-VNUS Government Resource
- https://access.redhat.com/security/cve/CVE-2008-1685 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=441452 Issue Tracking
- https://exchange.xforce.ibmcloud.com/vulnerabilities/41686 vdb-entryx_refsource_XF
- https://nvd.nist.gov/vuln/detail/CVE-2008-1685
- https://www.cve.org/CVERecord?id=CVE-2008-1685
| Link | Providers | Tags |
|---|---|---|
| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26763 | x_refsource_MISC | |
| http://www.kb.cert.org/vuls/id/162289 | third-party-advisoryx_refsource_CERT-VNUS Government Resource | |
| https://access.redhat.com/security/cve/CVE-2008-1685 | Vendor Advisory | |
| https://bugzilla.redhat.com/show_bug.cgi?id=441452 | Issue Tracking | |
| https://exchange.xforce.ibmcloud.com/vulnerabilities/41686 | vdb-entryx_refsource_XF | |
| https://nvd.nist.gov/vuln/detail/CVE-2008-1685 | ||
| https://www.cve.org/CVERecord?id=CVE-2008-1685 |
Change history (0)
No recorded changes yet.