This vulnerability occurs when a program unintentionally adds or modifies a special marker, known as a sentinel, within a data structure, leading to critical logic errors.
Data structures often use sentinel values as internal markers to define their boundaries or format. Common examples include the null terminator ('\0') at the end of a string or a special node marking the end of a linked list. These sentinels are control mechanisms for the program itself, not regular data. If an attacker or a logic flaw can inject or alter these markers, the program's fundamental understanding of its own data breaks down. To prevent this, you must rigorously validate all external inputs and implement strict bounds checking to ensure sentinel values are never written into data fields where they don't belong. Treat sentinels as reserved, protected control characters that your data processing logic must explicitly guard against, separating the trusted internal structure of your data from untrusted, user-supplied content.
Impact: Modify Application Data
Generally this error will cause the data structure to not work properly by truncating the data.
cHigh