A function return value is compared directly against an expected value without first verifying for negative error codes. This may lead to unexpected execution of error-handling cleanup paths, potentially triggering double-frees when unhandled error codes mimic unexpected data bytes.
Rule Explorer
Search the public rule index by CVE, GHSA, CWE, language, framework, author, or rule slug. Filter by language, framework, severity, confidence, license, and validation status.
- Public rules
- 2917
- Downloads
- 3.2M
- Verified
- 2917
- Authors
- 2
Cryptographic operations from underlying libraries are returned directly without checking for failure (e.g., null returns from JNI wrappers or uncaught exceptions). This can cause fallbacks to all-zero keys, leading to deterministic and predictable key material. Properly handle failures by checking for null or catching exceptions and throwing a dedicated Cry
Ignoring the error returned by URL parsing functions (like `url.Parse` or `url.ParseRequestURI`) using the blank identifier `_` can lead to nil pointer dereferences. If the dynamically generated input is invalid, the resulting URL object is nil. Dereferencing it will cause a panic (Denial of Service). Ensure that the error is explicitly checked and handled.
The error from crypto/rand.Read (or uuid.NewRandom, which wraps crypto/rand) is silently swallowed: the failure path either returns without surfacing the error, returns the all-zero UUID constant, or falls back to another UUID/token generator. When the OS entropy source fails, the resulting identifiers become predictable (e.g. always the zero UUID), which br
The return value of a string search function (e.g., `strchr`) is advanced without checking for NULL. If the character or substring is not found, the function returns NULL. Advancing a NULL pointer results in an invalid memory address (like 0x1) that bypasses subsequent NULL sanity checks and causes a segmentation fault (Denial of Service) when dereferenced.
fx_media_format() is called without checking its return status. If the format fails (for example because the RAM-disk buffer is smaller than total_sectors * sector_size), execution continues and subsequent fx_media_open / driver I/O operations on the misconfigured media can perform out-of-bounds reads/writes in the RAM driver, corrupting adjacent memory. Thi
The boolean return value of Oiiotool::read() is being discarded immediately before a stats-computing path (compute_stats = true / print_stats / computePixelStats). If the underlying image read fails (for example a truncated/malformed PNM/PGM whose declared geometry exceeds the actual pixel payload), execution continues with a partially-initialized ImageBuf w
Direct destructuring or unpacking of `fetchone()` results without checking for `None` can cause an unhandled TypeError if the query yields no results, leading to a Denial of Service. Ensure the record exists before unpacking it.
The return value of an underlying C HMAC function (e.g., HMAC_Update, HMAC_Final) is not checked. If this function fails, the error is ignored and execution proceeds, potentially returning an uninitialized or zero-filled buffer instead of a valid HMAC sum. Always check the return value of CGo cryptographic functions to prevent fallback to zero-filled buffers
The return value of `gcry_md_get_algo_dlen()` is passed directly to a memory management or comparison function without validation. If an invalid or unsupported hash algorithm ID is provided, this function returns 0. When passed to functions like `memcmp`, a 0-byte comparison is performed which always evaluates to zero (0/true), potentially causing authentica
The return value of a privilege-dropping function like setuid() or setgid() is ignored. If the system call fails (e.g., due to resource limits like RLIMIT_NPROC), the program may silently continue executing with unintended elevated privileges, leading to a local privilege escalation vulnerability. Always check the return value and handle failures appropriate