Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CWE-193 (Off-by-one错误) — Vulnerability Class 115

115 vulnerabilities classified as CWE-193 (Off-by-one错误). AI Chinese analysis included.

CWE-193 represents an off-by-one error, a logic flaw where a product calculates or utilizes an incorrect maximum or minimum value that is exactly one unit greater or lesser than the correct limit. This weakness typically arises in boundary conditions during array indexing, loop iterations, or buffer allocation, leading to memory corruption or unexpected program termination. Attackers exploit these miscalculations to trigger buffer overflows, allowing them to overwrite adjacent memory structures with malicious payloads. By exceeding intended bounds, adversaries can execute arbitrary code, escalate privileges, or cause denial-of-service conditions. To prevent such vulnerabilities, developers must rigorously validate boundary conditions, employ static analysis tools to detect logic errors, and use high-level languages with automatic bounds checking. Additionally, thorough code reviews focusing on loop limits and array accesses ensure that integer arithmetic accurately reflects the intended data structure sizes, thereby eliminating the discrepancy that enables exploitation.

MITRE CWE Description
A product calculates or uses an incorrect maximum or minimum value that is 1 more, or 1 less, than the correct value.
Common Consequences (3)
Availability DoS: Crash, Exit, or Restart, DoS: Resource Consumption (CPU), DoS: Resource Consumption (Memory), DoS: Instability
This weakness will generally lead to undefined behavior and therefore crashes. In the case of overflows involving loop index variables, the likelihood of infinite loops is also high.
Integrity Modify Memory
If the value in question is important to data (as opposed to flow), simple data corruption has occurred. Also, if the wrap around results in other conditions such as buffer overflows, further memory corruption may occur.
Confidentiality, Availability, Access Control Execute Unauthorized Code or Commands, Bypass Protection Mechanism
This weakness can sometimes trigger buffer overflows which can be used to execute arbitrary code. This is usually outside the scope of a program's implicit security policy.
Mitigations (1)
Implementation When copying character arrays or using character manipulation methods, the correct size parameter must be used to account for the null terminator that needs to be added at the end of the array. Some examples of functions susceptible to this weakness in C include strcpy(), strncpy(), strcat(), strncat(), printf(), sprintf(), scanf() and sscanf().
Examples (2)
The following code allocates memory for a maximum number of widgets. It then gets a user-specified number of widgets, making sure that the user does not request too many. It then initializes the elements of the array using InitializeWidget(). Because the number of widgets can vary for each request, the code inserts a NULL pointer to signify the location of the last widget.
int i; unsigned int numWidgets; Widget **WidgetList; numWidgets = GetUntrustedSizeValue(); if ((numWidgets == 0) || (numWidgets > MAX_NUM_WIDGETS)) { ExitError("Incorrect number of widgets requested!"); } WidgetList = (Widget **)malloc(numWidgets * sizeof(Widget *)); printf("WidgetList ptr=%p\n", WidgetList); for(i=0; i<numWidgets; i++) { WidgetList[i] = InitializeWidget(); } WidgetList[numWidgets] = NULL; showWidgets(WidgetList);
Bad · C
In this example, the code does not account for the terminating null character, and it writes one byte beyond the end of the buffer.
char firstname[20]; char lastname[20]; char fullname[40]; fullname[0] = '\0'; strncat(fullname, firstname, 20); strncat(fullname, lastname, 20);
Bad · C
char firstname[20]; char lastname[20]; char fullname[40]; fullname[0] = '\0'; strncat(fullname, firstname, sizeof(fullname)-strlen(fullname)-1); strncat(fullname, lastname, sizeof(fullname)-strlen(fullname)-1);
Good · C
CVE ID Title CVSS Severity Published
CVE-2026-134695 GPAC MP4Box through 26.07.0 Out-of-Bounds Read in avilib via AVI Audio Tracks — gpac 6.1 Medium 2026-11-22
CVE-2026-130386 Contiki-NG through 5.2 Out-of-Bounds Access in MPL Multicast Seed-Set Iteration — Contiki-NG 6.5 Medium 2026-11-17
CVE-2026-109151 Deleting a Matter Credential Issuer clears the adjacent issuer's Aliro ValidityIteration state — nRF Door Lock and Access Control Add-on 7.0 High 2026-11-17
CVE-2026-128846 @fastify/busboy vulnerable to multipart file/field type confusion via chunk-dependent header parsing — @fastify/busboy 3.7 Low 2026-11-16
CVE-2026-129114 JSON::XS versions from 3.04 before 4.05 for Perl write one byte past a heap buffer when appending a one-byte chunk in incr_parse - - 2026-11-14
CVE-2026-126889 Chrome 157 前 V8 越界漏洞可远程执行代码 — Chrome - - 2026-11-11
CVE-2026-115819 One-byte buffer overflow in wide scanf %s and %[ conversions — glibc 4.8 Medium 2026-11-11
CVE-2026-40669 AMD SEV 固件越界漏洞致内存完整性受损 — AMD EPYC™ 9004 Series Processors 4.0 Medium 2026-11-10
CVE-2026-110046 Microsoft Office Word Information Disclosure Vulnerability — Microsoft 365 Apps for Enterprise 6.5 Medium 2026-11-10
CVE-2026-113771 Windows Container Isolation FS Filter Driver (unionfs.sys) Elevation of Privilege Vulnerability — Windows 11 version 26H1 5.5 Medium 2026-11-10
CVE-2026-88708 华硕路由器固件越界漏洞致服务崩溃 — Router firmware 5.3 Medium 2026-11-10
CVE-2026-125257 FFmpeg through 9.0.2 Heap Overflow via Nellymoser Encoder Trellis Search — FFmpeg 7.0 High 2026-11-09
CVE-2026-123370 compose-lint: `fix --apply` can delete a line the user did not select, including a security setting — compose-lint 5.1 Medium 2026-11-09
CVE-2026-116781 FreeSWITCH: Pre-authentication out-of-bounds writes in mod_xml_rpc WebSocket frame parsing — freeswitch 5.3 Medium 2026-11-05
CVE-2026-116574 FreeSWITCH: Off-by-one heap write in core XML serialization of four-byte UTF-8 sequences — freeswitch 5.9 Medium 2026-11-05
CVE-2026-116735 libpff through 20260926 Heap Out-of-Bounds Read via libpff_table_read_6c_record_entries — libpff 6.1 Medium 2026-10-26
CVE-2026-114460 Mod_qos: query truncation during json body merging permits security-rule bypass — mod_qos 5.3 Medium 2026-10-22
CVE-2026-12727 IBM MQ Buffer Overflow — MQ Operator 4.3 Medium 2026-10-19
CVE-2026-111273 unarr through 1.1.1 Off-by-One Heap Buffer Overflow via tar_get_name — unarr 6.1 Medium 2026-10-15
CVE-2026-108443 Microsoft Office Word Remote Code Execution Vulnerability — Microsoft 365 Apps for Enterprise 8.8 High 2026-10-15
CVE-2026-101302 Remote DoS via receive-side kernel TLS — FreeBSD - - 2026-10-15
CVE-2026-110604 Mini-XML 4.0.0 through 4.0.6 Stack Out-of-Bounds Write via mxml_strtod() — Mini-XML 3.6 Low 2026-10-14
CVE-2026-106584 OpenSSH<10.6证书过期时间错误 — OpenSSH 2.5 Low 2026-10-06
CVE-2026-104033 Sssd: sssd: access control bypass via improper ldap shadow expiration check — Red Hat Enterprise Linux 10 5.4 Medium 2026-10-06
CVE-2026-101014 Trusted Domain Project OpenDMARC DMARC Record opendmarc_util.c opendmarc_util_cleanup off-by-one — OpenDMARC 7.3 High 2026-09-28
CVE-2026-100889 Trusted Domain Project OpenDKIM Decoder util.c dkim_qp_decode off-by-one — OpenDKIM 7.3 High 2026-09-27
CVE-2026-18460 Off-by-one Error, Out-of-bounds Write vulnerability in RTI Connext Professional (Core Libraries) allows Overflow Buffers. — Connext Professional 6.9 Medium 2026-09-22
CVE-2026-83600 Netdata: Streaming protocol chart slot guard off-by-one allows ~16 GiB allocation request, crashing parent agent — netdata 6.5 Medium 2026-09-22
CVE-2026-76081 ZITADEL: Improper Role Revocation on Granted Projects during Multiple Role Deletions — zitadel 5.5 Medium 2026-09-14
CVE-2026-90781 alsa-lib through 1.2.16.1 Off-by-One Stack Buffer Overflow in __snd_ctl_ascii_elem_id_parse() — alsa-lib 4.4 Medium 2026-09-13

Vulnerabilities classified as CWE-193 (Off-by-one错误) represent 115 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.