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/kauth-5.74.0/autotests/BackendsManager.h Examining data/kauth-5.74.0/autotests/HelperTest.cpp Examining data/kauth-5.74.0/autotests/TestHelper.cpp Examining data/kauth-5.74.0/autotests/TestBackend.cpp Examining data/kauth-5.74.0/autotests/TestHelper.h Examining data/kauth-5.74.0/autotests/BackendsManager.cpp Examining data/kauth-5.74.0/autotests/TestBackend.h Examining data/kauth-5.74.0/autotests/SetupActionTest.cpp Examining data/kauth-5.74.0/examples/client.cpp Examining data/kauth-5.74.0/examples/helper.cpp Examining data/kauth-5.74.0/src/kauth.h Examining data/kauth-5.74.0/src/BackendsManager.h Examining data/kauth-5.74.0/src/AuthBackend.h Examining data/kauth-5.74.0/src/kauthexecutejob.cpp Examining data/kauth-5.74.0/src/backends/fakehelper/FakeHelperProxy.h Examining data/kauth-5.74.0/src/backends/fakehelper/FakeHelperProxy.cpp Examining data/kauth-5.74.0/src/backends/fake/kauth-policy-gen-polkit.cpp Examining data/kauth-5.74.0/src/backends/fake/FakeBackend.h Examining data/kauth-5.74.0/src/backends/fake/FakeBackend.cpp Examining data/kauth-5.74.0/src/backends/polkit-1/Polkit1Backend.h Examining data/kauth-5.74.0/src/backends/polkit-1/Polkit1Backend.cpp Examining data/kauth-5.74.0/src/backends/polkit-1/kauth-policy-gen-polkit1.cpp Examining data/kauth-5.74.0/src/backends/dbus/DBusHelperProxy.cpp Examining data/kauth-5.74.0/src/backends/dbus/DBusHelperProxy.h Examining data/kauth-5.74.0/src/backends/mac/kauth-policy-gen-mac.cpp Examining data/kauth-5.74.0/src/backends/mac/AuthServicesBackend.cpp Examining data/kauth-5.74.0/src/backends/mac/AuthServicesBackend.h Examining data/kauth-5.74.0/src/AuthBackend.cpp Examining data/kauth-5.74.0/src/HelperProxy.h Examining data/kauth-5.74.0/src/policy-gen/policy-gen.h Examining data/kauth-5.74.0/src/policy-gen/policy-gen.cpp Examining data/kauth-5.74.0/src/kauthexecutejob.h Examining data/kauth-5.74.0/src/BackendsManager.cpp Examining data/kauth-5.74.0/src/kauthaction.cpp Examining data/kauth-5.74.0/src/kauthactionreply.h Examining data/kauth-5.74.0/src/kauthobjectdecorator.cpp Examining data/kauth-5.74.0/src/kauthactionreply.cpp Examining data/kauth-5.74.0/src/kauthhelpersupport.cpp Examining data/kauth-5.74.0/src/kauthobjectdecorator.h Examining data/kauth-5.74.0/src/kauthaction.h Examining data/kauth-5.74.0/src/kauthhelpersupport.h Examining data/kauth-5.74.0/src/HelperProxy.cpp FINAL RESULTS: data/kauth-5.74.0/src/kauthhelpersupport.cpp:27:9: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. #define syslog(level, ...) fprintf(stderr, __VA_ARGS__) data/kauth-5.74.0/src/kauthhelpersupport.cpp:27:28: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define syslog(level, ...) fprintf(stderr, __VA_ARGS__) data/kauth-5.74.0/src/kauthhelpersupport.cpp:54:9: [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(home) == nullptr) { data/kauth-5.74.0/examples/helper.cpp:34:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!file.open(QIODevice::ReadOnly)) { data/kauth-5.74.0/autotests/TestHelper.cpp:50:18: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. QThread::usleep(20000); data/kauth-5.74.0/examples/helper.cpp:22:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ActionReply read(const QVariantMap& args); data/kauth-5.74.0/examples/helper.cpp:29:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ActionReply MyHelper::read(const QVariantMap& args) data/kauth-5.74.0/examples/helper.cpp:60:17: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. QThread::usleep(250000); data/kauth-5.74.0/src/backends/dbus/DBusHelperProxy.cpp:273:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(needle, method.typeName(), strlen(needle)) == 0) { ANALYSIS SUMMARY: Hits = 9 Lines analyzed = 5170 in approximately 0.18 seconds (28088 lines/second) Physical Source Lines of Code (SLOC) = 2973 Hits@level = [0] 2 [1] 5 [2] 1 [3] 1 [4] 2 [5] 0 Hits@level+ = [0+] 11 [1+] 9 [2+] 4 [3+] 3 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 3.69997 [1+] 3.02725 [2+] 1.34544 [3+] 1.00908 [4+] 0.672721 [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.