{"api_version":"1","generated_at":"2026-07-24T22:36:44+00:00","cve":"CVE-2008-1685","urls":{"html":"https://cve.report/CVE-2008-1685","api":"https://cve.report/api/cve/CVE-2008-1685.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2008-1685","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2008-1685"},"summary":{"title":"CVE-2008-1685","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)","state":"PUBLISHED","assigner":"mitre","published_at":"2008-04-06 23:44:00","updated_at":"2026-04-23 00:35:47"},"problem_types":["CWE-119","CWE-189","n/a"],"metrics":[{"version":"2.0","source":"nvd@nist.gov","type":"Primary","score":"6.8","severity":"","vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","data":{"version":"2.0","vectorString":"AV:N/AC:M/Au:N/C:P/I:P/A:P","baseScore":6.8,"accessVector":"NETWORK","accessComplexity":"MEDIUM","authentication":"NONE","confidentialityImpact":"PARTIAL","integrityImpact":"PARTIAL","availabilityImpact":"PARTIAL"}}],"references":[{"url":"https://exchange.xforce.ibmcloud.com/vulnerabilities/41686","name":"https://exchange.xforce.ibmcloud.com/vulnerabilities/41686","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":[],"title":"IBM X-Force Exchange","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26763","name":"http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26763","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":[],"title":"26763 – [4.1/4.2 Regression] wrong final value of induction variable calculated","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"http://www.kb.cert.org/vuls/id/162289","name":"http://www.kb.cert.org/vuls/id/162289","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":["US Government Resource"],"title":"VU#162289 - C compilers may silently discard some wraparound checks","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://www.cve.org/CVERecord?id=CVE-2008-1685","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2008-1685","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"n/a","product":"n/a","version":"affected n/a","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2008","cve_id":"1685","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"gnu","cpe5":"gcc","cpe6":"4.2.0","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2008","cve_id":"1685","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"gnu","cpe5":"gcc","cpe6":"4.2.1","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2008","cve_id":"1685","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"gnu","cpe5":"gcc","cpe6":"4.2.2","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2008","cve_id":"1685","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"gnu","cpe5":"gcc","cpe6":"4.2.3","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2008","cve_id":"1685","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"gnu","cpe5":"gcc","cpe6":"4.2.4","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2008","cve_id":"1685","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"gnu","cpe5":"gcc","cpe6":"4.3.0","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[{"cvename":"CVE-2008-1685","organization":"Red Hat","lastmodified":"2008-07-24","contributor":"Joshua Bressers","statementText":"The Red Hat Security Response Team 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.","cve_year":"2008","cve_id":"1685","crc32":"4a363eba"}],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"adp":[{"providerMetadata":{"dateUpdated":"2024-08-07T08:32:01.285Z","orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE"},"references":[{"name":"gcc-weak-security(41686)","tags":["vdb-entry","x_refsource_XF","x_transferred"],"url":"https://exchange.xforce.ibmcloud.com/vulnerabilities/41686"},{"tags":["x_refsource_MISC","x_transferred"],"url":"http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26763"},{"name":"VU#162289","tags":["third-party-advisory","x_refsource_CERT-VN","x_transferred"],"url":"http://www.kb.cert.org/vuls/id/162289"}],"title":"CVE Program Container"}],"cna":{"affected":[{"product":"n/a","vendor":"n/a","versions":[{"status":"affected","version":"n/a"}]}],"datePublic":"2008-03-30T00:00:00.000Z","descriptions":[{"lang":"en","value":"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)"}],"problemTypes":[{"descriptions":[{"description":"n/a","lang":"en","type":"text"}]}],"providerMetadata":{"dateUpdated":"2017-08-07T12:57:01.000Z","orgId":"8254265b-2729-46b6-b9e3-3dfca2d5bfca","shortName":"mitre"},"references":[{"name":"gcc-weak-security(41686)","tags":["vdb-entry","x_refsource_XF"],"url":"https://exchange.xforce.ibmcloud.com/vulnerabilities/41686"},{"tags":["x_refsource_MISC"],"url":"http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26763"},{"name":"VU#162289","tags":["third-party-advisory","x_refsource_CERT-VN"],"url":"http://www.kb.cert.org/vuls/id/162289"}],"tags":["disputed"],"x_legacyV4Record":{"CVE_data_meta":{"ASSIGNER":"cve@mitre.org","ID":"CVE-2008-1685","STATE":"PUBLIC"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"n/a","version":{"version_data":[{"version_value":"n/a"}]}}]},"vendor_name":"n/a"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"** DISPUTED **  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)."}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"n/a"}]}]},"references":{"reference_data":[{"name":"gcc-weak-security(41686)","refsource":"XF","url":"https://exchange.xforce.ibmcloud.com/vulnerabilities/41686"},{"name":"http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26763","refsource":"MISC","url":"http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26763"},{"name":"VU#162289","refsource":"CERT-VN","url":"http://www.kb.cert.org/vuls/id/162289"}]}}}},"cveMetadata":{"assignerOrgId":"8254265b-2729-46b6-b9e3-3dfca2d5bfca","assignerShortName":"mitre","cveId":"CVE-2008-1685","datePublished":"2008-04-06T23:00:00.000Z","dateReserved":"2008-04-06T00:00:00.000Z","dateUpdated":"2024-08-07T08:32:01.285Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.1"},"nvd":{"publishedDate":"2008-04-06 23:44:00","lastModifiedDate":"2026-04-23 00:35:47","problem_types":["CWE-119","CWE-189","n/a"],"metrics":{"cvssMetricV2":[{"source":"nvd@nist.gov","type":"Primary","cvssData":{"version":"2.0","vectorString":"AV:N/AC:M/Au:N/C:P/I:P/A:P","baseScore":6.8,"accessVector":"NETWORK","accessComplexity":"MEDIUM","authentication":"NONE","confidentialityImpact":"PARTIAL","integrityImpact":"PARTIAL","availabilityImpact":"PARTIAL"},"baseSeverity":"MEDIUM","exploitabilityScore":8.6,"impactScore":6.4,"acInsufInfo":false,"obtainAllPrivilege":false,"obtainUserPrivilege":false,"obtainOtherPrivilege":true,"userInteractionRequired":false}]},"configurations":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:a:gnu:gcc:4.2.0:*:*:*:*:*:*:*","matchCriteriaId":"B63A6449-FD4A-4D83-BDF5-1E4D2284045B"},{"vulnerable":true,"criteria":"cpe:2.3:a:gnu:gcc:4.2.1:*:*:*:*:*:*:*","matchCriteriaId":"B981AA48-6E80-426D-AE27-1D6965AA20A7"},{"vulnerable":true,"criteria":"cpe:2.3:a:gnu:gcc:4.2.2:*:*:*:*:*:*:*","matchCriteriaId":"D0A3B471-AF8D-47C4-8769-6A68CC034E2E"},{"vulnerable":true,"criteria":"cpe:2.3:a:gnu:gcc:4.2.3:*:*:*:*:*:*:*","matchCriteriaId":"8BEF1123-45FD-4A12-ADD1-12D58D7E4DFD"},{"vulnerable":true,"criteria":"cpe:2.3:a:gnu:gcc:4.2.4:*:*:*:*:*:*:*","matchCriteriaId":"A5AFF1AB-58E4-4DF4-8EBB-D127FF396340"},{"vulnerable":true,"criteria":"cpe:2.3:a:gnu:gcc:4.3.0:*:*:*:*:*:*:*","matchCriteriaId":"AAF40923-6C7A-484A-BE9E-8BFA5D072C94"}]}]}]},"legacy_mitre":{"record":{"CveYear":"2008","CveId":"1685","Ordinal":"1","Title":"CVE-2008-1685","CVE":"CVE-2008-1685","Year":"2008"},"notes":[{"CveYear":"2008","CveId":"1685","Ordinal":"1","NoteData":"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)","Type":"Description","Title":"CVE-2008-1685"},{"CveYear":"2008","CveId":"1685","Ordinal":"2","NoteData":"2008-04-06","Type":"Other","Title":"Published"},{"CveYear":"2008","CveId":"1685","Ordinal":"3","NoteData":"2017-08-07","Type":"Other","Title":"Modified"}]}}}