Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Security Report: 62 high severity findings, 69 total findings [develop] #28

Open
1 task
mend-for-github-com bot opened this issue Jan 15, 2025 · 0 comments
Open
1 task
Labels
Mend: code security findings Code security findings detected by Mend

Comments

@mend-for-github-com
Copy link
Contributor

Code Security Report

Scan Metadata

Latest Scan: 2025-01-15 05:25pm
Total Findings: 69 | New Findings: 0 | Resolved Findings: 0
Tested Project Files: 218
Detected Programming Languages: 2 (Python*, C/C++ (Beta))

  • Check this box to manually trigger a scan

Most Relevant Findings

The list below presents the 10 most relevant findings that need your attention. To view information on the remaining findings, navigate to the Mend Application.

SeverityVulnerability TypeCWEFileData FlowsDetected
HighUse After Free

CWE-416

stropts.c:466

12025-01-15 05:28pm
Vulnerable Code

netid = nfs_get_netid(nfs_saddr->sa_family, nfs_pmap->pm_prot);
if (netid == NULL)
return 0;
snprintf(new_option, sizeof(new_option) - 1,
"proto=%s", netid);
free(netid);

1 Data Flow/s detected

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Use After Free Training

● Videos

   ▪ Secure Code Warrior Use After Free Video

 
HighUse After Free

CWE-416

device-process.c:374

12025-01-15 05:28pm
Vulnerable Code

if (dev) {
*major = MAJOR(dev);
*minor = MINOR(dev);
}
out_err:

1 Data Flow/s detected

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Use After Free Training

● Videos

   ▪ Secure Code Warrior Use After Free Video

 
HighUse After Free

CWE-416

stropts.c:477

12025-01-15 05:28pm
Vulnerable Code

netid = nfs_get_netid(nfs_saddr->sa_family, nfs_pmap->pm_prot);
if (netid == NULL)
return 0;
snprintf(new_option, sizeof(new_option) - 1,
"proto=%s", netid);
free(netid);

1 Data Flow/s detected

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Use After Free Training

● Videos

   ▪ Secure Code Warrior Use After Free Video

 
HighUse After Free

CWE-416

device-discovery.c:331

52025-01-15 05:28pm
Vulnerable Code

!= sizeof(reply)) {
BL_LOG_ERR("Write pipefs error!\n");
ret = -EIO;
}
out:

5 Data Flow/s detected
View Data Flow 1

View Data Flow 2

View Data Flow 3

View more Data Flows

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Use After Free Training

● Videos

   ▪ Secure Code Warrior Use After Free Video

 
HighDouble Free

CWE-415

sm-notify.c:221

12025-01-15 05:28pm
Vulnerable Code

host->mon_name == NULL ||
host->my_name == NULL ||
host->notify_arg == NULL) {
free(host->notify_arg);
free((void *)host->my_name);
free((void *)host->mon_name);

1 Data Flow/s detected

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Double Free Training

● Videos

   ▪ Secure Code Warrior Double Free Video

 
HighOut of Buffer Bounds Write

CWE-787

cache.c:124

12025-01-15 05:28pm
Vulnerable Code

bp = buf; blen = sizeof(buf);
qword_add(&bp, &blen, "nfsd");
qword_add(&bp, &blen, ipaddr);
qword_adduint(&bp, &blen, time(0) + DEFAULT_TTL);
if (use_ipaddr) {
memmove(ipaddr + 1, ipaddr, strlen(ipaddr) + 1);

1 Data Flow/s detected

memmove(ipaddr + 1, ipaddr, strlen(ipaddr) + 1);

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

 
HighOut of Buffer Bounds Write

CWE-787

cache.c:375

22025-01-15 05:28pm
Vulnerable Code

blkid_val = get_uuid_blkdev(path);
}
if (rc == 0 &&
(st.f_fsid.__val[0] || st.f_fsid.__val[1]))
snprintf(fsid_val, 17, "%08x%08x",

2 Data Flow/s detected
View Data Flow 1

snprintf(fsid_val, 17, "%08x%08x",

View Data Flow 2

snprintf(fsid_val, 17, "%08x%08x",

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

 
HighUse After Free

CWE-416

stropts.c:457

12025-01-15 05:28pm
Vulnerable Code

netid = nfs_get_netid(nfs_saddr->sa_family, nfs_pmap->pm_prot);
if (netid == NULL)
return 0;
snprintf(new_option, sizeof(new_option) - 1,
"proto=%s", netid);
free(netid);

1 Data Flow/s detected

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Use After Free Training

● Videos

   ▪ Secure Code Warrior Use After Free Video

 
HighDouble Free

CWE-415

krb5_util.c:1098

12025-01-15 05:28pm
Vulnerable Code

err = gssd_find_existing_krb5_ccache(uid, dirname, &cctype, &d);
if (err)
return err;
snprintf(buf, sizeof(buf), "%s:%s/%s", cctype, dirname, d->d_name);
free(d);

1 Data Flow/s detected

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Double Free Training

● Videos

   ▪ Secure Code Warrior Double Free Video

 
HighOut of Buffer Bounds Write

CWE-787

cacheio.c:169

92025-01-15 05:28pm
Vulnerable Code

if (*bp != ' ' && *bp != '\n' && *bp != '\0')
return -1;
while (*bp == ' ') bp++;
*bpp = bp;
*dest = '\0';

9 Data Flow/s detected
View Data Flow 1

*dest = '\0';

View Data Flow 2

*dest = '\0';

View Data Flow 3

*dest = '\0';

View more Data Flows

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

Findings Overview

Severity Vulnerability Type CWE Language Count
High Buffer Overflow CWE-121 C/C++ (Beta) 6
High Out of Buffer Bounds Write CWE-787 C/C++ (Beta) 14
High Use After Free CWE-416 C/C++ (Beta) 24
High Double Free CWE-415 C/C++ (Beta) 17
High Path/Directory Traversal CWE-22 C/C++ (Beta) 1
Medium Out of Buffer Bounds Read CWE-125 C/C++ (Beta) 3
Medium Time of Check Time of Use CWE-367 C/C++ (Beta) 1
Low Uncontrolled Memory Allocation CWE-789 C/C++ (Beta) 1
Low Use of Inherently Dangerous Function CWE-242 C/C++ (Beta) 2
@mend-for-github-com mend-for-github-com bot added the Mend: code security findings Code security findings detected by Mend label Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mend: code security findings Code security findings detected by Mend
Development

No branches or pull requests

0 participants