6 vulnerabilities classified as CWE-192 (整数强制转换错误). AI Chinese analysis included.
CWE-192, Integer Coercion Error, is a software weakness involving the improper type casting, extension, or truncation of primitive data types. This flaw typically arises when developers implicitly or explicitly convert integers between different sizes or signedness without adequate validation, leading to unexpected data behavior. Attackers often exploit these errors by manipulating input values to trigger unintended arithmetic results, such as sign extension vulnerabilities or overflow conditions. While these issues primarily cause data integrity problems or application crashes, they can occasionally facilitate more severe attacks like buffer overflows or logic bypasses. To prevent such weaknesses, developers must enforce strict type checking, utilize safe conversion functions, and validate input ranges before any coercion occurs. Implementing static analysis tools and adhering to secure coding standards further mitigates the risk of accidental integer coercion during software development.
DataPacket *packet; int numHeaders; PacketHeader *headers; sock=AcceptSocketConnection(); ReadPacket(packet, sock); numHeaders =packet->headers; if (numHeaders > 100) { ExitError("too many headers!"); } headers = malloc(numHeaders * sizeof(PacketHeader); ParsePacketHeaders(packet, headers);int GetUntrustedInt () { return(0x0000FFFF); } void main (int argc, char **argv) { char path[256]; char *input; int i; short s; unsigned int sz; i = GetUntrustedInt(); s = i; /* s is -1 so it passes the safety check - CWE-697 */ if (s > 256) { DiePainfully("go away!\n"); } /* s is sign-extended and saved in sz */ sz = s; /* output: i=65535, s=-1, sz=4294967295 - your mileage may vary */ printf("i=%d, s=%d, sz=%u\n", i, s, sz); input = GetUserInput("Enter pathname:"); /* strncpy interprets s as unsigned int, so it's treated as MAX_INT (CWE-195), enabling buffer overflow (CWE-119) */ strncpy(pat| CVE ID | Title | CVSS | Severity | Published |
|---|---|---|---|---|
| CVE-2026-8276 | bettercap MySQL Server mysql_server.go integer coercion — bettercap | 3.7 | Low | 2026-05-11 |
| CVE-2026-8275 | bettercap zerogod IPP Service zerogod_ipp_primitives.go ippReadChunkedBody integer coercion — bettercap | 3.7 | Low | 2026-05-11 |
| CVE-2022-2639 | Linux kernel 数字错误漏洞 — kernel | 7.8 | - | 2022-09-01 |
| CVE-2014-125012 | FFmpeg dxtroy.c integer coercion — FFmpeg | 5.3 | Medium | 2022-06-18 |
| CVE-2014-125011 | FFmpeg ansi.c decode_frame integer coercion — FFmpeg | 5.3 | Medium | 2022-06-18 |
| CVE-2021-32996 | FANUC Robotics Virtual Robot Controller 缓冲区错误漏洞 — R-30iA, R-30iA Mate | 7.5 | - | 2022-01-07 |
Vulnerabilities classified as CWE-192 (整数强制转换错误) represent 6 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.