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/mono-fuse-0.4.2+dfsg/src/MonoFuseHelper/mfh.c Examining data/mono-fuse-0.4.2+dfsg/src/MonoFuseHelper/mph.c FINAL RESULTS: data/mono-fuse-0.4.2+dfsg/src/MonoFuseHelper/mfh.c:55:35: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. return _mfh_get_private_data ()->readlink (path, buf, size); data/mono-fuse-0.4.2+dfsg/src/MonoFuseHelper/mfh.c:103:35: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. return _mfh_get_private_data ()->chmod (path, mode); data/mono-fuse-0.4.2+dfsg/src/MonoFuseHelper/mfh.c:109:35: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. return _mfh_get_private_data ()->chown (path, uid, gid); data/mono-fuse-0.4.2+dfsg/src/MonoFuseHelper/mfh.c:355:12: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. if (from->readlink) to->readlink = mfh_readlink; data/mono-fuse-0.4.2+dfsg/src/MonoFuseHelper/mfh.c:363:12: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (from->chmod) to->chmod = mfh_chmod; data/mono-fuse-0.4.2+dfsg/src/MonoFuseHelper/mfh.c:364:12: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. if (from->chown) to->chown = mfh_chown; data/mono-fuse-0.4.2+dfsg/src/MonoFuseHelper/mfh.c:316:35: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. return _mfh_get_private_data ()->access (path, flags); data/mono-fuse-0.4.2+dfsg/src/MonoFuseHelper/mfh.c:383:12: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (from->access) to->access = mfh_access; data/mono-fuse-0.4.2+dfsg/src/MonoFuseHelper/mfh.c:159:32: [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). r = _mfh_get_private_data ()->open (path, info); data/mono-fuse-0.4.2+dfsg/src/MonoFuseHelper/mfh.c:367:12: [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 (from->open) to->open = mfh_open; data/mono-fuse-0.4.2+dfsg/src/MonoFuseHelper/mfh.c:413:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *help[3]; data/mono-fuse-0.4.2+dfsg/src/MonoFuseHelper/mfh.c:170:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r = _mfh_get_private_data ()->read (path, (unsigned char*) buf, size, offset, data/mono-fuse-0.4.2+dfsg/src/MonoFuseHelper/mfh.c:368:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (from->read) to->read = mfh_read; ANALYSIS SUMMARY: Hits = 13 Lines analyzed = 655 in approximately 0.05 seconds (13002 lines/second) Physical Source Lines of Code (SLOC) = 481 Hits@level = [0] 0 [1] 2 [2] 3 [3] 0 [4] 2 [5] 6 Hits@level+ = [0+] 13 [1+] 13 [2+] 11 [3+] 8 [4+] 8 [5+] 6 Hits/KSLOC@level+ = [0+] 27.027 [1+] 27.027 [2+] 22.869 [3+] 16.632 [4+] 16.632 [5+] 12.474 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.