CWE-122
AllowedHeap-based Buffer Overflow
Abstraction: Variant · Status: Draft
A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().
4096 vulnerabilities reference this CWE, most recent first.
GHSA-6P69-V349-83RH
Vulnerability from github – Published: 2026-05-01 00:31 – Updated: 2026-06-30 03:36RDP protocol dissector crash in Wireshark 4.6.0 to 4.6.4 and 4.4.0 to 4.4.14 allows denial of service and possible code execution
{
"affected": [],
"aliases": [
"CVE-2026-5405"
],
"database_specific": {
"cwe_ids": [
"CWE-122",
"CWE-787"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-05-01T00:16:24Z",
"severity": "HIGH"
},
"details": "RDP protocol dissector crash in Wireshark 4.6.0 to 4.6.4 and 4.4.0 to 4.4.14 allows denial of service and possible code execution",
"id": "GHSA-6p69-v349-83rh",
"modified": "2026-06-30T03:36:28Z",
"published": "2026-05-01T00:31:28Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-5405"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:20600"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:26182"
},
{
"type": "WEB",
"url": "https://access.redhat.com/security/cve/CVE-2026-5405"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2464273"
},
{
"type": "WEB",
"url": "https://gitlab.com/wireshark/wireshark/-/issues/21105"
},
{
"type": "WEB",
"url": "https://gitlab.com/wireshark/wireshark/-/work_items/21105"
},
{
"type": "WEB",
"url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-5405.json"
},
{
"type": "WEB",
"url": "https://www.wireshark.org/security/wnpa-sec-2026-17.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-6PP6-5H3Q-MGG3
Vulnerability from github – Published: 2025-05-14 21:31 – Updated: 2025-05-14 21:31IBM Semeru Runtime 8.0.302.0 through 8.0.442.0, 11.0.12.0 through 11.0.26.0, 17.0.0.0 through 17.0.14.0, and 21.0.0.0 through 12.0.6.0 is vulnerable to a denial of service caused by a buffer overflow and subsequent crash, due to a defect in its native AES/CBC encryption implementation.
{
"affected": [],
"aliases": [
"CVE-2025-2900"
],
"database_specific": {
"cwe_ids": [
"CWE-122",
"CWE-787"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-05-14T19:15:52Z",
"severity": "HIGH"
},
"details": "IBM Semeru Runtime 8.0.302.0 through 8.0.442.0, 11.0.12.0 through 11.0.26.0, 17.0.0.0 through 17.0.14.0, and 21.0.0.0 through 12.0.6.0 is vulnerable to a denial of service caused by a buffer overflow and subsequent crash, due to a defect in its native AES/CBC encryption implementation.",
"id": "GHSA-6pp6-5h3q-mgg3",
"modified": "2025-05-14T21:31:18Z",
"published": "2025-05-14T21:31:18Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-2900"
},
{
"type": "WEB",
"url": "https://www.ibm.com/support/pages/node/7233415"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-6PPF-H643-Q5FW
Vulnerability from github – Published: 2022-09-17 00:00 – Updated: 2022-09-17 00:00Adobe InDesign versions 16.4.2 (and earlier) and 17.3 (and earlier) are affected by a Heap-based Buffer Overflow vulnerability that could result in arbitrary code execution in the context of the current user. Exploitation of this issue requires user interaction in that a victim must open a malicious file.
{
"affected": [],
"aliases": [
"CVE-2022-38414"
],
"database_specific": {
"cwe_ids": [
"CWE-122",
"CWE-787"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-09-16T18:15:00Z",
"severity": "HIGH"
},
"details": "Adobe InDesign versions 16.4.2 (and earlier) and 17.3 (and earlier) are affected by a Heap-based Buffer Overflow vulnerability that could result in arbitrary code execution in the context of the current user. Exploitation of this issue requires user interaction in that a victim must open a malicious file.",
"id": "GHSA-6ppf-h643-q5fw",
"modified": "2022-09-17T00:00:32Z",
"published": "2022-09-17T00:00:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-38414"
},
{
"type": "WEB",
"url": "https://helpx.adobe.com/security/products/indesign/apsb22-50.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-6PQM-MCCV-6977
Vulnerability from github – Published: 2025-10-29 21:30 – Updated: 2025-11-03 18:31GIMP HDR File Parsing Heap-based Buffer Overflow Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of GIMP. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file.
The specific flaw exists within the parsing of HDR files. The issue results from the lack of proper validation of the length of user-supplied data prior to copying it to a heap-based buffer. An attacker can leverage this vulnerability to execute code in the context of the current process. Was ZDI-CAN-27803.
{
"affected": [],
"aliases": [
"CVE-2025-10921"
],
"database_specific": {
"cwe_ids": [
"CWE-122",
"CWE-787"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-10-29T20:15:34Z",
"severity": "HIGH"
},
"details": "GIMP HDR File Parsing Heap-based Buffer Overflow Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of GIMP. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file.\n\nThe specific flaw exists within the parsing of HDR files. The issue results from the lack of proper validation of the length of user-supplied data prior to copying it to a heap-based buffer. An attacker can leverage this vulnerability to execute code in the context of the current process. Was ZDI-CAN-27803.",
"id": "GHSA-6pqm-mccv-6977",
"modified": "2025-11-03T18:31:51Z",
"published": "2025-10-29T21:30:33Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-10921"
},
{
"type": "WEB",
"url": "https://gitlab.gnome.org/GNOME/gegl/-/commit/0e68b7471dabf2800d780819c19bd5e6462f565f"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2025/10/msg00021.html"
},
{
"type": "WEB",
"url": "https://www.zerodayinitiative.com/advisories/ZDI-25-910"
}
],
"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-6Q5P-RP5C-WMPH
Vulnerability from github – Published: 2024-03-07 03:30 – Updated: 2024-08-27 21:31zlog 1.2.16 has a heap-based buffer overflow in struct zlog_rule_s while creating a new rule that is already defined in the provided configuration file. A regular user can achieve arbitrary code execution.
{
"affected": [],
"aliases": [
"CVE-2024-22857"
],
"database_specific": {
"cwe_ids": [
"CWE-122"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-03-07T01:15:52Z",
"severity": "CRITICAL"
},
"details": "zlog 1.2.16 has a heap-based buffer overflow in struct zlog_rule_s while creating a new rule that is already defined in the provided configuration file. A regular user can achieve arbitrary code execution.",
"id": "GHSA-6q5p-rp5c-wmph",
"modified": "2024-08-27T21:31:10Z",
"published": "2024-03-07T03:30:40Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-22857"
},
{
"type": "WEB",
"url": "https://github.com/HardySimpson/zlog/pull/251"
},
{
"type": "WEB",
"url": "https://github.com/HardySimpson/zlog"
},
{
"type": "WEB",
"url": "https://github.com/HardySimpson/zlog/blob/1a7b1a6fb956b92a4079ccc91f30da21f34ca063/src/rule.h#L30"
},
{
"type": "WEB",
"url": "https://www.cybersecurity-help.cz/vdb/SB2024022842"
},
{
"type": "WEB",
"url": "https://www.ebryx.com/blogs/arbitrary-code-execution-in-zlog-cve-2024-22857"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-6QJ8-GW6P-HC5P
Vulnerability from github – Published: 2026-06-09 21:32 – Updated: 2026-06-09 21:32SQLite before 3.53.2 contains memory corruption vulnerabilities in the FTS5 full-text search extension that allow attackers to cause process crashes, memory exhaustion, or arbitrary code execution by supplying a crafted database with malformed FTS5 page data. Attackers can trigger an out-of-bounds read in fts5LeafSeek() via an attacker-controlled loop bound and a heap buffer overflow write in fts5ChunkIterate() through a crafted continuation page causing an integer underflow, exploitable when an FTS5 MATCH query is executed against the malicious database.
{
"affected": [],
"aliases": [
"CVE-2026-11822"
],
"database_specific": {
"cwe_ids": [
"CWE-122"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-06-09T20:16:32Z",
"severity": "HIGH"
},
"details": "SQLite before 3.53.2 contains memory corruption vulnerabilities in the FTS5 full-text search extension that allow attackers to cause process crashes, memory exhaustion, or arbitrary code execution by supplying a crafted database with malformed FTS5 page data. Attackers can trigger an out-of-bounds read in fts5LeafSeek() via an attacker-controlled loop bound and a heap buffer overflow write in fts5ChunkIterate() through a crafted continuation page causing an integer underflow, exploitable when an FTS5 MATCH query is executed against the malicious database.",
"id": "GHSA-6qj8-gw6p-hc5p",
"modified": "2026-06-09T21:32:36Z",
"published": "2026-06-09T21:32:36Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-11822"
},
{
"type": "WEB",
"url": "https://sqlite.org/releaselog/3_53_2.html"
},
{
"type": "WEB",
"url": "https://sqlite.org/src/info/061febcf41ca"
},
{
"type": "WEB",
"url": "https://sqlite.org/src/info/4a5ad516ea93"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/sqlite-before-memory-corruption-in-fts5-extension"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-6QJJ-3Q9G-G44P
Vulnerability from github – Published: 2022-05-24 17:17 – Updated: 2022-10-07 18:16There is a buffer overwrite vulnerability in the Quram qmg library of Samsung's Android OS versions O(8.x), P(9.0) and Q(10.0). An unauthenticated, unauthorized attacker sending a specially crafted MMS to a vulnerable phone can trigger a heap-based buffer overflow in the Quram image codec leading to an arbitrary remote code execution (RCE) without any user interaction. The Samsung ID is SVE-2020-16747.
{
"affected": [],
"aliases": [
"CVE-2020-8899"
],
"database_specific": {
"cwe_ids": [
"CWE-122",
"CWE-787"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2020-05-06T17:15:00Z",
"severity": "HIGH"
},
"details": "There is a buffer overwrite vulnerability in the Quram qmg library of Samsung\u0027s Android OS versions O(8.x), P(9.0) and Q(10.0). An unauthenticated, unauthorized attacker sending a specially crafted MMS to a vulnerable phone can trigger a heap-based buffer overflow in the Quram image codec leading to an arbitrary remote code execution (RCE) without any user interaction. The Samsung ID is SVE-2020-16747.",
"id": "GHSA-6qjj-3q9g-g44p",
"modified": "2022-10-07T18:16:22Z",
"published": "2022-05-24T17:17:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-8899"
},
{
"type": "WEB",
"url": "https://bugs.chromium.org/p/project-zero/issues/detail?id=2002"
},
{
"type": "WEB",
"url": "https://security.samsungmobile.com/securityUpdate.smsb"
},
{
"type": "WEB",
"url": "https://www.kb.cert.org/vuls/id/366027"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.com/files/157620/Samsung-Android-Remote-Code-Execution.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-6QXW-X3VC-PHRG
Vulnerability from github – Published: 2025-12-14 06:30 – Updated: 2025-12-19 00:31Exim before 4.99.1 allows remote heap corruption that will be further described on 2025-12-18.
{
"affected": [],
"aliases": [
"CVE-2025-67896"
],
"database_specific": {
"cwe_ids": [
"CWE-122"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-12-14T04:15:50Z",
"severity": "MODERATE"
},
"details": "Exim before 4.99.1 allows remote heap corruption that will be further described on 2025-12-18.",
"id": "GHSA-6qxw-x3vc-phrg",
"modified": "2025-12-19T00:31:41Z",
"published": "2025-12-14T06:30:23Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-67896"
},
{
"type": "WEB",
"url": "https://exim.org/static/doc/security"
},
{
"type": "WEB",
"url": "https://exim.org/static/doc/security/EXIM-Security-2025-12-09.1/report.txt"
},
{
"type": "WEB",
"url": "https://www.openwall.com/lists/oss-security/2025/12/11/2"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2025/12/14/1"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2025/12/18/3"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-6R2X-8PQ8-9489
Vulnerability from github – Published: 2025-06-30 18:41 – Updated: 2025-07-01 13:13Impact
The nativeImage.createFromPath() and nativeImage.createFromBuffer() functions call a function downstream that is vulnerable to a heap buffer overflow. An Electron program that uses either of the affected functions is vulnerable to a buffer overflow if an attacker is in control of the image's height, width, and contents.
Workaround
There are no app-side workarounds for this issue. You must update your Electron version to be protected.
Patches
v28.3.2v29.3.3v30.0.3
For More Information
If you have any questions or comments about this advisory, email us at security@electronjs.org.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "electron"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "28.3.2"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "electron"
},
"ranges": [
{
"events": [
{
"introduced": "29.0.0-alpha.1"
},
{
"fixed": "29.3.3"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "electron"
},
"ranges": [
{
"events": [
{
"introduced": "30.0.0-alpha.1"
},
{
"fixed": "30.0.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-46993"
],
"database_specific": {
"cwe_ids": [
"CWE-122"
],
"github_reviewed": true,
"github_reviewed_at": "2025-06-30T18:41:08Z",
"nvd_published_at": "2025-07-01T03:15:21Z",
"severity": "MODERATE"
},
"details": "### Impact\nThe `nativeImage.createFromPath()` and `nativeImage.createFromBuffer()` functions call a function downstream that is vulnerable to a heap buffer overflow. An Electron program that uses either of the affected functions is vulnerable to a buffer overflow if an attacker is in control of the image\u0027s height, width, and contents.\n\n### Workaround\nThere are no app-side workarounds for this issue. You must update your Electron version to be protected.\n\n### Patches\n\n- `v28.3.2`\n- `v29.3.3`\n- `v30.0.3`\n\n### For More Information\n\nIf you have any questions or comments about this advisory, email us at [security@electronjs.org](mailto:security@electronjs.org).",
"id": "GHSA-6r2x-8pq8-9489",
"modified": "2025-07-01T13:13:25Z",
"published": "2025-06-30T18:41:08Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/electron/electron/security/advisories/GHSA-6r2x-8pq8-9489"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-46993"
},
{
"type": "PACKAGE",
"url": "https://github.com/electron/electron"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U",
"type": "CVSS_V4"
}
],
"summary": "Electron vulnerable to Heap Buffer Overflow in NativeImage"
}
GHSA-6R46-2QJX-J5J3
Vulnerability from github – Published: 2026-03-24 15:30 – Updated: 2026-06-30 03:35NGINX Open Source and NGINX Plus have a vulnerability in the ngx_http_dav_module module that might allow an attacker to trigger a buffer overflow to the NGINX worker process; this vulnerability may result in termination of the NGINX worker process or modification of source or destination file names outside the document root. This issue affects NGINX Open Source and NGINX Plus when the configuration file uses DAV module MOVE or COPY methods, prefix location (nonregular expression location configuration), and alias directives. The integrity impact is constrained because the NGINX worker process user has low privileges and does not have access to the entire system. Note: Software versions which have reached End of Technical Support (EoTS) are not evaluated.
{
"affected": [],
"aliases": [
"CVE-2026-27654"
],
"database_specific": {
"cwe_ids": [
"CWE-120",
"CWE-122"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-03-24T15:16:33Z",
"severity": "HIGH"
},
"details": "NGINX Open Source and NGINX Plus have a vulnerability in the ngx_http_dav_module module that might allow an attacker to trigger a buffer overflow to the NGINX worker process; this vulnerability may result in termination of the NGINX worker process or modification of source or destination file names outside the document root. This issue affects NGINX Open Source and NGINX Plus when the configuration file uses DAV module MOVE or COPY methods, prefix location (nonregular expression location configuration), and alias directives. The integrity impact is constrained because the NGINX worker process user has low privileges and does not have access to the entire system. Note: Software versions which have reached End of Technical Support (EoTS) are not evaluated.",
"id": "GHSA-6r46-2qjx-j5j3",
"modified": "2026-06-30T03:35:59Z",
"published": "2026-03-24T15:30:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-27654"
},
{
"type": "WEB",
"url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-27654.json"
},
{
"type": "WEB",
"url": "https://my.f5.com/manage/s/article/K000160382"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2450776"
},
{
"type": "WEB",
"url": "https://access.redhat.com/security/cve/CVE-2026-27654"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:8346"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:7343"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:7002"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:6923"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:6907"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:6906"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:15966"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:15945"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:15943"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:15942"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:14836"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:13839"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:13680"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:13634"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:10065"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
Mitigation
Pre-design: Use a language or compiler that performs automatic bounds checking.
Mitigation
Use an abstraction library to abstract away risky APIs. Not a complete solution.
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-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
Implement and perform bounds checking on input.
Mitigation
Strategy: Libraries or Frameworks
Do not use dangerous functions such as gets. Look for their safe equivalent, which checks for the boundary.
Mitigation
Use OS-level preventative functionality. This is not a complete solution, but it provides some defense in depth.
CAPEC-92: Forced Integer Overflow
This attack forces an integer variable to go out of range. The integer variable is often used as an offset such as size of memory allocation or similarly. The attacker would typically control the value of such variable and try to get it out of range. For instance the integer in question is incremented past the maximum possible value, it may wrap to become a very small, or negative number, therefore providing a very incorrect value which can lead to unexpected behavior. At worst the attacker can execute arbitrary code.