Skip to content
DoS Disclosed report Intermediate CVE-2021-4070

Off-by-one Error in v2fly/v2ray-core

An off-by-one error in v2fly/v2ray-core before version 4.44.0 allowed an index to be checked with a less-than-or-equal comparison, potentially causing an out-of-bounds access. An attacker could exploit this to cause a crash or other undefined behaviour.

v2fly/v2ray-core

Originally disclosed on huntr

Critical View original

v2fly/v2ray-core prior to 4.44.0 is vulnerable to an off-by-one error. Indexing operations on arrays, slices, or strings should use an index at most one less than the length. If the index is checked for being less than or equal to the length (<=), instead of less than the length (<), the index could be out of bounds.

From the GitHub Advisory Database (GHSA-4cxw-hq44-r344, CC BY 4.0).

The original report as published on the GitHub Advisory Database. Images and videos are our own copies; raw HTML is shown as text. View it on GitHub Advisory Database.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely an index check used less-than-or-equal instead of less-than, allowing an index equal to the length.

Impact

An attacker could potentially cause an out-of-bounds access, leading to a crash or other undefined behaviour.

What the attacker needed

None

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

An off-by-one error happens when a program uses the wrong boundary when checking positions in a list. If it allows a position equal to the list's length, it tries to read one item past the end, which can crash the program or cause unpredictable behaviour.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.