CWE-119
DiscouragedImproper Restriction of Operations within the Bounds of a Memory Buffer
Abstraction: Class · Status: Stable
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
17547 vulnerabilities reference this CWE, most recent first.
GHSA-V42W-VR7W-93Q2
Vulnerability from github – Published: 2022-05-17 04:09 – Updated: 2025-08-26 00:31Stack-based buffer overflow in the SCADA server in Ecava IntegraXor before 4.1.4390 allows remote attackers to cause a denial of service (system crash) by triggering access to DLL code located in the IntegraXor directory.
{
"affected": [],
"aliases": [
"CVE-2014-0753"
],
"database_specific": {
"cwe_ids": [
"CWE-119",
"CWE-121"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2014-01-21T01:55:00Z",
"severity": "HIGH"
},
"details": "Stack-based buffer overflow in the SCADA server in Ecava IntegraXor before 4.1.4390 allows remote attackers to cause a denial of service (system crash) by triggering access to DLL code located in the IntegraXor directory.",
"id": "GHSA-v42w-vr7w-93q2",
"modified": "2025-08-26T00:31:07Z",
"published": "2022-05-17T04:09:27Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2014-0753"
},
{
"type": "WEB",
"url": "https://www.cisa.gov/news-events/ics-advisories/icsa-14-016-01"
},
{
"type": "WEB",
"url": "http://ics-cert.us-cert.gov/advisories/ICSA-14-016-01"
},
{
"type": "WEB",
"url": "http://osvdb.org/102171"
},
{
"type": "WEB",
"url": "http://www.integraxor.com/blog/buffer-overflow-vulnerability-note"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-V44W-JQ9F-4QRP
Vulnerability from github – Published: 2022-05-01 06:54 – Updated: 2022-05-01 06:54Heap-based buffer overflow in the LZWDecodeVector function in Mac OS X before 10.4.6, as used in applications that use ImageIO or AppKit, allows remote attackers to execute arbitrary code via crafted TIFF images.
{
"affected": [],
"aliases": [
"CVE-2006-1982"
],
"database_specific": {
"cwe_ids": [
"CWE-119"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2006-04-21T22:02:00Z",
"severity": "HIGH"
},
"details": "Heap-based buffer overflow in the LZWDecodeVector function in Mac OS X before 10.4.6, as used in applications that use ImageIO or AppKit, allows remote attackers to execute arbitrary code via crafted TIFF images.",
"id": "GHSA-v44w-jq9f-4qrp",
"modified": "2022-05-01T06:54:38Z",
"published": "2022-05-01T06:54:37Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2006-1982"
},
{
"type": "WEB",
"url": "http://docs.info.apple.com/article.html?artnum=303411"
},
{
"type": "WEB",
"url": "http://lists.apple.com/archives/security-announce/2006/May/msg00003.html"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/19686"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/20077"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/31837"
},
{
"type": "WEB",
"url": "http://www.security-protocols.com/modules.php?name=News\u0026file=article\u0026sid=3233"
},
{
"type": "WEB",
"url": "http://www.security-protocols.com/sp-x24-advisory.php"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/17634"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/17951"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/cas/techalerts/TA06-132A.html"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2006/1452"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2006/1779"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-V46P-9P43-58C9
Vulnerability from github – Published: 2022-05-02 03:20 – Updated: 2022-05-02 03:20Heap-based buffer overflow in Apple QuickTime before 7.6.2 on Windows allows remote attackers to execute arbitrary code or cause a denial of service (application crash) via a movie file containing crafted Clipping Region (CRGN) atom types.
{
"affected": [],
"aliases": [
"CVE-2009-0954"
],
"database_specific": {
"cwe_ids": [
"CWE-119"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-06-02T18:30:00Z",
"severity": "HIGH"
},
"details": "Heap-based buffer overflow in Apple QuickTime before 7.6.2 on Windows allows remote attackers to execute arbitrary code or cause a denial of service (application crash) via a movie file containing crafted Clipping Region (CRGN) atom types.",
"id": "GHSA-v46p-9p43-58c9",
"modified": "2022-05-02T03:20:00Z",
"published": "2022-05-02T03:20:00Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-0954"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/50892"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A15344"
},
{
"type": "WEB",
"url": "http://lists.apple.com/archives/security-announce/2009/Jun/msg00000.html"
},
{
"type": "WEB",
"url": "http://osvdb.org/54875"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35091"
},
{
"type": "WEB",
"url": "http://support.apple.com/kb/HT3591"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/35167"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1022314"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2009/1469"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-V46Q-VX2W-V2MW
Vulnerability from github – Published: 2022-05-17 03:18 – Updated: 2022-05-17 03:18The InitTextures function in Mozilla Firefox before 41.0 and Firefox ESR 38.x before 38.3 might allow remote attackers to cause a denial of service (memory corruption and application crash) or possibly have unspecified other impact via unknown vectors.
{
"affected": [],
"aliases": [
"CVE-2015-7177"
],
"database_specific": {
"cwe_ids": [
"CWE-119"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2015-09-24T04:59:00Z",
"severity": "HIGH"
},
"details": "The InitTextures function in Mozilla Firefox before 41.0 and Firefox ESR 38.x before 38.3 might allow remote attackers to cause a denial of service (memory corruption and application crash) or possibly have unspecified other impact via unknown vectors.",
"id": "GHSA-v46q-vx2w-v2mw",
"modified": "2022-05-17T03:18:23Z",
"published": "2022-05-17T03:18:23Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2015-7177"
},
{
"type": "WEB",
"url": "https://bugzilla.mozilla.org/show_bug.cgi?id=1186725"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2015-10/msg00000.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2015-10/msg00003.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2015-10/msg00004.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2015-10/msg00005.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2015-10/msg00007.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00025.html"
},
{
"type": "WEB",
"url": "http://rhn.redhat.com/errata/RHSA-2015-1834.html"
},
{
"type": "WEB",
"url": "http://rhn.redhat.com/errata/RHSA-2015-1852.html"
},
{
"type": "WEB",
"url": "http://www.debian.org/security/2015/dsa-3365"
},
{
"type": "WEB",
"url": "http://www.mozilla.org/security/announce/2015/mfsa2015-112.html"
},
{
"type": "WEB",
"url": "http://www.oracle.com/technetwork/topics/security/bulletinapr2016-2952098.html"
},
{
"type": "WEB",
"url": "http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/76816"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id/1033640"
},
{
"type": "WEB",
"url": "http://www.ubuntu.com/usn/USN-2743-1"
},
{
"type": "WEB",
"url": "http://www.ubuntu.com/usn/USN-2743-2"
},
{
"type": "WEB",
"url": "http://www.ubuntu.com/usn/USN-2743-3"
},
{
"type": "WEB",
"url": "http://www.ubuntu.com/usn/USN-2743-4"
},
{
"type": "WEB",
"url": "http://www.ubuntu.com/usn/USN-2754-1"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-V476-H5WP-FC2W
Vulnerability from github – Published: 2022-05-17 02:33 – Updated: 2022-05-17 02:33XnView Classic for Windows Version 2.40 allows remote attackers to execute code via a crafted .fpx file, related to "Data from Faulting Address controls subsequent Write Address starting at Xfpx!gffGetFormatInfo+0x000000000002bfd5."
{
"affected": [],
"aliases": [
"CVE-2017-9901"
],
"database_specific": {
"cwe_ids": [
"CWE-119"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-07-05T20:29:00Z",
"severity": "HIGH"
},
"details": "XnView Classic for Windows Version 2.40 allows remote attackers to execute code via a crafted .fpx file, related to \"Data from Faulting Address controls subsequent Write Address starting at Xfpx!gffGetFormatInfo+0x000000000002bfd5.\"",
"id": "GHSA-v476-h5wp-fc2w",
"modified": "2022-05-17T02:33:46Z",
"published": "2022-05-17T02:33:46Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-9901"
},
{
"type": "WEB",
"url": "https://github.com/wlinzi/security_advisories/tree/master/CVE-2017-9901"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-V479-MPCG-QVHX
Vulnerability from github – Published: 2022-05-14 03:24 – Updated: 2025-04-20 03:48Buffer overflow in Active Management Technology (AMT) in Intel Manageability Engine Firmware 8.x/9.x/10.x/11.0/11.5/11.6/11.7/11.10/11.20 allows attacker with remote Admin access to the system to execute arbitrary code with AMT execution privilege.
{
"affected": [],
"aliases": [
"CVE-2017-5712"
],
"database_specific": {
"cwe_ids": [
"CWE-119"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-11-21T14:29:00Z",
"severity": "HIGH"
},
"details": "Buffer overflow in Active Management Technology (AMT) in Intel Manageability Engine Firmware 8.x/9.x/10.x/11.0/11.5/11.6/11.7/11.10/11.20 allows attacker with remote Admin access to the system to execute arbitrary code with AMT execution privilege.",
"id": "GHSA-v479-mpcg-qvhx",
"modified": "2025-04-20T03:48:54Z",
"published": "2022-05-14T03:24:17Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-5712"
},
{
"type": "WEB",
"url": "https://cert-portal.siemens.com/productcert/pdf/ssa-892715.pdf"
},
{
"type": "WEB",
"url": "https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00086\u0026languageid=en-fr"
},
{
"type": "WEB",
"url": "https://security.netapp.com/advisory/ntap-20171120-0001"
},
{
"type": "WEB",
"url": "https://www.asus.com/News/wzeltG5CjYaIwGJ0"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/101920"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id/1039852"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-V47C-W69F-367C
Vulnerability from github – Published: 2022-05-02 03:37 – Updated: 2022-05-02 03:37libpurple/protocols/irc/msgs.c in the IRC protocol plugin in libpurple in Pidgin before 2.6.2 allows remote IRC servers to cause a denial of service (NULL pointer dereference and application crash) via a TOPIC message that lacks a topic string.
{
"affected": [],
"aliases": [
"CVE-2009-2703"
],
"database_specific": {
"cwe_ids": [
"CWE-119"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-09-08T18:30:00Z",
"severity": "MODERATE"
},
"details": "libpurple/protocols/irc/msgs.c in the IRC protocol plugin in libpurple in Pidgin before 2.6.2 allows remote IRC servers to cause a denial of service (NULL pointer dereference and application crash) via a TOPIC message that lacks a topic string.",
"id": "GHSA-v47c-w69f-367c",
"modified": "2022-05-02T03:37:58Z",
"published": "2022-05-02T03:37:58Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-2703"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A11379"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A6435"
},
{
"type": "WEB",
"url": "http://developer.pidgin.im/viewmtn/revision/info/ad2c6ee53ec9122b25aeb1f918db53be69bdeac3"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/36601"
},
{
"type": "WEB",
"url": "http://www.pidgin.im/news/security/index.php?id=40"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/36277"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-V47W-64G8-GGFH
Vulnerability from github – Published: 2022-05-17 01:55 – Updated: 2022-05-17 01:55Stack-based buffer overflow in the SetActiveXGUID method in the VersionInfo ActiveX control in GenVersion.dll 8.0.138.0 in the WebHMI subsystem in ICONICS BizViz 9.x before 9.22 and GENESIS32 9.x before 9.22 allows remote attackers to execute arbitrary code via a long string in the argument. NOTE: some of these details are obtained from third party information.
{
"affected": [],
"aliases": [
"CVE-2011-2089"
],
"database_specific": {
"cwe_ids": [
"CWE-119"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2011-05-13T17:05:00Z",
"severity": "HIGH"
},
"details": "Stack-based buffer overflow in the SetActiveXGUID method in the VersionInfo ActiveX control in GenVersion.dll 8.0.138.0 in the WebHMI subsystem in ICONICS BizViz 9.x before 9.22 and GENESIS32 9.x before 9.22 allows remote attackers to execute arbitrary code via a long string in the argument. NOTE: some of these details are obtained from third party information.",
"id": "GHSA-v47w-64g8-ggfh",
"modified": "2022-05-17T01:55:46Z",
"published": "2022-05-17T01:55:46Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2011-2089"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/67267"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/44417"
},
{
"type": "WEB",
"url": "http://www.exploit-db.com/exploits/17240"
},
{
"type": "WEB",
"url": "http://www.exploit-db.com/exploits/17269"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/72135"
},
{
"type": "WEB",
"url": "http://www.security-assessment.com/files/documents/advisory/ICONICS_WebHMI.pdf"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/47704"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/control_systems/pdf/ICSA-11-131-01.pdf"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2011/1174"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-V48G-P9P2-J8CR
Vulnerability from github – Published: 2022-05-17 01:06 – Updated: 2022-05-17 01:06libxml2 2.9.2 does not properly stop parsing invalid input, which allows context-dependent attackers to cause a denial of service (out-of-bounds read and libxml2 crash) via crafted XML data to the (1) xmlParseEntityDecl or (2) xmlParseConditionalSections function in parser.c, as demonstrated by non-terminated entities.
{
"affected": [],
"aliases": [
"CVE-2015-7941"
],
"database_specific": {
"cwe_ids": [
"CWE-119"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2015-11-18T16:59:00Z",
"severity": "MODERATE"
},
"details": "libxml2 2.9.2 does not properly stop parsing invalid input, which allows context-dependent attackers to cause a denial of service (out-of-bounds read and libxml2 crash) via crafted XML data to the (1) xmlParseEntityDecl or (2) xmlParseConditionalSections function in parser.c, as demonstrated by non-terminated entities.",
"id": "GHSA-v48g-p9p2-j8cr",
"modified": "2022-05-17T01:06:30Z",
"published": "2022-05-17T01:06:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2015-7941"
},
{
"type": "WEB",
"url": "https://bugzilla.gnome.org/show_bug.cgi?id=744980"
},
{
"type": "WEB",
"url": "https://git.gnome.org/browse/libxml2/commit/?id=9b8512337d14c8ddf662fcb98b0135f225a1c489"
},
{
"type": "WEB",
"url": "https://git.gnome.org/browse/libxml2/commit/?id=a7dfab7411cbf545f359dd3157e5df1eb0e7ce31"
},
{
"type": "WEB",
"url": "https://h20566.www2.hpe.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c04944172"
},
{
"type": "WEB",
"url": "https://security.gentoo.org/glsa/201701-37"
},
{
"type": "WEB",
"url": "http://lists.fedoraproject.org/pipermail/package-announce/2016-February/177341.html"
},
{
"type": "WEB",
"url": "http://lists.fedoraproject.org/pipermail/package-announce/2016-February/177381.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-updates/2015-12/msg00120.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-updates/2016-01/msg00031.html"
},
{
"type": "WEB",
"url": "http://marc.info/?l=bugtraq\u0026m=145382616617563\u0026w=2"
},
{
"type": "WEB",
"url": "http://rhn.redhat.com/errata/RHSA-2015-2549.html"
},
{
"type": "WEB",
"url": "http://rhn.redhat.com/errata/RHSA-2015-2550.html"
},
{
"type": "WEB",
"url": "http://rhn.redhat.com/errata/RHSA-2016-1089.html"
},
{
"type": "WEB",
"url": "http://www.debian.org/security/2015/dsa-3430"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2015/10/22/5"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2015/10/22/8"
},
{
"type": "WEB",
"url": "http://www.oracle.com/technetwork/topics/security/bulletinjan2016-2867206.html"
},
{
"type": "WEB",
"url": "http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/74241"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id/1034243"
},
{
"type": "WEB",
"url": "http://www.ubuntu.com/usn/USN-2812-1"
},
{
"type": "WEB",
"url": "http://xmlsoft.org/news.html"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-V498-QC29-J9M6
Vulnerability from github – Published: 2022-05-17 01:24 – Updated: 2022-05-17 01:24The metadata flow feature in Cisco IOS 15.1 through 15.3 and IOS XE 3.3.xXO before 3.3.1XO, 3.6.xS and 3.7.xS before 3.7.6S, and 3.8.xS, 3.9.xS, and 3.10.xS before 3.10.1S allows remote attackers to cause a denial of service (device reload) via malformed RSVP packets, aka Bug ID CSCug75942.
{
"affected": [],
"aliases": [
"CVE-2014-3355"
],
"database_specific": {
"cwe_ids": [
"CWE-119"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2014-09-25T10:55:00Z",
"severity": "HIGH"
},
"details": "The metadata flow feature in Cisco IOS 15.1 through 15.3 and IOS XE 3.3.xXO before 3.3.1XO, 3.6.xS and 3.7.xS before 3.7.6S, and 3.8.xS, 3.9.xS, and 3.10.xS before 3.10.1S allows remote attackers to cause a denial of service (device reload) via malformed RSVP packets, aka Bug ID CSCug75942.",
"id": "GHSA-v498-qc29-j9m6",
"modified": "2022-05-17T01:24:57Z",
"published": "2022-05-17T01:24:57Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2014-3355"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/96175"
},
{
"type": "WEB",
"url": "http://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20140924-metadata"
},
{
"type": "WEB",
"url": "http://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20140924-metadata/cvrf/cisco-sa-20140924-metadata_cvrf.xml"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/70130"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id/1030894"
}
],
"schema_version": "1.4.0",
"severity": []
}
Mitigation MIT-3
Strategy: Language Selection
- Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
- For example, many languages that perform their own memory management, such as Java and Perl, are not subject to buffer overflows. Other languages, such as Ada and C#, typically provide overflow protection, but the protection can be disabled by the programmer.
- Be wary that a language's interface to native code may still be subject to overflows, even if the language itself is theoretically safe.
Mitigation MIT-4.1
Strategy: Libraries or Frameworks
- Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
- Examples include the Safe C String Library (SafeStr) by Messier and Viega [REF-57], and the Strsafe.h library from Microsoft [REF-56]. These libraries provide safer versions of overflow-prone string-handling functions.
Mitigation MIT-10
Strategy: Environment Hardening
- Use automatic buffer overflow detection mechanisms that are offered by certain compilers or compiler extensions. Examples include: the Microsoft Visual Studio /GS flag, Fedora/Red Hat FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice, which provide various mechanisms including canary-based detection and range/index checking.
- D3-SFCV (Stack Frame Canary Validation) from D3FEND [REF-1334] discusses canary-based detection in detail.
Mitigation MIT-9
- Consider adhering to the following rules when allocating and managing an application's memory:
- Double check that the buffer is as large as specified.
- When using functions that accept a number of bytes to copy, such as strncpy(), be aware that if the destination buffer size is equal to the source buffer size, it may not NULL-terminate the string.
- Check buffer boundaries if accessing the buffer in a loop and make sure there is no danger of writing past the allocated space.
- If necessary, truncate all input strings to a reasonable length before passing them to the copy and concatenation functions.
Mitigation MIT-11
Strategy: Environment Hardening
- Run or compile the software using features or extensions that randomly arrange the positions of a program's executable and libraries in memory. Because this makes the addresses unpredictable, it can prevent an attacker from reliably jumping to exploitable code.
- Examples include Address Space Layout Randomization (ASLR) [REF-58] [REF-60] and Position-Independent Executables (PIE) [REF-64]. Imported modules may be similarly realigned if their default memory addresses conflict with other modules, in a process known as "rebasing" (for Windows) and "prelinking" (for Linux) [REF-1332] using randomly generated addresses. ASLR for libraries cannot be used in conjunction with prelink since it would require relocating the libraries at run-time, defeating the whole purpose of prelinking.
- For more information on these techniques see D3-SAOR (Segment Address Offset Randomization) from D3FEND [REF-1335].
Mitigation MIT-12
Strategy: Environment Hardening
- Use a CPU and operating system that offers Data Execution Protection (using hardware NX or XD bits) or the equivalent techniques that simulate this feature in software, such as PaX [REF-60] [REF-61]. These techniques ensure that any instruction executed is exclusively at a memory address that is part of the code segment.
- For more information on these techniques see D3-PSEP (Process Segment Execution Prevention) from D3FEND [REF-1336].
Mitigation MIT-13
Replace unbounded copy functions with analogous functions that support length arguments, such as strcpy with strncpy. Create these if they are not available.
CAPEC-10: Buffer Overflow via Environment Variables
This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the adversary finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
CAPEC-100: Overflow Buffers
Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an adversary. As a consequence, an adversary is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the adversaries' choice.
CAPEC-123: Buffer Manipulation
An adversary manipulates an application's interaction with a buffer in an attempt to read or modify data they shouldn't have access to. Buffer attacks are distinguished in that it is the buffer space itself that is the target of the attack rather than any code responsible for interpreting the content of the buffer. In virtually all buffer attacks the content that is placed in the buffer is immaterial. Instead, most buffer attacks involve retrieving or providing more input than can be stored in the allocated buffer, resulting in the reading or overwriting of other unintended program memory.
CAPEC-14: Client-side Injection-induced Buffer Overflow
This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service. This hostile service is created to deliver the correct content to the client software. For example, if the client-side application is a browser, the service will host a webpage that the browser loads.
CAPEC-24: Filter Failure through Buffer Overflow
In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
CAPEC-42: MIME Conversion
An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.
CAPEC-44: Overflow Binary Resource File
An attack of this type exploits a buffer overflow vulnerability in the handling of binary resources. Binary resources may include music files like MP3, image files like JPEG files, and any other binary file. These attacks may pass unnoticed to the client machine through normal usage of files, such as a browser loading a seemingly innocent JPEG file. This can allow the adversary access to the execution stack and execute arbitrary code in the target process.
CAPEC-45: Buffer Overflow via Symbolic Links
This type of attack leverages the use of symbolic links to cause buffer overflows. An adversary can try to create or manipulate a symbolic link file such that its contents result in out of bounds data. When the target software processes the symbolic link file, it could potentially overflow internal buffers with insufficient bounds checking.
CAPEC-46: Overflow Variables and Tags
This type of attack leverages the use of tags or variables from a formatted configuration data to cause buffer overflow. The adversary crafts a malicious HTML page or configuration file that includes oversized strings, thus causing an overflow.
CAPEC-47: Buffer Overflow via Parameter Expansion
In this attack, the target software is given input that the adversary knows will be modified and expanded in size during processing. This attack relies on the target software failing to anticipate that the expanded data may exceed some internal limit, thereby creating a buffer overflow.
CAPEC-8: Buffer Overflow in an API Call
This attack targets libraries or shared code modules which are vulnerable to buffer overflow attacks. An adversary who has knowledge of known vulnerable libraries or shared code can easily target software that makes use of these libraries. All clients that make use of the code library thus become vulnerable by association. This has a very broad effect on security across a system, usually affecting more than one software process.
CAPEC-9: Buffer Overflow in Local Command-Line Utilities
This attack targets command-line utilities available in a number of shells. An adversary can leverage a vulnerability found in a command-line utility to escalate privilege to root.