CVE-2008-1685
publishedgcc: gcc-4.2 may optimize out certain length checks
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| n/a | — | n/an/a | Affected | Not stated | mitre |
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)
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
No normalized assessments.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| n/a | n/a | n/a (affected) | mitre · cna |
Weaknesses
1- n/a
References
3- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26763
- VU#162289 http://www.kb.cert.org/vuls/id/162289
- gcc-weak-security(41686) https://exchange.xforce.ibmcloud.com/vulnerabilities/41686
Provider assertions
2mitre · cna
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 9028342446fbae07ea34c1ea0c4df4fb5c8e1736357328743e8cb5866403db8a
- Ingested
- 23 Sep 2026, 07:38:22 UTC
- Source record
- Official CVE record