CWE-127
Weakness AllowedBuffer Under-read
Abstraction: Variant · Status: Draft
The product reads from a buffer using buffer access mechanisms such as indexes or pointers that reference memory locations prior to the targeted buffer.
Mapping guidance
This CWE entry is at the Variant level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.
Modes of introduction
This typically occurs when the pointer or its index is decremented to a position before the buffer, when pointer arithmetic results in a position before the beginning of the valid memory location, or when a negative index is used. This may result in exposure of sensitive information or possibly a crash.
Detection methods
Automated Static Analysis
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Effectiveness: High
Automated Dynamic Analysis
Use tools that are integrated during compilation to insert runtime error-checking mechanisms related to memory safety errors, such as AddressSanitizer (ASan) for C/C++ [REF-1518].
Effectiveness: Moderate
Crafted inputs are necessary to reach the code containing the error, such as generated by fuzzers. Also, these tools may reduce performance, and they only report the error condition - not the original mistake that led to the error.
Notes
Research Gap
Under-studied.
Content history
updated Applicable_Platforms, Relationships, Taxonomy_Mappings, Weakness_Ordinalities
updated Description, Relationships
updated Common_Consequences
updated Relationships
updated Relationships, Taxonomy_Mappings
updated Causal_Nature
updated Common_Consequences, References
updated Relationships
updated Description
updated References, Relationships
updated Mapping_Notes
updated Observed_Examples
updated Affected_Resources, Common_Consequences, Demonstrative_Examples, Functional_Areas
updated Applicable_Platforms, Description, Detection_Factors, Modes_of_Introduction, References
25 vulnerabilities reference this CWE, most recent first.
GHSA-FJQ3-FFVR-VM46
Vulnerability from github – Published: 2026-05-18 20:12 – Updated: 2026-06-09 10:58Summary
The Java TLS ioctl probe reads user-controlled ioctl pointers with bpf_probe_read instead of bpf_probe_read_user. An instrumented local process can therefore point OBI at kernel memory and cause that memory to be copied into telemetry.
Details
The vulnerable path is in bpf/generictracer/java_tls.c. The kprobe hooks do_vfs_ioctl, filters on fd == 0 and the Java TLS magic command, and then treats the third ioctl argument as a structured buffer. It reads fields from that pointer using bpf_probe_read, including:
- the operation byte from
arg - connection metadata from
arg + 1 - the payload length from
arg + 1 + sizeof(connection_info_t)
If len > 0, it computes buf = arg + 1 + sizeof(connection_info_t) + sizeof(u32) and passes that pointer into handle_buf_with_connection.
The next stage, bpf/generictracer/k_tracer_defs.h, uses bpf_probe_read(args->small_buf, MIN_HTTP2_SIZE, (void *)args->u_buf); on the supplied pointer and tail-calls deeper protocol logic. The HTTP protocol path then reads from u_buf and emits the bytes through bpf_ringbuf_output in bpf/generictracer/protocol_http.h.
Because the ioctl pointer originates in user space, the probe should be using bpf_probe_read_user with strict length validation. Using bpf_probe_read instead makes it possible for an instrumented process to supply a kernel pointer and exfiltrate kernel-resident bytes into telemetry.
PoC
A complete lab reproduction requires:
- a vulnerable build of OBI with Java TLS instrumentation enabled
- a host capable of loading the BPF program
- a local process that issues the Java TLS magic ioctl with an attacker-controlled pointer
Suggested reproduction steps:
git checkout v0.0.0-rc.1+build
make build
sudo ./bin/obi
Then run a local helper that issues the matching ioctl command against fd=0 and supplies a crafted pointer.
// save as /tmp/ioctl_kernel_ptr.c
#include <stdio.h>
#include <stdint.h>
#include <sys/ioctl.h>
#include <unistd.h>
#define JAVA_TLS_MAGIC 0x0b10b1
int main(void) {
void *ptr = (void *)0xffff888000000000ULL;
long rc = ioctl(0, JAVA_TLS_MAGIC, ptr);
printf("ioctl rc=%ld\n", rc);
return 0;
}
Compile and run:
cc -O2 -o /tmp/ioctl_kernel_ptr /tmp/ioctl_kernel_ptr.c
/tmp/ioctl_kernel_ptr
On a vulnerable system, if the supplied pointer references readable kernel memory and the bytes satisfy the expected Java TLS structure enough to pass the early checks, OBI can read from that address and emit the resulting bytes into telemetry. The remaining local prerequisite is a host session with sufficient BPF capability to load and inspect the probe; the compile side of the reproduction is already satisfied here.
Impact
This is a local kernel memory disclosure primitive reachable from unprivileged instrumented processes. It affects deployments that enable Java TLS support. Successful exploitation can expose kernel memory contents to the privileged OBI agent and then to downstream telemetry systems.
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "go.opentelemetry.io/obi"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.9.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-45683"
],
"database_specific": {
"cwe_ids": [
"CWE-127",
"CWE-200"
],
"github_reviewed": true,
"github_reviewed_at": "2026-05-18T20:12:04Z",
"nvd_published_at": "2026-06-02T16:16:43Z",
"severity": "LOW"
},
"details": "### Summary\n\nThe Java TLS ioctl probe reads user-controlled ioctl pointers with `bpf_probe_read` instead of `bpf_probe_read_user`. An instrumented local process can therefore point OBI at kernel memory and cause that memory to be copied into telemetry.\n\n### Details\n\nThe vulnerable path is in [bpf/generictracer/java_tls.c](https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/blob/360521f411213566a3b557a1f0c093e6cd68a4de/bpf/generictracer/java_tls.c#L66-L163). The kprobe hooks `do_vfs_ioctl`, filters on `fd == 0` and the Java TLS magic command, and then treats the third ioctl argument as a structured buffer. It reads fields from that pointer using `bpf_probe_read`, including:\n\n- the operation byte from `arg`\n- connection metadata from `arg + 1`\n- the payload length from `arg + 1 + sizeof(connection_info_t)`\n\nIf `len \u003e 0`, it computes `buf = arg + 1 + sizeof(connection_info_t) + sizeof(u32)` and passes that pointer into [`handle_buf_with_connection`](https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/blob/360521f411213566a3b557a1f0c093e6cd68a4de/bpf/generictracer/k_tracer_defs.h#L67).\n\nThe next stage, [bpf/generictracer/k_tracer_defs.h](https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/blob/360521f411213566a3b557a1f0c093e6cd68a4de/bpf/generictracer/k_tracer_defs.h#L62), uses [`bpf_probe_read(args-\u003esmall_buf, MIN_HTTP2_SIZE, (void *)args-\u003eu_buf);`](https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/blob/360521f411213566a3b557a1f0c093e6cd68a4de/bpf/generictracer/k_tracer_defs.h#L62) on the supplied pointer and tail-calls deeper protocol logic. The HTTP protocol path then reads from `u_buf` and emits the bytes through `bpf_ringbuf_output` in [bpf/generictracer/protocol_http.h](https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/blob/360521f411213566a3b557a1f0c093e6cd68a4de/bpf/generictracer/protocol_http.h#L477).\n\nBecause the ioctl pointer originates in user space, the probe should be using `bpf_probe_read_user` with strict length validation. Using `bpf_probe_read` instead makes it possible for an instrumented process to supply a kernel pointer and exfiltrate kernel-resident bytes into telemetry.\n\n### PoC\n\nA complete lab reproduction requires:\n\n1. a vulnerable build of OBI with Java TLS instrumentation enabled\n2. a host capable of loading the BPF program\n3. a local process that issues the Java TLS magic ioctl with an attacker-controlled pointer\n\nSuggested reproduction steps:\n\n```bash\ngit checkout v0.0.0-rc.1+build\nmake build\nsudo ./bin/obi\n```\n\nThen run a local helper that issues the matching ioctl command against `fd=0` and supplies a crafted pointer.\n\n```c\n// save as /tmp/ioctl_kernel_ptr.c\n#include \u003cstdio.h\u003e\n#include \u003cstdint.h\u003e\n#include \u003csys/ioctl.h\u003e\n#include \u003cunistd.h\u003e\n\n#define JAVA_TLS_MAGIC 0x0b10b1\n\nint main(void) {\n void *ptr = (void *)0xffff888000000000ULL;\n long rc = ioctl(0, JAVA_TLS_MAGIC, ptr);\n printf(\"ioctl rc=%ld\\n\", rc);\n return 0;\n}\n```\n\nCompile and run:\n\n```bash\ncc -O2 -o /tmp/ioctl_kernel_ptr /tmp/ioctl_kernel_ptr.c\n/tmp/ioctl_kernel_ptr\n```\n\nOn a vulnerable system, if the supplied pointer references readable kernel memory and the bytes satisfy the expected Java TLS structure enough to pass the early checks, OBI can read from that address and emit the resulting bytes into telemetry. The remaining local prerequisite is a host session with sufficient BPF capability to load and inspect the probe; the compile side of the reproduction is already satisfied here.\n\n### Impact\n\nThis is a local kernel memory disclosure primitive reachable from unprivileged instrumented processes. It affects deployments that enable Java TLS support. Successful exploitation can expose kernel memory contents to the privileged OBI agent and then to downstream telemetry systems.",
"id": "GHSA-fjq3-ffvr-vm46",
"modified": "2026-06-09T10:58:41Z",
"published": "2026-05-18T20:12:04Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/security/advisories/GHSA-fjq3-ffvr-vm46"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-45683"
},
{
"type": "PACKAGE",
"url": "https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation"
},
{
"type": "WEB",
"url": "https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/releases/tag/v0.9.0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "OpenTelemetry eBPF Instrumentation: Java TLS ioctl kprobe allows kernel memory disclosure"
}
GHSA-FXM8-2G6Q-9HHF
Vulnerability from github – Published: 2026-10-17 00:31 – Updated: 2026-10-20 21:30Text::CSV_XS versions before 1.65 for Perl read before the start of an all-blank field under allow_whitespace in strip_trail_whitespace.
Under allow_whitespace, strip_trail_whitespace removes trailing spaces and tabs from each unquoted field without stopping at the start of the field. For a field of only blanks it reads the byte before the field's heap buffer. If that byte is also a space or tab, it may be zeroed and the walk continue backwards, depending on what the allocator placed there.
Leading blanks are normally skipped before a field is stored, but an all-blank field still arrives after a leading escape_char that differs from quote_char, or as a quoted field in getline when its line ends in two CRs.
{
"affected": [],
"aliases": [
"CVE-2026-110758"
],
"database_specific": {
"cwe_ids": [
"CWE-127"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-10-16T23:17:01Z",
"severity": "HIGH"
},
"details": "Text::CSV_XS versions before 1.65 for Perl read before the start of an all-blank field under allow_whitespace in strip_trail_whitespace.\n\nUnder allow_whitespace, strip_trail_whitespace removes trailing spaces and tabs from each unquoted field without stopping at the start of the field. For a field of only blanks it reads the byte before the field\u0027s heap buffer. If that byte is also a space or tab, it may be zeroed and the walk continue backwards, depending on what the allocator placed there.\n\nLeading blanks are normally skipped before a field is stored, but an all-blank field still arrives after a leading escape_char that differs from quote_char, or as a quoted field in getline when its line ends in two CRs.",
"id": "GHSA-fxm8-2g6q-9hhf",
"modified": "2026-10-20T21:30:43Z",
"published": "2026-10-17T00:31:19Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-110758"
},
{
"type": "WEB",
"url": "https://github.com/cpan-authors/Text-CSV_XS/commit/efed7ee21177c59a5b69e787f84154e1fcb0d095.patch"
},
{
"type": "WEB",
"url": "https://metacpan.org/release/HMBRAND/Text-CSV_XS-1.65/changes"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-GH7M-XPP3-W3VQ
Vulnerability from github – Published: 2026-11-02 15:31 – Updated: 2026-11-06 21:31inih before r63 contains a one-byte stack buffer under-read in ini_parse_stream() in ini.c that allows attackers to read abyss[-1] via an embedded NUL byte after an overlong line. Attackers can supply an INI file or string with a line of at least INI_MAX_LINE-1 bytes followed by a NUL byte, causing undefined behavior reported by memory sanitizers.
{
"affected": [],
"aliases": [
"CVE-2025-71450"
],
"database_specific": {
"cwe_ids": [
"CWE-127"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-11-02T15:17:12Z",
"severity": "MODERATE"
},
"details": "inih before r63 contains a one-byte stack buffer under-read in ini_parse_stream() in ini.c that allows attackers to read abyss[-1] via an embedded NUL byte after an overlong line. Attackers can supply an INI file or string with a line of at least INI_MAX_LINE-1 bytes followed by a NUL byte, causing undefined behavior reported by memory sanitizers.",
"id": "GHSA-gh7m-xpp3-w3vq",
"modified": "2026-11-06T21:31:08Z",
"published": "2026-11-02T15:31:34Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-71450"
},
{
"type": "WEB",
"url": "https://github.com/benhoyt/inih/issues/223"
},
{
"type": "WEB",
"url": "https://github.com/benhoyt/inih/pull/206"
},
{
"type": "WEB",
"url": "https://github.com/benhoyt/inih/commit/8e06f6b77b5d4471bdc6d85ada81b67d37354a5c"
},
{
"type": "WEB",
"url": "https://github.com/benhoyt/inih/blob/r62/ini.c#L162-L169"
},
{
"type": "WEB",
"url": "https://github.com/benhoyt/inih/releases/tag/r63"
},
{
"type": "WEB",
"url": "https://hackmd.io/@haindpwn/cve-2025-71450-inih-long-line-discard-oob-read#Detailed-attack-steps"
},
{
"type": "WEB",
"url": "https://hackmd.io/@haindpwn/inih-long-line-discard-oob-read"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/inih-before-r63-stack-buffer-under-read-in-ini-parse-stream-discard-loop"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/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-J57G-62WM-J7W2
Vulnerability from github – Published: 2026-11-09 21:31 – Updated: 2026-11-09 21:31FFmpeg through 9.0.2 contains a heap out-of-bounds read vulnerability in libavcodec/proresenc_anatoliy.c that occurs when the prores_aw encoder processes interlaced, odd-height frames. Attackers can supply odd-height video that causes subimage_with_fill_template() to fill padding rows from memory before the fill_y buffer, leaking heap contents into the encoded output.
{
"affected": [],
"aliases": [
"CVE-2026-125188"
],
"database_specific": {
"cwe_ids": [
"CWE-127"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-11-09T19:16:54Z",
"severity": "LOW"
},
"details": "FFmpeg through 9.0.2 contains a heap out-of-bounds read vulnerability in libavcodec/proresenc_anatoliy.c that occurs when the prores_aw encoder processes interlaced, odd-height frames. Attackers can supply odd-height video that causes subimage_with_fill_template() to fill padding rows from memory before the fill_y buffer, leaking heap contents into the encoded output.",
"id": "GHSA-j57g-62wm-j7w2",
"modified": "2026-11-09T21:31:55Z",
"published": "2026-11-09T21:31:55Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-125188"
},
{
"type": "WEB",
"url": "https://github.com/FFmpeg/FFmpeg/commit/ad2287d6d2511af66222e8f7e40d546bc8d461ec"
},
{
"type": "WEB",
"url": "https://github.com/FFmpeg/FFmpeg/commit/d74f5e0559ba09d942c47687856349b03c1115dd"
},
{
"type": "WEB",
"url": "https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24490"
},
{
"type": "WEB",
"url": "https://github.com/FFmpeg/FFmpeg"
},
{
"type": "WEB",
"url": "https://github.com/FFmpeg/FFmpeg/blob/n9.0.2/libavcodec/proresenc_anatoliy.c#L499"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/ffmpeg-through-9.0.2-prores-prores-aw-heap-out-of-bounds-read-in-interlaced-encoding"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/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-WCV6-8JQC-WFCX
Vulnerability from github – Published: 2025-10-15 18:31 – Updated: 2025-10-15 18:31Multiple Cisco products are affected by a vulnerability in the Snort 3 HTTP Decoder that could allow an unauthenticated, remote attacker to cause the disclosure of possible sensitive data or cause the Snort 3 Detection Engine to crash.
This vulnerability is due to an error in the logic of buffer handling when the MIME fields of the HTTP header are parsed. This can result in a buffer under-read. An attacker could exploit this vulnerability by sending crafted HTTP packets through an established connection that is parsed by Snort 3. A successful exploit could allow the attacker to induce one of two possible outcomes: the unexpected restarting of the Snort 3 Detection Engine, which could cause a denial of service (DoS) condition, or information disclosure of sensitive information in the Snort 3 data stream. Due to the under-read condition, it is possible that sensitive information that is not valid connection data could be returned.
{
"affected": [],
"aliases": [
"CVE-2025-20359"
],
"database_specific": {
"cwe_ids": [
"CWE-127"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-10-15T17:15:49Z",
"severity": "MODERATE"
},
"details": "Multiple Cisco products are affected by a vulnerability in the Snort 3 HTTP Decoder that could allow an unauthenticated, remote attacker to cause the disclosure of possible sensitive data or cause the Snort 3 Detection Engine to crash.\n\nThis vulnerability is due to an error in the logic of buffer handling when the MIME fields of the HTTP header are parsed. This can result in a buffer under-read. An attacker could exploit this vulnerability by sending crafted HTTP packets through an established connection that is parsed by Snort 3. A successful exploit could allow the attacker to induce one of two possible outcomes: the unexpected restarting of the Snort 3 Detection Engine, which could cause a denial of service (DoS) condition, or information disclosure of sensitive information in the Snort 3 data stream. Due to the under-read condition, it is possible that sensitive information that is not valid connection data could be returned.",
"id": "GHSA-wcv6-8jqc-wfcx",
"modified": "2025-10-15T18:31:51Z",
"published": "2025-10-15T18:31:51Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-20359"
},
{
"type": "WEB",
"url": "https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-snort3-mime-vulns-tTL8PgVH"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L",
"type": "CVSS_V3"
}
]
}
No mitigation information available for this CWE.
No CAPEC attack patterns related to this CWE.