High | Path/Directory Traversal |
CWE-22
|
remote.c:1055
| 1 | 2025-01-15 06:24pm |
Vulnerable Code
|
|
|
va_start(ap, fmt); |
|
(void)vsnprintf(output, BUFSIZE*2, fmt, ap); |
|
va_end(ap); |
|
|
|
if ((fp = fopen(rc->remdebugfile, "a")) == NULL) |
1 Data Flow/s detected
|
rc->remdebugfile = optarg; |
Secure Code Warrior Training Material
● Training
▪ Secure Code Warrior Path/Directory Traversal Training
● Videos
▪ Secure Code Warrior Path/Directory Traversal Video
● Further Reading
▪ OWASP Path Traversal
▪ OWASP Input Validation Cheat Sheet
|
| |
High | Path/Directory Traversal |
CWE-22
|
qemu.c:257
| 1 | 2025-01-15 06:24pm |
Vulnerable Code
|
if (argc != 2) { |
|
fprintf (stderr, "Usage: test SAVE-FILE\n"); |
|
exit (1); |
|
} |
|
|
|
fp = fopen(argv[1], "r"); |
1 Data Flow/s detected
|
fp = fopen(argv[1], "r"); |
Secure Code Warrior Training Material
● Training
▪ Secure Code Warrior Path/Directory Traversal Training
● Videos
▪ Secure Code Warrior Path/Directory Traversal Video
● Further Reading
▪ OWASP Path Traversal
▪ OWASP Input Validation Cheat Sheet
|
| |
High | Out of Buffer Bounds Write |
CWE-787
|
cmdline.c:2581
| 1 | 2025-01-15 06:24pm |
Vulnerable Code
|
(i+1) == orig_argcnt ? "\n" : ""); |
|
|
|
for (i = 0; i < aif->index; i++) |
|
new_args[i] = orig_args[i]; |
|
for (i = aif->index, c = 0; c < aif_cnt; c++, i++) |
|
new_args[i] = aif_args[c]; |
1 Data Flow/s detected
|
new_args[i] = aif_args[c]; |
Secure Code Warrior Training Material
● Training
▪ Secure Code Warrior Out of Buffer Bounds Write Training
● Videos
▪ Secure Code Warrior Out of Buffer Bounds Write Video
|
| |
High | Command Injection |
CWE-78
|
trace.c:1805
| 1 | 2025-01-15 06:24pm |
Vulnerable Code
|
if (trace_cmd_data_output(fd) < 0) |
|
goto out; |
|
|
|
/* splice the output of trace-cmd to user */ |
|
snprintf(buf, sizeof(buf), "%s report %s", trace_cmd, tmp); |
|
if (!(file = popen(buf, "r"))) |
1 Data Flow/s detected
Secure Code Warrior Training Material
● Training
▪ Secure Code Warrior Command Injection Training
● Videos
▪ Secure Code Warrior Command Injection Video
● Further Reading
▪ OWASP testing for Command Injection
▪ OWASP Command Injection
|
| |
High | Double Free |
CWE-415
|
s390dbf.c:894
| 1 | 2025-01-15 06:24pm |
Vulnerable Code
|
|
|
rc = (debug_view_t*)malloc(sizeof(debug_view_t)); |
|
memset(rc, 0, sizeof(debug_view_t)); |
|
|
|
k_debug_view_size = kl_struct_len("debug_view"); |
|
k_debug_view = malloc(k_debug_view_size); |
1 Data Flow/s detected
|
k_debug_view = malloc(k_debug_view_size); |
Secure Code Warrior Training Material
● Training
▪ Secure Code Warrior Double Free Training
● Videos
▪ Secure Code Warrior Double Free Video
|
| |
High | Integer Overflow |
CWE-190
|
va_server.c:258
| 2 | 2025-01-15 06:24pm |
Vulnerable Code
|
} |
|
fprintf(stderr, "FATAL ERROR: malloc failure: out of memory\n"); |
|
clean_exit(1); |
|
} |
|
items = fread((void *)compr_buf, sizeof(char), m->num_blks * Page_Size, vas_file_p); |
|
if(items != m->num_blks * Page_Size) { |
2 Data Flow/s detected
View Data Flow 1
|
if(items != m->num_blks * Page_Size) { |
View Data Flow 2
|
if(items != m->num_blks * Page_Size) { |
Secure Code Warrior Training Material
● Training
▪ Secure Code Warrior Integer Overflow Training
● Videos
▪ Secure Code Warrior Integer Overflow Video
|
| |
High | Command Injection |
CWE-78
|
remote.c:501
| 1 | 2025-01-15 06:24pm |
Vulnerable Code
|
errno = 0; |
|
reqsize = bufsize - DATA_HDRSIZE; |
|
|
|
sprintf(readbuf, "/usr/bin/gzip -c %s", file); |
|
|
|
if ((pipe = popen(readbuf, "r")) == NULL) { |
1 Data Flow/s detected
|
strcpy(sendbuf, readbuf); |
Secure Code Warrior Training Material
● Training
▪ Secure Code Warrior Command Injection Training
● Videos
▪ Secure Code Warrior Command Injection Video
● Further Reading
▪ OWASP testing for Command Injection
▪ OWASP Command Injection
|
| |
High | Buffer Overflow |
CWE-121
|
kvmdump.c:321
| 1 | 2025-01-15 06:24pm |
Vulnerable Code
|
|
|
eof = lseek(kvm->mapfd, 0, SEEK_END); |
|
if (lseek(kvm->mapfd, eof - sizeof(trailer), SEEK_SET) < 0) |
|
error(FATAL, "%s: lseek: %s\n", mapfile_in_use(), |
|
strerror(errno)); |
|
if (read(kvm->mapfd, &trailer, sizeof(trailer)) != sizeof(trailer)) |
1 Data Flow/s detected
|
error(INFO, "%s: read: %s\n", filename, strerror(errno)); |
Secure Code Warrior Training Material
● Training
▪ Secure Code Warrior Buffer Overflow Training
● Videos
▪ Secure Code Warrior Buffer Overflow Video
|
| |
High | Command Injection |
CWE-78
|
filesys.c:3802
| 1 | 2025-01-15 06:24pm |
Vulnerable Code
|
char buf[BUFSIZE]; |
|
char command[BUFSIZE]; |
|
|
|
sprintf(command, "/sbin/modprobe %s", pc->memory_module); |
|
if (CRASHDEBUG(1)) |
|
fprintf(fp, "%s\n", command); |
1 Data Flow/s detected
|
if (STREQ(buf, "search done\n")) { |
|
return(daemon_clean_line(line)); |
|
module = basename(strip_linefeeds(buf)); |
|
fprintf(fp, "%s\n", command); |
Secure Code Warrior Training Material
● Training
▪ Secure Code Warrior Command Injection Training
● Videos
▪ Secure Code Warrior Command Injection Video
● Further Reading
▪ OWASP testing for Command Injection
▪ OWASP Command Injection
|
| |
High | Out of Buffer Bounds Write |
CWE-787
|
xendump.c:2694
| 1 | 2025-01-15 06:24pm |
Vulnerable Code
|
|
|
BZERO(buf, BUFSIZE); |
|
i = 0; |
|
|
|
while (read(xd->xfd, &buf[i], sizeof(char)) == sizeof(char)) { |
|
if (buf[i] == NULLCHAR) |
1 Data Flow/s detected
Secure Code Warrior Training Material
● Training
▪ Secure Code Warrior Out of Buffer Bounds Write Training
● Videos
▪ Secure Code Warrior Out of Buffer Bounds Write Video
|
Code Security Report
Scan Metadata
Latest Scan: 2025-01-15 05:48pm
Total Findings: 54 | New Findings: 0 | Resolved Findings: 0
Tested Project Files: 95
Detected Programming Languages: 1 (C/C++ (Beta))
Most Relevant Findings
CWE-22
remote.c:1055
crash/remote.c
Lines 1050 to 1055 in dc8df4f
1 Data Flow/s detected
crash/remote.c
Line 92 in dc8df4f
● Training
▪ Secure Code Warrior Path/Directory Traversal Training
● Videos
▪ Secure Code Warrior Path/Directory Traversal Video
● Further Reading
▪ OWASP Path Traversal
▪ OWASP Input Validation Cheat Sheet
CWE-22
qemu.c:257
crash/qemu.c
Lines 252 to 257 in dc8df4f
1 Data Flow/s detected
crash/qemu.c
Line 257 in dc8df4f
● Training
▪ Secure Code Warrior Path/Directory Traversal Training
● Videos
▪ Secure Code Warrior Path/Directory Traversal Video
● Further Reading
▪ OWASP Path Traversal
▪ OWASP Input Validation Cheat Sheet
CWE-787
cmdline.c:2581
crash/cmdline.c
Lines 2576 to 2581 in dc8df4f
1 Data Flow/s detected
crash/cmdline.c
Line 2581 in dc8df4f
● Training
▪ Secure Code Warrior Out of Buffer Bounds Write Training
● Videos
▪ Secure Code Warrior Out of Buffer Bounds Write Video
CWE-78
trace.c:1805
crash/extensions/trace.c
Lines 1800 to 1805 in dc8df4f
1 Data Flow/s detected
crash/extensions/trace.c
Line 1781 in dc8df4f
● Training
▪ Secure Code Warrior Command Injection Training
● Videos
▪ Secure Code Warrior Command Injection Video
● Further Reading
▪ OWASP testing for Command Injection
▪ OWASP Command Injection
CWE-415
s390dbf.c:894
crash/s390dbf.c
Lines 889 to 894 in dc8df4f
1 Data Flow/s detected
crash/s390dbf.c
Line 894 in dc8df4f
● Training
▪ Secure Code Warrior Double Free Training
● Videos
▪ Secure Code Warrior Double Free Video
CWE-190
va_server.c:258
crash/va_server.c
Lines 253 to 258 in dc8df4f
2 Data Flow/s detected
View Data Flow 1
crash/va_server.c
Line 258 in dc8df4f
View Data Flow 2
crash/va_server.c
Line 258 in dc8df4f
● Training
▪ Secure Code Warrior Integer Overflow Training
● Videos
▪ Secure Code Warrior Integer Overflow Video
CWE-78
remote.c:501
crash/remote.c
Lines 496 to 501 in dc8df4f
1 Data Flow/s detected
crash/remote.c
Line 476 in dc8df4f
● Training
▪ Secure Code Warrior Command Injection Training
● Videos
▪ Secure Code Warrior Command Injection Video
● Further Reading
▪ OWASP testing for Command Injection
▪ OWASP Command Injection
CWE-121
kvmdump.c:321
crash/kvmdump.c
Lines 316 to 321 in dc8df4f
1 Data Flow/s detected
crash/kvmdump.c
Line 70 in dc8df4f
● Training
▪ Secure Code Warrior Buffer Overflow Training
● Videos
▪ Secure Code Warrior Buffer Overflow Video
CWE-78
filesys.c:3802
crash/filesys.c
Lines 3797 to 3802 in dc8df4f
1 Data Flow/s detected
crash/filesys.c
Line 1042 in dc8df4f
crash/remote.c
Line 1646 in dc8df4f
crash/filesys.c
Line 1052 in dc8df4f
crash/filesys.c
Line 3798 in dc8df4f
crash/filesys.c
Line 3802 in dc8df4f
● Training
▪ Secure Code Warrior Command Injection Training
● Videos
▪ Secure Code Warrior Command Injection Video
● Further Reading
▪ OWASP testing for Command Injection
▪ OWASP Command Injection
CWE-787
xendump.c:2694
crash/xendump.c
Lines 2689 to 2694 in dc8df4f
1 Data Flow/s detected
crash/xendump.c
Line 2694 in dc8df4f
● Training
▪ Secure Code Warrior Out of Buffer Bounds Write Training
● Videos
▪ Secure Code Warrior Out of Buffer Bounds Write Video
Findings Overview