Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler. Number of rules (primarily dangerous function names) in C/C++ ruleset: 223 Examining data/intel-mkl-2020.3.279/debian/tests/abi-blas.c Examining data/intel-mkl-2020.3.279/debian/tests/catalog.cc Examining data/intel-mkl-2020.3.279/debian/tests/test-gemm-mkldnn.cc Examining data/intel-mkl-2020.3.279/debian/tests/test-gemm.cc Examining data/intel-mkl-2020.3.279/debian/tests/test-gesvd.cc FINAL RESULTS: data/intel-mkl-2020.3.279/debian/tests/test-gemm-mkldnn.cc:43:19: [3] (random) drand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. x[i] = (PREC_T)drand48(); data/intel-mkl-2020.3.279/debian/tests/test-gemm-mkldnn.cc:44:19: [3] (random) drand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. y[i] = (PREC_T)drand48(); data/intel-mkl-2020.3.279/debian/tests/test-gemm.cc:53:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("M")) { data/intel-mkl-2020.3.279/debian/tests/test-gemm.cc:54:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. M = atoi(getenv("M")); data/intel-mkl-2020.3.279/debian/tests/test-gemm.cc:67:18: [3] (random) drand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. x[i] = (PREC_T)drand48(); data/intel-mkl-2020.3.279/debian/tests/test-gemm.cc:92:19: [3] (random) drand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. x[i] = (PREC_T)drand48(); data/intel-mkl-2020.3.279/debian/tests/test-gemm.cc:93:19: [3] (random) drand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. y[i] = (PREC_T)drand48(); data/intel-mkl-2020.3.279/debian/tests/test-gesvd.cc:36:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("M")) { data/intel-mkl-2020.3.279/debian/tests/test-gesvd.cc:37:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. M = atoi(getenv("M")); data/intel-mkl-2020.3.279/debian/tests/test-gesvd.cc:58:19: [3] (random) drand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. A[i] = (PREC_T)drand48(); data/intel-mkl-2020.3.279/debian/tests/test-gemm.cc:54:7: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). M = atoi(getenv("M")); data/intel-mkl-2020.3.279/debian/tests/test-gemm.cc:57:7: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). M = atoi(argv[1]); data/intel-mkl-2020.3.279/debian/tests/test-gesvd.cc:37:7: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). M = atoi(getenv("M")); data/intel-mkl-2020.3.279/debian/tests/test-gesvd.cc:40:7: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). M = atoi(argv[1]); ANALYSIS SUMMARY: Hits = 14 Lines analyzed = 423 in approximately 0.12 seconds (3397 lines/second) Physical Source Lines of Code (SLOC) = 331 Hits@level = [0] 27 [1] 0 [2] 4 [3] 10 [4] 0 [5] 0 Hits@level+ = [0+] 41 [1+] 14 [2+] 14 [3+] 10 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 123.867 [1+] 42.2961 [2+] 42.2961 [3+] 30.2115 [4+] 0 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.