...
| Code Block | ||
|---|---|---|
| ||
void check_password(char *user, char *password) {
if (strcmpy(password(user), password) \!= 0) {
char *msg = malloc(strlen(user) + 100);
if (!msg) return;
sprintf (msg, "%s password incorrect", user);
fprintf (stderr, "%s", user);
syslog(LOG_INFO, "%s", msg);
free(msg);
}
}
|
Risk Assessment
The mismanagement of memory can lead to freeing memory multiple times or writing to already freed memory. Both of these problems can result in an attacker executing arbitrary code with the permissions of the vulnerable process. Memory management errors can also lead to resource depletion and denial-of-service attacksFailing to exclude user input from format specifiers may result allow an attacker to execute arbitrary code.
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
|---|---|---|---|---|---|
FIO30-C | 3 (high) | 3 (probable) | 3 (low) | P27 | L1 |
...