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/sudo-1.9.3p1/include/compat/charclass.h Examining data/sudo-1.9.3p1/include/compat/endian.h Examining data/sudo-1.9.3p1/include/compat/fnmatch.h Examining data/sudo-1.9.3p1/include/compat/getaddrinfo.h Examining data/sudo-1.9.3p1/include/compat/getopt.h Examining data/sudo-1.9.3p1/include/compat/glob.h Examining data/sudo-1.9.3p1/include/compat/nss_dbdefs.h Examining data/sudo-1.9.3p1/include/compat/sha2.h Examining data/sudo-1.9.3p1/include/compat/stdbool.h Examining data/sudo-1.9.3p1/include/hostcheck.h Examining data/sudo-1.9.3p1/include/log_server.pb-c.h Examining data/sudo-1.9.3p1/include/protobuf-c/protobuf-c.h Examining data/sudo-1.9.3p1/include/sudo_compat.h Examining data/sudo-1.9.3p1/include/sudo_conf.h Examining data/sudo-1.9.3p1/include/sudo_debug.h Examining data/sudo-1.9.3p1/include/sudo_digest.h Examining data/sudo-1.9.3p1/include/sudo_dso.h Examining data/sudo-1.9.3p1/include/sudo_event.h Examining data/sudo-1.9.3p1/include/sudo_fatal.h Examining data/sudo-1.9.3p1/include/sudo_gettext.h Examining data/sudo-1.9.3p1/include/sudo_iolog.h Examining data/sudo-1.9.3p1/include/sudo_json.h Examining data/sudo-1.9.3p1/include/sudo_lbuf.h Examining data/sudo-1.9.3p1/include/sudo_plugin.h Examining data/sudo-1.9.3p1/include/sudo_queue.h Examining data/sudo-1.9.3p1/include/sudo_rand.h Examining data/sudo-1.9.3p1/include/sudo_util.h Examining data/sudo-1.9.3p1/lib/iolog/host_port.c Examining data/sudo-1.9.3p1/lib/iolog/hostcheck.c Examining data/sudo-1.9.3p1/lib/iolog/iolog_fileio.c Examining data/sudo-1.9.3p1/lib/iolog/iolog_json.c Examining data/sudo-1.9.3p1/lib/iolog/iolog_json.h Examining data/sudo-1.9.3p1/lib/iolog/iolog_path.c Examining data/sudo-1.9.3p1/lib/iolog/iolog_util.c Examining data/sudo-1.9.3p1/lib/iolog/regress/host_port/host_port_test.c Examining data/sudo-1.9.3p1/lib/iolog/regress/iolog_json/check_iolog_json.c Examining data/sudo-1.9.3p1/lib/iolog/regress/iolog_mkpath/check_iolog_mkpath.c Examining data/sudo-1.9.3p1/lib/iolog/regress/iolog_path/check_iolog_path.c Examining data/sudo-1.9.3p1/lib/iolog/regress/iolog_util/check_iolog_util.c Examining data/sudo-1.9.3p1/lib/logsrv/log_server.pb-c.c Examining data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c Examining data/sudo-1.9.3p1/lib/util/aix.c Examining data/sudo-1.9.3p1/lib/util/arc4random.c Examining data/sudo-1.9.3p1/lib/util/arc4random_buf.c Examining data/sudo-1.9.3p1/lib/util/arc4random_uniform.c Examining data/sudo-1.9.3p1/lib/util/cfmakeraw.c Examining data/sudo-1.9.3p1/lib/util/chacha_private.h Examining data/sudo-1.9.3p1/lib/util/closefrom.c Examining data/sudo-1.9.3p1/lib/util/digest.c Examining data/sudo-1.9.3p1/lib/util/digest_gcrypt.c Examining data/sudo-1.9.3p1/lib/util/digest_openssl.c Examining data/sudo-1.9.3p1/lib/util/dup3.c Examining data/sudo-1.9.3p1/lib/util/event.c Examining data/sudo-1.9.3p1/lib/util/event_poll.c Examining data/sudo-1.9.3p1/lib/util/event_select.c Examining data/sudo-1.9.3p1/lib/util/explicit_bzero.c Examining data/sudo-1.9.3p1/lib/util/fatal.c Examining data/sudo-1.9.3p1/lib/util/fchmodat.c Examining data/sudo-1.9.3p1/lib/util/fnmatch.c Examining data/sudo-1.9.3p1/lib/util/freezero.c Examining data/sudo-1.9.3p1/lib/util/fstatat.c Examining data/sudo-1.9.3p1/lib/util/getaddrinfo.c Examining data/sudo-1.9.3p1/lib/util/getcwd.c Examining data/sudo-1.9.3p1/lib/util/getdelim.c Examining data/sudo-1.9.3p1/lib/util/getentropy.c Examining data/sudo-1.9.3p1/lib/util/getgrouplist.c Examining data/sudo-1.9.3p1/lib/util/gethostname.c Examining data/sudo-1.9.3p1/lib/util/getopt_long.c Examining data/sudo-1.9.3p1/lib/util/gettime.c Examining data/sudo-1.9.3p1/lib/util/getusershell.c Examining data/sudo-1.9.3p1/lib/util/gidlist.c Examining data/sudo-1.9.3p1/lib/util/glob.c Examining data/sudo-1.9.3p1/lib/util/inet_ntop.c Examining data/sudo-1.9.3p1/lib/util/inet_pton.c Examining data/sudo-1.9.3p1/lib/util/isblank.c Examining data/sudo-1.9.3p1/lib/util/json.c Examining data/sudo-1.9.3p1/lib/util/key_val.c Examining data/sudo-1.9.3p1/lib/util/lbuf.c Examining data/sudo-1.9.3p1/lib/util/locking.c Examining data/sudo-1.9.3p1/lib/util/logfac.c Examining data/sudo-1.9.3p1/lib/util/logpri.c Examining data/sudo-1.9.3p1/lib/util/memrchr.c Examining data/sudo-1.9.3p1/lib/util/mkdir_parents.c Examining data/sudo-1.9.3p1/lib/util/mksiglist.c Examining data/sudo-1.9.3p1/lib/util/mksiglist.h Examining data/sudo-1.9.3p1/lib/util/mksigname.c Examining data/sudo-1.9.3p1/lib/util/mksigname.h Examining data/sudo-1.9.3p1/lib/util/mktemp.c Examining data/sudo-1.9.3p1/lib/util/nanosleep.c Examining data/sudo-1.9.3p1/lib/util/openat.c Examining data/sudo-1.9.3p1/lib/util/parseln.c Examining data/sudo-1.9.3p1/lib/util/pipe2.c Examining data/sudo-1.9.3p1/lib/util/progname.c Examining data/sudo-1.9.3p1/lib/util/pw_dup.c Examining data/sudo-1.9.3p1/lib/util/reallocarray.c Examining data/sudo-1.9.3p1/lib/util/regress/fnmatch/fnm_test.c Examining data/sudo-1.9.3p1/lib/util/regress/getdelim/getdelim_test.c Examining data/sudo-1.9.3p1/lib/util/regress/getgrouplist/getgrouplist_test.c Examining data/sudo-1.9.3p1/lib/util/regress/glob/globtest.c Examining data/sudo-1.9.3p1/lib/util/regress/mktemp/mktemp_test.c Examining data/sudo-1.9.3p1/lib/util/regress/parse_gids/parse_gids_test.c Examining data/sudo-1.9.3p1/lib/util/regress/progname/progname_test.c Examining data/sudo-1.9.3p1/lib/util/regress/strsig/strsig_test.c Examining data/sudo-1.9.3p1/lib/util/regress/strsplit/strsplit_test.c Examining data/sudo-1.9.3p1/lib/util/regress/strtofoo/strtobool_test.c Examining data/sudo-1.9.3p1/lib/util/regress/strtofoo/strtoid_test.c Examining data/sudo-1.9.3p1/lib/util/regress/strtofoo/strtomode_test.c Examining data/sudo-1.9.3p1/lib/util/regress/strtofoo/strtonum_test.c Examining data/sudo-1.9.3p1/lib/util/regress/sudo_conf/conf_test.c Examining data/sudo-1.9.3p1/lib/util/regress/sudo_parseln/parseln_test.c Examining data/sudo-1.9.3p1/lib/util/regress/tailq/hltq_test.c Examining data/sudo-1.9.3p1/lib/util/regress/vsyslog/vsyslog_test.c Examining data/sudo-1.9.3p1/lib/util/roundup.c Examining data/sudo-1.9.3p1/lib/util/secure_path.c Examining data/sudo-1.9.3p1/lib/util/setgroups.c Examining data/sudo-1.9.3p1/lib/util/sha2.c Examining data/sudo-1.9.3p1/lib/util/sig2str.c Examining data/sudo-1.9.3p1/lib/util/snprintf.c Examining data/sudo-1.9.3p1/lib/util/str2sig.c Examining data/sudo-1.9.3p1/lib/util/strlcat.c Examining data/sudo-1.9.3p1/lib/util/strlcpy.c Examining data/sudo-1.9.3p1/lib/util/strndup.c Examining data/sudo-1.9.3p1/lib/util/strnlen.c Examining data/sudo-1.9.3p1/lib/util/strsignal.c Examining data/sudo-1.9.3p1/lib/util/strsplit.c Examining data/sudo-1.9.3p1/lib/util/strtobool.c Examining data/sudo-1.9.3p1/lib/util/strtoid.c Examining data/sudo-1.9.3p1/lib/util/strtomode.c Examining data/sudo-1.9.3p1/lib/util/strtonum.c Examining data/sudo-1.9.3p1/lib/util/sudo_conf.c Examining data/sudo-1.9.3p1/lib/util/sudo_debug.c Examining data/sudo-1.9.3p1/lib/util/sudo_dso.c Examining data/sudo-1.9.3p1/lib/util/term.c Examining data/sudo-1.9.3p1/lib/util/ttyname_dev.c Examining data/sudo-1.9.3p1/lib/util/ttysize.c Examining data/sudo-1.9.3p1/lib/util/unlinkat.c Examining data/sudo-1.9.3p1/lib/util/utimens.c Examining data/sudo-1.9.3p1/lib/util/uuid.c Examining data/sudo-1.9.3p1/lib/util/vsyslog.c Examining data/sudo-1.9.3p1/lib/zlib/adler32.c Examining data/sudo-1.9.3p1/lib/zlib/compress.c Examining data/sudo-1.9.3p1/lib/zlib/crc32.c Examining data/sudo-1.9.3p1/lib/zlib/crc32.h Examining data/sudo-1.9.3p1/lib/zlib/deflate.c Examining data/sudo-1.9.3p1/lib/zlib/deflate.h Examining data/sudo-1.9.3p1/lib/zlib/gzclose.c Examining data/sudo-1.9.3p1/lib/zlib/gzguts.h Examining data/sudo-1.9.3p1/lib/zlib/gzlib.c Examining data/sudo-1.9.3p1/lib/zlib/gzread.c Examining data/sudo-1.9.3p1/lib/zlib/gzwrite.c Examining data/sudo-1.9.3p1/lib/zlib/infback.c Examining data/sudo-1.9.3p1/lib/zlib/inffast.c Examining data/sudo-1.9.3p1/lib/zlib/inffast.h Examining data/sudo-1.9.3p1/lib/zlib/inffixed.h Examining data/sudo-1.9.3p1/lib/zlib/inflate.c Examining data/sudo-1.9.3p1/lib/zlib/inflate.h Examining data/sudo-1.9.3p1/lib/zlib/inftrees.c Examining data/sudo-1.9.3p1/lib/zlib/inftrees.h Examining data/sudo-1.9.3p1/lib/zlib/trees.c Examining data/sudo-1.9.3p1/lib/zlib/trees.h Examining data/sudo-1.9.3p1/lib/zlib/uncompr.c Examining data/sudo-1.9.3p1/lib/zlib/zlib.h Examining data/sudo-1.9.3p1/lib/zlib/zutil.c Examining data/sudo-1.9.3p1/lib/zlib/zutil.h Examining data/sudo-1.9.3p1/logsrvd/eventlog.c Examining data/sudo-1.9.3p1/logsrvd/iolog_writer.c Examining data/sudo-1.9.3p1/logsrvd/logsrv_util.c Examining data/sudo-1.9.3p1/logsrvd/logsrv_util.h Examining data/sudo-1.9.3p1/logsrvd/logsrvd.c Examining data/sudo-1.9.3p1/logsrvd/logsrvd.h Examining data/sudo-1.9.3p1/logsrvd/logsrvd_conf.c Examining data/sudo-1.9.3p1/logsrvd/sendlog.c Parsing failed to find end of parameter list; semicolon terminated it in (stderr, "usage: %s [-AnV] [-b ca_bundle] [-c cert_file] [-h host] " "[-i iolog-id] [-k key_file] [-p port] " #else fprintf(stderr, "usage: %s [-AnV] [-h host] [-i iolog-id] [-p port] " #endif " Examining data/sudo-1.9.3p1/logsrvd/sendlog.h Examining data/sudo-1.9.3p1/plugins/audit_json/audit_json.c Examining data/sudo-1.9.3p1/plugins/group_file/getgrent.c Examining data/sudo-1.9.3p1/plugins/group_file/group_file.c Examining data/sudo-1.9.3p1/plugins/group_file/plugin_test.c Examining data/sudo-1.9.3p1/plugins/python/pyhelpers.c Examining data/sudo-1.9.3p1/plugins/python/pyhelpers.h Examining data/sudo-1.9.3p1/plugins/python/pyhelpers_cpychecker.h Examining data/sudo-1.9.3p1/plugins/python/python_baseplugin.c Examining data/sudo-1.9.3p1/plugins/python/python_convmessage.c Examining data/sudo-1.9.3p1/plugins/python/python_importblocker.c Examining data/sudo-1.9.3p1/plugins/python/python_loghandler.c Examining data/sudo-1.9.3p1/plugins/python/python_plugin_approval.c Examining data/sudo-1.9.3p1/plugins/python/python_plugin_audit.c Examining data/sudo-1.9.3p1/plugins/python/python_plugin_common.c Examining data/sudo-1.9.3p1/plugins/python/python_plugin_common.h Examining data/sudo-1.9.3p1/plugins/python/python_plugin_group.c Examining data/sudo-1.9.3p1/plugins/python/python_plugin_io.c Examining data/sudo-1.9.3p1/plugins/python/python_plugin_policy.c Examining data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c Examining data/sudo-1.9.3p1/plugins/python/regress/iohelpers.c Examining data/sudo-1.9.3p1/plugins/python/regress/iohelpers.h Examining data/sudo-1.9.3p1/plugins/python/regress/testhelpers.c Examining data/sudo-1.9.3p1/plugins/python/regress/testhelpers.h Examining data/sudo-1.9.3p1/plugins/python/sudo_python_debug.c Examining data/sudo-1.9.3p1/plugins/python/sudo_python_debug.h Examining data/sudo-1.9.3p1/plugins/python/sudo_python_module.c Examining data/sudo-1.9.3p1/plugins/python/sudo_python_module.h Examining data/sudo-1.9.3p1/plugins/sample/sample_plugin.c Examining data/sudo-1.9.3p1/plugins/sample_approval/sample_approval.c Examining data/sudo-1.9.3p1/plugins/sudoers/alias.c Examining data/sudo-1.9.3p1/plugins/sudoers/audit.c Examining data/sudo-1.9.3p1/plugins/sudoers/auth/afs.c Examining data/sudo-1.9.3p1/plugins/sudoers/auth/aix_auth.c Examining data/sudo-1.9.3p1/plugins/sudoers/auth/bsdauth.c Examining data/sudo-1.9.3p1/plugins/sudoers/auth/dce.c Examining data/sudo-1.9.3p1/plugins/sudoers/auth/fwtk.c Examining data/sudo-1.9.3p1/plugins/sudoers/auth/kerb5.c Examining data/sudo-1.9.3p1/plugins/sudoers/auth/pam.c Examining data/sudo-1.9.3p1/plugins/sudoers/auth/passwd.c Examining data/sudo-1.9.3p1/plugins/sudoers/auth/rfc1938.c Examining data/sudo-1.9.3p1/plugins/sudoers/auth/secureware.c Examining data/sudo-1.9.3p1/plugins/sudoers/auth/securid5.c Examining data/sudo-1.9.3p1/plugins/sudoers/auth/sia.c Examining data/sudo-1.9.3p1/plugins/sudoers/auth/sudo_auth.c Examining data/sudo-1.9.3p1/plugins/sudoers/auth/sudo_auth.h Examining data/sudo-1.9.3p1/plugins/sudoers/base64.c Examining data/sudo-1.9.3p1/plugins/sudoers/boottime.c Examining data/sudo-1.9.3p1/plugins/sudoers/bsm_audit.c Examining data/sudo-1.9.3p1/plugins/sudoers/bsm_audit.h Examining data/sudo-1.9.3p1/plugins/sudoers/check.c Examining data/sudo-1.9.3p1/plugins/sudoers/check.h Examining data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers.c Examining data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers.h Examining data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_json.c Examining data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_ldif.c Examining data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_pwutil.c Examining data/sudo-1.9.3p1/plugins/sudoers/def_data.c Examining data/sudo-1.9.3p1/plugins/sudoers/def_data.h Examining data/sudo-1.9.3p1/plugins/sudoers/defaults.c Examining data/sudo-1.9.3p1/plugins/sudoers/defaults.h Examining data/sudo-1.9.3p1/plugins/sudoers/digestname.c Examining data/sudo-1.9.3p1/plugins/sudoers/editor.c Examining data/sudo-1.9.3p1/plugins/sudoers/env_pattern.c Examining data/sudo-1.9.3p1/plugins/sudoers/exptilde.c Examining data/sudo-1.9.3p1/plugins/sudoers/file.c Examining data/sudo-1.9.3p1/plugins/sudoers/filedigest.c Examining data/sudo-1.9.3p1/plugins/sudoers/find_path.c Examining data/sudo-1.9.3p1/plugins/sudoers/fmtsudoers.c Examining data/sudo-1.9.3p1/plugins/sudoers/gc.c Examining data/sudo-1.9.3p1/plugins/sudoers/gentime.c Examining data/sudo-1.9.3p1/plugins/sudoers/getdate.c Examining data/sudo-1.9.3p1/plugins/sudoers/getspwuid.c Examining data/sudo-1.9.3p1/plugins/sudoers/gmtoff.c Examining data/sudo-1.9.3p1/plugins/sudoers/goodpath.c Examining data/sudo-1.9.3p1/plugins/sudoers/gram.c Examining data/sudo-1.9.3p1/plugins/sudoers/gram.h Examining data/sudo-1.9.3p1/plugins/sudoers/group_plugin.c Examining data/sudo-1.9.3p1/plugins/sudoers/hexchar.c Examining data/sudo-1.9.3p1/plugins/sudoers/ins_2001.h Examining data/sudo-1.9.3p1/plugins/sudoers/ins_csops.h Examining data/sudo-1.9.3p1/plugins/sudoers/ins_goons.h Examining data/sudo-1.9.3p1/plugins/sudoers/ins_python.h Examining data/sudo-1.9.3p1/plugins/sudoers/insults.h Examining data/sudo-1.9.3p1/plugins/sudoers/interfaces.c Examining data/sudo-1.9.3p1/plugins/sudoers/interfaces.h Examining data/sudo-1.9.3p1/plugins/sudoers/iolog.c Examining data/sudo-1.9.3p1/plugins/sudoers/iolog_client.c Examining data/sudo-1.9.3p1/plugins/sudoers/iolog_path_escapes.c Examining data/sudo-1.9.3p1/plugins/sudoers/iolog_plugin.h Examining data/sudo-1.9.3p1/plugins/sudoers/ldap.c Examining data/sudo-1.9.3p1/plugins/sudoers/ldap_conf.c Examining data/sudo-1.9.3p1/plugins/sudoers/ldap_util.c Examining data/sudo-1.9.3p1/plugins/sudoers/linux_audit.c Examining data/sudo-1.9.3p1/plugins/sudoers/linux_audit.h Examining data/sudo-1.9.3p1/plugins/sudoers/locale.c Examining data/sudo-1.9.3p1/plugins/sudoers/logging.c Examining data/sudo-1.9.3p1/plugins/sudoers/logging.h Examining data/sudo-1.9.3p1/plugins/sudoers/logwrap.c Examining data/sudo-1.9.3p1/plugins/sudoers/match.c Examining data/sudo-1.9.3p1/plugins/sudoers/match_addr.c Examining data/sudo-1.9.3p1/plugins/sudoers/match_command.c Examining data/sudo-1.9.3p1/plugins/sudoers/match_digest.c Examining data/sudo-1.9.3p1/plugins/sudoers/parse.c Examining data/sudo-1.9.3p1/plugins/sudoers/parse.h Examining data/sudo-1.9.3p1/plugins/sudoers/parse_ldif.c Examining data/sudo-1.9.3p1/plugins/sudoers/policy.c Examining data/sudo-1.9.3p1/plugins/sudoers/prompt.c Examining data/sudo-1.9.3p1/plugins/sudoers/pwutil.c Examining data/sudo-1.9.3p1/plugins/sudoers/pwutil.h Examining data/sudo-1.9.3p1/plugins/sudoers/pwutil_impl.c Examining data/sudo-1.9.3p1/plugins/sudoers/rcstr.c Examining data/sudo-1.9.3p1/plugins/sudoers/redblack.c Examining data/sudo-1.9.3p1/plugins/sudoers/redblack.h Examining data/sudo-1.9.3p1/plugins/sudoers/regress/check_symbols/check_symbols.c Examining data/sudo-1.9.3p1/plugins/sudoers/regress/env_match/check_env_pattern.c Examining data/sudo-1.9.3p1/plugins/sudoers/regress/exptilde/check_exptilde.c Examining data/sudo-1.9.3p1/plugins/sudoers/regress/iolog_plugin/check_iolog_plugin.c Examining data/sudo-1.9.3p1/plugins/sudoers/regress/logging/check_wrap.c Examining data/sudo-1.9.3p1/plugins/sudoers/regress/parser/check_addr.c Examining data/sudo-1.9.3p1/plugins/sudoers/regress/parser/check_base64.c Examining data/sudo-1.9.3p1/plugins/sudoers/regress/parser/check_digest.c Examining data/sudo-1.9.3p1/plugins/sudoers/regress/parser/check_fill.c Examining data/sudo-1.9.3p1/plugins/sudoers/regress/parser/check_gentime.c Examining data/sudo-1.9.3p1/plugins/sudoers/regress/parser/check_hexchar.c Examining data/sudo-1.9.3p1/plugins/sudoers/regress/starttime/check_starttime.c Examining data/sudo-1.9.3p1/plugins/sudoers/set_perms.c Examining data/sudo-1.9.3p1/plugins/sudoers/solaris_audit.c Examining data/sudo-1.9.3p1/plugins/sudoers/solaris_audit.h Examining data/sudo-1.9.3p1/plugins/sudoers/sssd.c Examining data/sudo-1.9.3p1/plugins/sudoers/starttime.c Examining data/sudo-1.9.3p1/plugins/sudoers/strlist.c Examining data/sudo-1.9.3p1/plugins/sudoers/strlist.h Examining data/sudo-1.9.3p1/plugins/sudoers/stubs.c Examining data/sudo-1.9.3p1/plugins/sudoers/sudo_ldap.h Examining data/sudo-1.9.3p1/plugins/sudoers/sudo_ldap_conf.h Examining data/sudo-1.9.3p1/plugins/sudoers/sudo_nss.c Examining data/sudo-1.9.3p1/plugins/sudoers/sudo_nss.h Examining data/sudo-1.9.3p1/plugins/sudoers/sudo_printf.c Examining data/sudo-1.9.3p1/plugins/sudoers/sudoers.c Examining data/sudo-1.9.3p1/plugins/sudoers/sudoers.h Examining data/sudo-1.9.3p1/plugins/sudoers/sudoers_debug.c Examining data/sudo-1.9.3p1/plugins/sudoers/sudoers_debug.h Examining data/sudo-1.9.3p1/plugins/sudoers/sudoers_version.h Examining data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c Examining data/sudo-1.9.3p1/plugins/sudoers/testsudoers.c Examining data/sudo-1.9.3p1/plugins/sudoers/timeout.c Examining data/sudo-1.9.3p1/plugins/sudoers/timestamp.c Examining data/sudo-1.9.3p1/plugins/sudoers/timestr.c Examining data/sudo-1.9.3p1/plugins/sudoers/toke.c Examining data/sudo-1.9.3p1/plugins/sudoers/toke.h Examining data/sudo-1.9.3p1/plugins/sudoers/toke_util.c Examining data/sudo-1.9.3p1/plugins/sudoers/tsdump.c Examining data/sudo-1.9.3p1/plugins/sudoers/tsgetgrpw.c Examining data/sudo-1.9.3p1/plugins/sudoers/tsgetgrpw.h Examining data/sudo-1.9.3p1/plugins/sudoers/visudo.c Examining data/sudo-1.9.3p1/plugins/sudoers/ins_classic.h Examining data/sudo-1.9.3p1/plugins/sudoers/env.c Examining data/sudo-1.9.3p1/plugins/system_group/system_group.c Examining data/sudo-1.9.3p1/src/conversation.c Examining data/sudo-1.9.3p1/src/copy_file.c Examining data/sudo-1.9.3p1/src/env_hooks.c Examining data/sudo-1.9.3p1/src/exec.c Examining data/sudo-1.9.3p1/src/exec_common.c Examining data/sudo-1.9.3p1/src/exec_monitor.c Examining data/sudo-1.9.3p1/src/exec_nopty.c Examining data/sudo-1.9.3p1/src/exec_pty.c Examining data/sudo-1.9.3p1/src/get_pty.c Examining data/sudo-1.9.3p1/src/hooks.c Examining data/sudo-1.9.3p1/src/limits.c Examining data/sudo-1.9.3p1/src/load_plugins.c Examining data/sudo-1.9.3p1/src/net_ifs.c Examining data/sudo-1.9.3p1/src/openbsd.c Examining data/sudo-1.9.3p1/src/parse_args.c Examining data/sudo-1.9.3p1/src/preload.c Examining data/sudo-1.9.3p1/src/preserve_fds.c Examining data/sudo-1.9.3p1/src/regress/noexec/check_noexec.c Examining data/sudo-1.9.3p1/src/regress/ttyname/check_ttyname.c Examining data/sudo-1.9.3p1/src/selinux.c Examining data/sudo-1.9.3p1/src/sesh.c Examining data/sudo-1.9.3p1/src/signal.c Examining data/sudo-1.9.3p1/src/solaris.c Examining data/sudo-1.9.3p1/src/sudo.c Examining data/sudo-1.9.3p1/src/sudo.h Examining data/sudo-1.9.3p1/src/sudo_edit.c Examining data/sudo-1.9.3p1/src/sudo_exec.h Examining data/sudo-1.9.3p1/src/sudo_noexec.c Examining data/sudo-1.9.3p1/src/sudo_plugin_int.h Examining data/sudo-1.9.3p1/src/tcsetpgrp_nobg.c Examining data/sudo-1.9.3p1/src/tgetpass.c Examining data/sudo-1.9.3p1/src/ttyname.c Examining data/sudo-1.9.3p1/src/utmp.c FINAL RESULTS: data/sudo-1.9.3p1/lib/iolog/iolog_fileio.c:187:10: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. if (chown(path, iolog_uid, iolog_gid) != 0) { data/sudo-1.9.3p1/lib/iolog/iolog_fileio.c:234:10: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(path, iolog_dirmode) != 0) { data/sudo-1.9.3p1/lib/util/fchmodat.c:46:9: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. return chmod(path, mode); data/sudo-1.9.3p1/lib/util/fchmodat.c:55:11: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. ret = chmod(path, mode); data/sudo-1.9.3p1/lib/util/mkdir_parents.c:74:11: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. if (chown(path, uid, gid) != 0) { data/sudo-1.9.3p1/plugins/sudoers/timestamp.c:208:10: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. if (chown(path, owner, group) != 0) { data/sudo-1.9.3p1/plugins/sudoers/visudo.c:701:7: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. if (chown(sp->path, sudoers_uid, sudoers_gid) != 0) { data/sudo-1.9.3p1/plugins/sudoers/visudo.c:708:7: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(sp->path, sudoers_mode) != 0) { data/sudo-1.9.3p1/plugins/sudoers/visudo.c:727:6: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. if (chown(sp->tpath, sb.st_uid, sb.st_gid) != 0) { data/sudo-1.9.3p1/plugins/sudoers/visudo.c:731:6: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(sp->tpath, sb.st_mode & ACCESSPERMS) != 0) { data/sudo-1.9.3p1/plugins/sudoers/visudo.c:736:6: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. if (chown(sp->tpath, sudoers_uid, sudoers_gid) != 0) { data/sudo-1.9.3p1/plugins/sudoers/visudo.c:742:6: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(sp->tpath, sudoers_mode) != 0) { data/sudo-1.9.3p1/src/get_pty.c:66:6: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. if (chown(name, ttyuid, ttygid) == 0) data/sudo-1.9.3p1/src/get_pty.c:86:13: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. (void) chown(line, ttyuid, -1); data/sudo-1.9.3p1/src/get_pty.c:140:9: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. (void) chown(line, ttyuid, -1); data/sudo-1.9.3p1/src/get_pty.c:175:13: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. (void) chown(line, ttyuid, ttygid); data/sudo-1.9.3p1/src/get_pty.c:176:13: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. (void) chmod(line, S_IRUSR|S_IWUSR|S_IWGRP); data/sudo-1.9.3p1/src/sudo_edit.c:825:6: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. if (chown(tf[i].tfile, user_details.uid, user_details.gid) != 0) { data/sudo-1.9.3p1/src/sudo_edit.c:879:6: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. if (chown(tf[i].tfile, command_details->uid, command_details->gid) != 0) { data/sudo-1.9.3p1/include/sudo_compat.h:482:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # undef snprintf data/sudo-1.9.3p1/include/sudo_compat.h:483:10: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define snprintf sudo_snprintf data/sudo-1.9.3p1/include/sudo_compat.h:487:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # undef vsnprintf data/sudo-1.9.3p1/include/sudo_compat.h:488:10: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define vsnprintf sudo_vsnprintf data/sudo-1.9.3p1/lib/iolog/regress/iolog_mkpath/check_iolog_mkpath.c:87:5: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp("rm", rmargs); data/sudo-1.9.3p1/lib/util/fatal.c:205:12: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. buflen = vsnprintf(static_buf, sizeof(static_buf), fmt, ap2); data/sudo-1.9.3p1/lib/util/fatal.c:210:10: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (void)vsnprintf(buf, buflen, fmt, ap); data/sudo-1.9.3p1/lib/util/fatal.c:235:17: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/sudo-1.9.3p1/lib/util/getentropy.c:459:7: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. HF(printf); /* an addr in libc */ data/sudo-1.9.3p1/lib/util/inet_ntop.c:81:8: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. len = snprintf(dst, size, fmt, src[0], src[1], src[2], src[3]); data/sudo-1.9.3p1/lib/util/regress/fnmatch/fnm_test.c:46:9: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. got = fscanf(fp, "%s %s %s %d\n", pattern, string, flagstr, data/sudo-1.9.3p1/lib/util/regress/vsyslog/vsyslog_test.c:44:1: [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. syslog(int priority, const char *fmt, ...) data/sudo-1.9.3p1/lib/util/sudo_debug.c:732:21: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. buflen = fmt ? vsnprintf(static_buf, sizeof(static_buf), fmt, ap2) : 0; data/sudo-1.9.3p1/lib/util/vsyslog.c:66:19: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. len = (size_t)vsnprintf(msgbuf, sizeof(msgbuf), new_fmt, ap2); data/sudo-1.9.3p1/lib/zlib/gzguts.h:86:18: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # if !defined(vsnprintf) && !defined(NO_vsnprintf) data/sudo-1.9.3p1/lib/zlib/gzguts.h:88:18: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define vsnprintf _vsnprintf data/sudo-1.9.3p1/lib/zlib/gzguts.h:110:11: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define snprintf _snprintf data/sudo-1.9.3p1/lib/zlib/gzguts.h:110:20: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define snprintf _snprintf data/sudo-1.9.3p1/lib/zlib/gzlib.c:216:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(state->path, path); data/sudo-1.9.3p1/lib/zlib/gzlib.c:614:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(state->msg, state->path); data/sudo-1.9.3p1/lib/zlib/gzlib.c:616:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(state->msg, msg); data/sudo-1.9.3p1/lib/zlib/gzwrite.c:417:11: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. (void)vsprintf(next, format, va); data/sudo-1.9.3p1/lib/zlib/gzwrite.c:421:11: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. len = vsprintf(next, format, va); data/sudo-1.9.3p1/lib/zlib/gzwrite.c:425:11: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (void)vsnprintf(next, state->size, format, va); data/sudo-1.9.3p1/lib/zlib/gzwrite.c:428:11: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. len = vsnprintf(next, state->size, format, va); data/sudo-1.9.3p1/lib/zlib/gzwrite.c:511:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(next, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, data/sudo-1.9.3p1/lib/zlib/gzwrite.c:517:11: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. len = sprintf(next, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, data/sudo-1.9.3p1/lib/zlib/gzwrite.c:522:5: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(next, state->size, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, data/sudo-1.9.3p1/lib/zlib/gzwrite.c:526:11: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. len = snprintf(next, state->size, format, a1, a2, a3, a4, a5, a6, a7, a8, data/sudo-1.9.3p1/lib/zlib/zutil.h:242:39: [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 Trace(x) {if (z_verbose>=0) fprintf x ;} data/sudo-1.9.3p1/lib/zlib/zutil.h:243:39: [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 Tracev(x) {if (z_verbose>0) fprintf x ;} data/sudo-1.9.3p1/lib/zlib/zutil.h:244:40: [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 Tracevv(x) {if (z_verbose>1) fprintf x ;} data/sudo-1.9.3p1/lib/zlib/zutil.h:245:48: [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 Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;} data/sudo-1.9.3p1/lib/zlib/zutil.h:246:49: [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 Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;} data/sudo-1.9.3p1/logsrvd/eventlog.c:458:6: [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. syslog(pri, fmt, details->submituser, p); data/sudo-1.9.3p1/logsrvd/eventlog.c:466:6: [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. syslog(pri, fmt, details->submituser, p); data/sudo-1.9.3p1/logsrvd/logsrvd_conf.c:110:7: [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. } syslog; data/sudo-1.9.3p1/logsrvd/logsrvd_conf.c:197:28: [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. return logsrvd_config->syslog.maxlen; data/sudo-1.9.3p1/logsrvd/logsrvd_conf.c:203:28: [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. return logsrvd_config->syslog.facility; data/sudo-1.9.3p1/logsrvd/logsrvd_conf.c:209:28: [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. return logsrvd_config->syslog.acceptpri; data/sudo-1.9.3p1/logsrvd/logsrvd_conf.c:215:28: [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. return logsrvd_config->syslog.rejectpri; data/sudo-1.9.3p1/logsrvd/logsrvd_conf.c:221:28: [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. return logsrvd_config->syslog.alertpri; data/sudo-1.9.3p1/logsrvd/logsrvd_conf.c:636:13: [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. config->syslog.maxlen = maxlen; data/sudo-1.9.3p1/logsrvd/logsrvd_conf.c:653:13: [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. config->syslog.facility = logfac; data/sudo-1.9.3p1/logsrvd/logsrvd_conf.c:670:13: [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. config->syslog.acceptpri = logpri; data/sudo-1.9.3p1/logsrvd/logsrvd_conf.c:684:13: [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. config->syslog.rejectpri = logpri; data/sudo-1.9.3p1/logsrvd/logsrvd_conf.c:701:13: [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. config->syslog.alertpri = logpri; data/sudo-1.9.3p1/logsrvd/logsrvd_conf.c:989:9: [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 (access(DEFAULT_CA_CERT_PATH, R_OK) == 0) { data/sudo-1.9.3p1/logsrvd/logsrvd_conf.c:996:9: [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 (access(DEFAULT_SERVER_CERT_PATH, R_OK) == 0) { data/sudo-1.9.3p1/logsrvd/logsrvd_conf.c:1030:13: [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. config->syslog.maxlen = 960; data/sudo-1.9.3p1/logsrvd/logsrvd_conf.c:1103:29: [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. openlog("sudo", 0, config->syslog.facility); data/sudo-1.9.3p1/logsrvd/sendlog.c:109:5: [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. fprintf(stderr, "usage: %s [-AnV] [-b ca_bundle] [-c cert_file] [-h host] " data/sudo-1.9.3p1/plugins/group_file/plugin_test.c:65:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(fp, fmt, ap); data/sudo-1.9.3p1/plugins/python/pyhelpers.c:49:8: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. len = vfprintf(ttyfp ? ttyfp : fp, fmt, ap); data/sudo-1.9.3p1/plugins/python/regress/iohelpers.c:35:9: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (system(cmd) == 0) data/sudo-1.9.3p1/plugins/python/regress/iohelpers.c:105:14: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. int rc = vsnprintf(output + output_len, max_output_len - output_len, fmt, args2); data/sudo-1.9.3p1/plugins/python/regress/testhelpers.c:51:5: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(expected_output_file + dirlen, PATH_MAX - dirlen, format, args); data/sudo-1.9.3p1/plugins/sudoers/alias.c:143:8: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (void)snprintf(errbuf, sizeof(errbuf), data/sudo-1.9.3p1/plugins/sudoers/auth/aix_auth.c:207:2: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl("/usr/bin/passwd", "passwd", user, (char *)NULL); data/sudo-1.9.3p1/plugins/sudoers/auth/passwd.c:86:22: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. epass = (char *) crypt(pass, pw_epasswd); data/sudo-1.9.3p1/plugins/sudoers/auth/secureware.c:87:14: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. epass = crypt(pass, pw_epasswd); data/sudo-1.9.3p1/plugins/sudoers/env.c:1331:44: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. char * (*ef_next)(void *, int *), bool system) data/sudo-1.9.3p1/plugins/sudoers/env.c:1333:35: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. struct sudoers_env_file *ef = system ? &env_file_system : &env_file_sudoers; data/sudo-1.9.3p1/plugins/sudoers/gram.c:956:21: [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 YYFPRINTF fprintf data/sudo-1.9.3p1/plugins/sudoers/logging.c:753:5: [4] (shell) execv: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execv(mpath, argv); data/sudo-1.9.3p1/plugins/sudoers/logging.c:899:12: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void) vfprintf(mail, fmt, ap); data/sudo-1.9.3p1/plugins/sudoers/regress/env_match/check_env_pattern.c:54:8: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. got = fscanf(fp, "%s %s %d\n", pattern, string, &want); data/sudo-1.9.3p1/plugins/sudoers/regress/iolog_plugin/check_iolog_plugin.c:61:8: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. len = vfprintf(stdout, fmt, ap); data/sudo-1.9.3p1/plugins/sudoers/regress/iolog_plugin/check_iolog_plugin.c:66:8: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. len = vfprintf(stderr, fmt, ap); data/sudo-1.9.3p1/plugins/sudoers/sudo_printf.c:54:8: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. len = vfprintf(ttyfp ? ttyfp : fp, fmt, ap); data/sudo-1.9.3p1/plugins/sudoers/sudoers.h:391:122: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. void register_env_file(void * (*ef_open)(const char *), void (*ef_close)(void *), char * (*ef_next)(void *, int *), bool system); data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:591:11: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. len = snprintf(buf, sizeof(buf), setsize_fmt, lines, cols); data/sudo-1.9.3p1/plugins/sudoers/visudo.c:229:2: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp("cvtsudoers", "cvtsudoers", "-f", "json", "-o", export_path, data/sudo-1.9.3p1/plugins/sudoers/visudo.c:864:6: [4] (shell) execv: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execv(path, argv); data/sudo-1.9.3p1/plugins/sudoers/visudo.c:1088:3: [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. fprintf(stderr, strict ? data/sudo-1.9.3p1/plugins/sudoers/visudo.c:1093:3: [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. fprintf(stderr, strict ? data/sudo-1.9.3p1/plugins/sudoers/visudo.c:1186:5: [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. fprintf(stderr, U_("Warning: %s:%d: unused %s \"%s\""), data/sudo-1.9.3p1/src/conversation.c:177:8: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. len = vfprintf(ttyfp ? ttyfp : fp, fmt, ap); data/sudo-1.9.3p1/src/copy_file.c:91:2: [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. fprintf(stderr, U_("%s: truncate %s to zero bytes? (y/n) [n] "), data/sudo-1.9.3p1/src/regress/noexec/check_noexec.c:90:2: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl("/bin/true", "true", (char *)0); data/sudo-1.9.3p1/src/regress/noexec/check_noexec.c:112:14: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. status = system("/bin/true > /dev/null 2>&1"); data/sudo-1.9.3p1/src/sudo.c:900:11: [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 (access(pathbuf, X_OK) == 0) { data/sudo-1.9.3p1/src/sudo_noexec.c:123:10: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. DUMMY_VA(execl, const char *, const char *) data/sudo-1.9.3p1/src/sudo_noexec.c:124:10: [4] (shell) execle: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. DUMMY_VA(execle, const char *, const char *) data/sudo-1.9.3p1/src/sudo_noexec.c:125:10: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. DUMMY_VA(execlp, const char *, const char *) data/sudo-1.9.3p1/src/sudo_noexec.c:126:8: [4] (shell) execv: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. DUMMY2(execv, const char *, char * const *) data/sudo-1.9.3p1/src/sudo_noexec.c:127:8: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. DUMMY2(execvp, const char *, char * const *) data/sudo-1.9.3p1/src/sudo_noexec.c:160:8: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. DUMMY1(system, const char *) data/sudo-1.9.3p1/src/sudo_noexec.c:163:9: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. FN_NAME(popen)(const char *c, const char *t) data/sudo-1.9.3p1/src/sudo_noexec.c:168:11: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. INTERPOSE(popen) data/sudo-1.9.3p1/src/tgetpass.c:335:2: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl(askpass, askpass, prompt, (char *)NULL); data/sudo-1.9.3p1/include/compat/getopt.h:62:8: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. #undef getopt_long data/sudo-1.9.3p1/include/compat/getopt.h:63:9: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. #define getopt_long(_a, _b, _c, _d, _e) \ data/sudo-1.9.3p1/include/compat/getopt.h:73:8: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. #undef getopt data/sudo-1.9.3p1/include/compat/getopt.h:74:9: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. #define getopt(_a, _b, _c) sudo_getopt((_a), (_b), (_c)) data/sudo-1.9.3p1/lib/iolog/regress/iolog_json/check_iolog_json.c:179:18: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, "c")) != -1) { data/sudo-1.9.3p1/lib/util/getopt_long.c:379:21: [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. posixly_correct = (getenv("POSIXLY_CORRECT") != NULL); data/sudo-1.9.3p1/lib/util/glob.c:372: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. if ((h = getenv("HOME")) == NULL) { data/sudo-1.9.3p1/lib/util/ttysize.c:60:11: [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 ((p = getenv("LINES")) == NULL || data/sudo-1.9.3p1/lib/util/ttysize.c:64:11: [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 ((p = getenv("COLUMNS")) == NULL || data/sudo-1.9.3p1/logsrvd/logsrvd.c:1900:18: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt_long(argc, argv, short_opts, long_opts, NULL)) != -1) { data/sudo-1.9.3p1/logsrvd/sendlog.c:1705:18: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt_long(argc, argv, short_opts, long_opts, NULL)) != -1) { data/sudo-1.9.3p1/plugins/group_file/plugin_test.c:186:18: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, "p:")) != -1) { data/sudo-1.9.3p1/plugins/python/regress/testhelpers.c:79:30: [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. const char *update = getenv("UPDATE_TESTDATA"); data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers.c:134:18: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt_long(argc, argv, short_opts, long_opts, NULL)) != -1) { data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers.c:153:18: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt_long(argc, argv, short_opts, long_opts, NULL)) != -1) { data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers.c:296:23: [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. conf->sudoers_base = getenv("SUDOERS_BASE"); data/sudo-1.9.3p1/plugins/sudoers/editor.c:71:58: [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 (find_path(editor, &editor_path, &user_editor_sb, getenv("PATH"), NULL, data/sudo-1.9.3p1/plugins/sudoers/editor.c:142:17: [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. char *editor = getenv(ev[i]); data/sudo-1.9.3p1/plugins/sudoers/getdate.c:1084:16: [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 ((yys = getenv("YYDEBUG"))) data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:236:18: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt_long(argc, argv, short_opts, long_opts, NULL)) != -1) { data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:638: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. term = getenv("TERM"); data/sudo-1.9.3p1/plugins/sudoers/testsudoers.c:144:18: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, "dg:G:h:i:P:p:tu:U:")) != -1) { data/sudo-1.9.3p1/plugins/sudoers/tsdump.c:87:18: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, "f:u:")) != -1) { data/sudo-1.9.3p1/plugins/sudoers/visudo.c:174:18: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt_long(argc, argv, short_opts, long_opts, NULL)) != -1) { data/sudo-1.9.3p1/plugins/sudoers/visudo.c:237:21: [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. const char *user = getenv("SUDO_USER"); data/sudo-1.9.3p1/src/env_hooks.c:61:1: [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. getenv(const char *name) data/sudo-1.9.3p1/src/env_hooks.c:180:23: [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 (!overwrite && getenv(var) != NULL) { data/sudo-1.9.3p1/src/exec.c:168:18: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. if (details->chroot) { data/sudo-1.9.3p1/src/exec.c:169:6: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. if (chroot(details->chroot) != 0 || chdir("/") != 0) { data/sudo-1.9.3p1/src/exec.c:169:22: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. if (chroot(details->chroot) != 0 || chdir("/") != 0) { data/sudo-1.9.3p1/src/exec.c:170:60: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. sudo_warn(U_("unable to change root to %s"), details->chroot); data/sudo-1.9.3p1/src/exec.c:210:15: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. if (details->chroot != NULL || user_details.cwd == NULL || data/sudo-1.9.3p1/src/exec.c:217:16: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. if (details->chroot != NULL) data/sudo-1.9.3p1/src/parse_args.c:226:13: [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 ((val = getenv(cp)) != NULL) data/sudo-1.9.3p1/src/parse_args.c:300:12: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. if ((ch = getopt_long(argc, argv, short_opts, long_opts, NULL)) != -1) { data/sudo-1.9.3p1/src/sudo.c:554:22: [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 ((ud->shell = getenv("SHELL")) == NULL || ud->shell[0] == '\0') { data/sudo-1.9.3p1/src/sudo.c:685:25: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. SET_STRING("chroot=", chroot) data/sudo-1.9.3p1/src/sudo.h:165:17: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. const char *chroot; data/sudo-1.9.3p1/include/sudo_compat.h:98:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define va_copy(d, s) memcpy(&(d), &(s), sizeof(d)); data/sudo-1.9.3p1/include/sudo_event.h:67:5: [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 si_buf[1]; data/sudo-1.9.3p1/include/sudo_iolog.h:136:19: [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. bool iolog_nextid(char *iolog_dir, char sessid[7]); data/sudo-1.9.3p1/include/sudo_iolog.h:136:36: [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. bool iolog_nextid(char *iolog_dir, char sessid[7]); data/sudo-1.9.3p1/include/sudo_plugin.h:167:11: [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). int (*open)(unsigned int version, sudo_conv_t conversation, data/sudo-1.9.3p1/include/sudo_plugin.h:192:11: [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). int (*open)(unsigned int version, sudo_conv_t conversation, data/sudo-1.9.3p1/include/sudo_plugin.h:225:11: [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). int (*open)(unsigned int version, sudo_conv_t conversation, data/sudo-1.9.3p1/include/sudo_plugin.h:250:11: [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). int (*open)(unsigned int version, sudo_conv_t conversation, data/sudo-1.9.3p1/include/sudo_util.h:316:51: [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. sudo_dso_public void sudo_uuid_create_v1(unsigned char uuid_out[16]); data/sudo-1.9.3p1/include/sudo_util.h:318:17: [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. sudo_dso_public char *sudo_uuid_to_string_v1(unsigned char uuid[16], char *dst, size_t dstsiz); data/sudo-1.9.3p1/include/sudo_util.h:318:55: [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. sudo_dso_public char *sudo_uuid_to_string_v1(unsigned char uuid[16], char *dst, size_t dstsiz); data/sudo-1.9.3p1/lib/iolog/hostcheck.c:57:5: [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 ipstr[INET6_ADDRSTRLEN]; data/sudo-1.9.3p1/lib/iolog/hostcheck.c:59:5: [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 ipstr[INET_ADDRSTRLEN]; data/sudo-1.9.3p1/lib/iolog/hostcheck.c:219:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(nullterm_common_name, common_name_str, common_name_length); data/sudo-1.9.3p1/lib/iolog/hostcheck.c:296:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(nullterm_dns_name, dns_name, dns_name_length); data/sudo-1.9.3p1/lib/iolog/hostcheck.c:309:13: [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 san_ip_str[INET6_ADDRSTRLEN]; data/sudo-1.9.3p1/lib/iolog/hostcheck.c:311:13: [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 san_ip_str[INET_ADDRSTRLEN]; data/sudo-1.9.3p1/lib/iolog/iolog_fileio.c:52:17: [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. static unsigned char const gzip_magic[2] = {0x1f, 0x8b}; data/sudo-1.9.3p1/lib/iolog/iolog_fileio.c:127:11: [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). dfd = open(path, O_RDONLY|O_NONBLOCK); data/sudo-1.9.3p1/lib/iolog/iolog_fileio.c:131: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). dfd = open(path, O_RDONLY|O_NONBLOCK); data/sudo-1.9.3p1/lib/iolog/iolog_fileio.c:429:14: [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. iolog_nextid(char *iolog_dir, char sessid[7]) data/sudo-1.9.3p1/lib/iolog/iolog_fileio.c:429:31: [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. iolog_nextid(char *iolog_dir, char sessid[7]) data/sudo-1.9.3p1/lib/iolog/iolog_fileio.c:431:5: [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 buf[32], *ep; data/sudo-1.9.3p1/lib/iolog/iolog_fileio.c:436:5: [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 pathbuf[PATH_MAX]; data/sudo-1.9.3p1/lib/iolog/iolog_fileio.c:502:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(sessid, buf, 6); data/sudo-1.9.3p1/lib/iolog/iolog_fileio.c:561:14: [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. unsigned char magic[2]; data/sudo-1.9.3p1/lib/iolog/iolog_path.c:52:5: [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 *dst, *pathend, tmpbuf[PATH_MAX]; data/sudo-1.9.3p1/lib/iolog/iolog_path.c:122:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(path, tmpbuf, len); data/sudo-1.9.3p1/lib/iolog/iolog_util.c:176: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 ((tmpfd = open(iolog_dir, O_RDONLY)) == -1) { data/sudo-1.9.3p1/lib/iolog/iolog_util.c:254:5: [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 numbuf[(((sizeof(long long) * 8) + 2) / 3) + 2]; data/sudo-1.9.3p1/lib/iolog/iolog_util.c:269:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(numbuf, cp, len); data/sudo-1.9.3p1/lib/iolog/iolog_util.c:295:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(numbuf, cp, len); data/sudo-1.9.3p1/lib/iolog/iolog_util.c:409:5: [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 line[LINE_MAX]; data/sudo-1.9.3p1/lib/iolog/regress/iolog_json/check_iolog_json.c:199: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 pathbuf[PATH_MAX]; data/sudo-1.9.3p1/lib/iolog/regress/iolog_json/check_iolog_json.c:211:14: [2] (misc) fopen: 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 ((infp = fopen(infile, "r")) == NULL) { data/sudo-1.9.3p1/lib/iolog/regress/iolog_json/check_iolog_json.c:232:19: [2] (misc) fopen: 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 ((outfp = fopen(pathbuf, "r")) != NULL) data/sudo-1.9.3p1/lib/iolog/regress/iolog_path/check_iolog_path.c:36:5: [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 sessid[7]; data/sudo-1.9.3p1/lib/iolog/regress/iolog_path/check_iolog_path.c:131:5: [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 dir[PATH_MAX], dir_out[PATH_MAX]; data/sudo-1.9.3p1/lib/iolog/regress/iolog_path/check_iolog_path.c:132:5: [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 file[PATH_MAX], file_out[PATH_MAX]; data/sudo-1.9.3p1/lib/iolog/regress/iolog_path/check_iolog_path.c:172:5: [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 line[2048]; data/sudo-1.9.3p1/lib/iolog/regress/iolog_path/check_iolog_path.c:184:10: [2] (misc) fopen: 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). fp = fopen(argv[1], "r"); data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:207:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new_data, simp->data, simp->len); data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:215:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(simp->data + simp->len, data, len); data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:663:26: [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. size_t len = strlen(((char **) array)[i]); data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:919:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(out, &value, 4); data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:950:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(out, &value, 8); data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:1002:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(out + rv, str, len); data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:1023:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(out + rv, bd->data, len); data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:1280:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(out, in, n * 4); data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:1303:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(out, in, n * 8); data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:1464:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(out + rv, field->data, field->len); data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:2208:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new_field, *p_earlier, data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:2210:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new_field + data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:2325:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(latter_elem, earlier_elem, el_size); data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:2435:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&t, data, 4); data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:2477:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&t, data, 8); data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:2565:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(*pstr, data + pref_len, len - pref_len); data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:2588:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(bd->data, data + pref_len, len - pref_len); data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:2862:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(array, at, count * siz); data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:2895:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ufield->data, scanned_member->data, ufield->len); data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:2961:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(field, dv, 4); data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:2969:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(field, dv, 8); data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:2972:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(field, dv, sizeof(protobuf_c_boolean)); data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:2975:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(field, dv, sizeof(ProtobufCBinaryData)); data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:3047:11: [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. unsigned char required_fields_bitmap_stack[16]; data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:3351:28: [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. do_free(allocator, ((char **) arr)[i]); data/sudo-1.9.3p1/lib/util/aix.c:137:9: [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. typedef char authdb_t[16]; data/sudo-1.9.3p1/lib/util/arc4random.c:96:11: [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. unsigned char rnd[KEYSZ + IVSZ]; data/sudo-1.9.3p1/lib/util/arc4random.c:161:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, keystream, m); data/sudo-1.9.3p1/lib/util/arc4random.c:181:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(val, keystream, sizeof(*val)); data/sudo-1.9.3p1/lib/util/chacha_private.h:51:14: [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. static const char sigma[16] = "expand 32-byte k"; data/sudo-1.9.3p1/lib/util/chacha_private.h:52:14: [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. static const char tau[16] = "expand 16-byte k"; data/sudo-1.9.3p1/lib/util/digest_gcrypt.c:138:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(md, gcry_md_read(dig->ctx, 0), dig->digest_len); data/sudo-1.9.3p1/lib/util/event.c:123:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(sc->siginfo, base->siginfo[i], sizeof(siginfo_t)); data/sudo-1.9.3p1/lib/util/event.c:359:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(signal_base->siginfo[signo], info, sizeof(*info)); data/sudo-1.9.3p1/lib/util/event_select.c:213:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(base->readfds_out, base->readfds_in, setsize); data/sudo-1.9.3p1/lib/util/event_select.c:214:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(base->writefds_out, base->writefds_in, setsize); data/sudo-1.9.3p1/lib/util/fatal.c:193: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 static_buf[1024], *buf = static_buf; data/sudo-1.9.3p1/lib/util/fchmodat.c:49:17: [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 ((odfd = open(".", O_RDONLY)) == -1) data/sudo-1.9.3p1/lib/util/fnmatch.c:297:18: [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. static const char dummystring[2] = {' ', 0}; data/sudo-1.9.3p1/lib/util/fstatat.c:47:17: [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 ((odfd = open(".", O_RDONLY)) == -1) data/sudo-1.9.3p1/lib/util/getcwd.c:130:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pt, bpt, ept - bpt); data/sudo-1.9.3p1/lib/util/getcwd.c:180:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(bup, dp->d_name, NAMLEN(dp) + 1); data/sudo-1.9.3p1/lib/util/getcwd.c:213:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ept - len, bpt, len); data/sudo-1.9.3p1/lib/util/getcwd.c:219:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(bpt, dp->d_name, NAMLEN(dp)); data/sudo-1.9.3p1/lib/util/getentropy.c:111: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 ((fd = open("/dev/zero", O_RDWR)) == -1) data/sudo-1.9.3p1/lib/util/getentropy.c:215:7: [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). fd = open(path, flags, 0); data/sudo-1.9.3p1/lib/util/getentropy.c:607:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)buf + i, results, min(digest_len, len - i)); data/sudo-1.9.3p1/lib/util/getopt_long.c:187:6: [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 **) nargv)[pos] = nargv[cstart]; data/sudo-1.9.3p1/lib/util/getopt_long.c:189:6: [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 **)nargv)[cstart] = swap; data/sudo-1.9.3p1/lib/util/getusershell.c:57:15: [2] (misc) fopen: 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 ((fp = fopen("/etc/shells", "r")) == NULL) data/sudo-1.9.3p1/lib/util/glob.c:367:8: [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. if (((char *) patbuf)[0] == EOS) { data/sudo-1.9.3p1/lib/util/glob.c:647: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 buf[PATH_MAX]; data/sudo-1.9.3p1/lib/util/glob.c:881: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 buf[PATH_MAX]; data/sudo-1.9.3p1/lib/util/glob.c:897: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 buf[PATH_MAX]; data/sudo-1.9.3p1/lib/util/glob.c:907: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 buf[PATH_MAX]; data/sudo-1.9.3p1/lib/util/inet_pton.c:113:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, tmp, NS_INADDRSZ); data/sudo-1.9.3p1/lib/util/inet_pton.c:219:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, tmp, NS_IN6ADDRSZ); data/sudo-1.9.3p1/lib/util/json.c:107:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(json->buf + json->buflen, str, len); data/sudo-1.9.3p1/lib/util/json.c:127: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 buf[3], *cp = buf; data/sudo-1.9.3p1/lib/util/json.c:300:5: [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 numbuf[(((sizeof(long long) * 8) + 2) / 3) + 2]; data/sudo-1.9.3p1/lib/util/key_val.c:47:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cp, key, key_len); data/sudo-1.9.3p1/lib/util/key_val.c:50:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cp, val, val_len); data/sudo-1.9.3p1/lib/util/lbuf.c:112:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(lbuf->buf + lbuf->len, s, len); data/sudo-1.9.3p1/lib/util/lbuf.c:122:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(lbuf->buf + lbuf->len, s, len); data/sudo-1.9.3p1/lib/util/lbuf.c:169:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(lbuf->buf + lbuf->len, s, len); data/sudo-1.9.3p1/lib/util/mkdir_parents.c:65:8: [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). dfd = open(path, O_RDONLY|O_NONBLOCK); data/sudo-1.9.3p1/lib/util/mksiglist.c:37:12: [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. static char *sudo_sys_siglist[NSIG]; data/sudo-1.9.3p1/lib/util/mksigname.c:37:12: [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. static char *sudo_sys_signame[NSIG]; data/sudo-1.9.3p1/lib/util/mktemp.c:93:9: [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). fd = open(path, O_CREAT|O_EXCL|O_RDWR, S_IRUSR|S_IWUSR); data/sudo-1.9.3p1/lib/util/openat.c:38:9: [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). return open(path, flags, mode); data/sudo-1.9.3p1/lib/util/openat.c:41:17: [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 ((odfd = open(".", O_RDONLY)) == -1) data/sudo-1.9.3p1/lib/util/openat.c:49:10: [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). fd = open(path, flags, mode); data/sudo-1.9.3p1/lib/util/parseln.c:118:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(*bufp + total, cp, len + 1); data/sudo-1.9.3p1/lib/util/pw_dup.c:50:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(cp, pw->name, size); \ data/sudo-1.9.3p1/lib/util/pw_dup.c:85:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(newpw, pw, sizeof(struct passwd)); data/sudo-1.9.3p1/lib/util/regress/fnmatch/fnm_test.c:27: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 pattern[1024], string[1024], flagstr[1024]; data/sudo-1.9.3p1/lib/util/regress/fnmatch/fnm_test.c:33:13: [2] (misc) fopen: 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 ((fp = fopen(argv[1], "r")) == NULL) { data/sudo-1.9.3p1/lib/util/regress/getdelim/getdelim_test.c:46:11: [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. const char *output[4]; data/sudo-1.9.3p1/lib/util/regress/glob/globtest.c:27: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 pattern[1024]; data/sudo-1.9.3p1/lib/util/regress/glob/globtest.c:28: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 *results[MAX_RESULTS]; data/sudo-1.9.3p1/lib/util/regress/glob/globtest.c:38: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 buf[2048], *cp, *ep; data/sudo-1.9.3p1/lib/util/regress/glob/globtest.c:46:13: [2] (misc) fopen: 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 ((fp = fopen(argv[1], "r")) == NULL) { data/sudo-1.9.3p1/lib/util/regress/glob/globtest.c:99:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(entry.pattern, buf + 1, len); data/sudo-1.9.3p1/lib/util/regress/mktemp/mktemp_test.c:91:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, prefix, plen); data/sudo-1.9.3p1/lib/util/regress/mktemp/mktemp_test.c:111:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, prefix, plen); data/sudo-1.9.3p1/lib/util/regress/mktemp/mktemp_test.c:113:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p + plen + len, suffix, slen + 1); data/sudo-1.9.3p1/lib/util/regress/mktemp/mktemp_test.c:127: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 cwd[PATH_MAX + 1]; data/sudo-1.9.3p1/lib/util/regress/mktemp/mktemp_test.c:144:6: [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). i = open("/dev/zero", O_RDWR); data/sudo-1.9.3p1/lib/util/regress/strsig/strsig_test.c:188:5: [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 sigstr[SIG2STR_MAX]; data/sudo-1.9.3p1/lib/util/regress/vsyslog/vsyslog_test.c:77:5: [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 buf1[1024 * 16], buf2[1024 * 16]; data/sudo-1.9.3p1/lib/util/secure_path.c:57:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(sbp, &sb, sizeof(struct stat)); data/sudo-1.9.3p1/lib/util/sha2.c:148:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(digest, ctx->state.st32, SHA224_DIGEST_LENGTH); data/sudo-1.9.3p1/lib/util/sha2.c:258:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ctx->buffer[j], data, (i = SHA256_BLOCK_LENGTH - j)); data/sudo-1.9.3p1/lib/util/sha2.c:264:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ctx->buffer[j], &data[i], len - i); data/sudo-1.9.3p1/lib/util/sha2.c:292:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(digest, ctx->state.st32, SHA256_DIGEST_LENGTH); data/sudo-1.9.3p1/lib/util/sha2.c:341:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(digest, ctx->state.st64, SHA384_DIGEST_LENGTH); data/sudo-1.9.3p1/lib/util/sha2.c:471:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ctx->buffer[j], data, (i = SHA512_BLOCK_LENGTH - j)); data/sudo-1.9.3p1/lib/util/sha2.c:477:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ctx->buffer[j], &data[i], len - i); data/sudo-1.9.3p1/lib/util/sha2.c:506:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(digest, ctx->state.st64, SHA512_DIGEST_LENGTH); data/sudo-1.9.3p1/lib/util/sig2str.c:46:18: [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. extern const char *const sys_sigabbrev[NSIG]; data/sudo-1.9.3p1/lib/util/sig2str.c:50:18: [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. extern const char *const sudo_sys_signame[NSIG]; data/sudo-1.9.3p1/lib/util/snprintf.c:129: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 ((fd = open("/dev/zero", O_RDWR)) == -1) data/sudo-1.9.3p1/lib/util/snprintf.c:162: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 buf[MB_LEN_MAX]; data/sudo-1.9.3p1/lib/util/snprintf.c:312: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 expstr[MAXEXPDIG+2]; /* buffer for exponent string: e+ZZZ */ data/sudo-1.9.3p1/lib/util/snprintf.c:323: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 buf[BUF]; /* buffer with space for digits of uintmax_t */ data/sudo-1.9.3p1/lib/util/snprintf.c:324: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 ox[2]; /* space for 0x; ox[1] is either x, X, or \0 */ data/sudo-1.9.3p1/lib/util/snprintf.c:342:9: [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. static char blanks[PADSIZE] = data/sudo-1.9.3p1/lib/util/snprintf.c:344:9: [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. static char zeroes[PADSIZE] = data/sudo-1.9.3p1/lib/util/snprintf.c:347:15: [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. static const char xdigs_lower[16] = "0123456789abcdef"; data/sudo-1.9.3p1/lib/util/snprintf.c:348:15: [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. static const char xdigs_upper[16] = "0123456789ABCDEF"; data/sudo-1.9.3p1/lib/util/snprintf.c:1132:11: [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. unsigned char stattypetable[STATIC_ARG_TBL_SIZE]; data/sudo-1.9.3p1/lib/util/snprintf.c:1474:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(*typetable, oldtable, *tablesize); data/sudo-1.9.3p1/lib/util/snprintf.c:1495: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 expbuf[MAXEXPDIG]; data/sudo-1.9.3p1/lib/util/str2sig.c:49:18: [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. extern const char *const sys_sigabbrev[NSIG]; data/sudo-1.9.3p1/lib/util/str2sig.c:53:18: [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. extern const char *const sudo_sys_signame[NSIG]; data/sudo-1.9.3p1/lib/util/strndup.c:44:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(copy, str, len); data/sudo-1.9.3p1/lib/util/strsignal.c:38:14: [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. extern const char *const sudo_sys_siglist[NSIG]; data/sudo-1.9.3p1/lib/util/strsignal.c:48:10: [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. return (char *)sudo_sys_siglist[signo]; data/sudo-1.9.3p1/lib/util/sudo_conf.c:612:15: [2] (misc) fopen: 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 ((fp = fopen(conf_file, "r")) == NULL) { data/sudo-1.9.3p1/lib/util/sudo_debug.c:113:8: [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. static char sudo_debug_pidstr[(((sizeof(int) * 8) + 2) / 3) + 3]; data/sudo-1.9.3p1/lib/util/sudo_debug.c:169:18: [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). output->fd = open(output->filename, O_WRONLY|O_APPEND, S_IRUSR|S_IWUSR); data/sudo-1.9.3p1/lib/util/sudo_debug.c:173:19: [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). output->fd = open(output->filename, O_WRONLY|O_APPEND|O_CREAT, data/sudo-1.9.3p1/lib/util/sudo_debug.c:586:5: [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 *timestr, numbuf[(((sizeof(int) * 8) + 2) / 3) + 2]; data/sudo-1.9.3p1/lib/util/sudo_debug.c:700:5: [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 static_buf[1024], *buf = static_buf; data/sudo-1.9.3p1/lib/util/sudo_debug.c:792:5: [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 *cp, static_buf[4096], *buf = static_buf; data/sudo-1.9.3p1/lib/util/sudo_debug.c:851:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, EXEC_PREFIX, sizeof(EXEC_PREFIX) - 1); data/sudo-1.9.3p1/lib/util/sudo_debug.c:853:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cp, path, plen); data/sudo-1.9.3p1/lib/util/sudo_debug.c:862:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cp, *av, avlen); data/sudo-1.9.3p1/lib/util/sudo_debug.c:874:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cp, *av, avlen); data/sudo-1.9.3p1/lib/util/ttyname_dev.c:120:5: [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 pathbuf[PATH_MAX]; data/sudo-1.9.3p1/lib/util/ttyname_dev.c:157:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pathbuf, dir, sdlen); data/sudo-1.9.3p1/lib/util/ttyname_dev.c:260:5: [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 path[PATH_MAX], *ret; data/sudo-1.9.3p1/lib/util/ttyname_dev.c:286:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(path, cp, len); data/sudo-1.9.3p1/lib/util/unlinkat.c:41:17: [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 ((odfd = open(".", O_RDONLY)) == -1) data/sudo-1.9.3p1/lib/util/uuid.c:44:14: [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. unsigned char node[6]; data/sudo-1.9.3p1/lib/util/uuid.c:51:30: [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. sudo_uuid_create_v1(unsigned char uuid_out[16]) data/sudo-1.9.3p1/lib/util/uuid.c:55:11: [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. unsigned char u8[16]; data/sudo-1.9.3p1/lib/util/uuid.c:79:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(uuid_out, &uuid, 16); data/sudo-1.9.3p1/lib/util/uuid.c:85:1: [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 * data/sudo-1.9.3p1/lib/util/uuid.c:86:33: [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. sudo_uuid_to_string_v1(unsigned char uuid[16], char *dst, size_t dstsiz) data/sudo-1.9.3p1/lib/util/vsyslog.c:40:5: [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 *cp, *ep, msgbuf[8192], new_fmt[2048]; data/sudo-1.9.3p1/lib/zlib/crc32.c:143:15: [2] (misc) fopen: 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). out = fopen("crc32.h", "w"); data/sudo-1.9.3p1/lib/zlib/gzguts.h:47:11: [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). # define open _open data/sudo-1.9.3p1/lib/zlib/gzlib.c:36:12: [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. static char buf[1024]; data/sudo-1.9.3p1/lib/zlib/gzlib.c:65:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "unknown win32 error (%ld)", error); data/sudo-1.9.3p1/lib/zlib/gzlib.c:245:9: [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). open((const char *)path, oflag, 0666)); data/sudo-1.9.3p1/lib/zlib/gzlib.c:298:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(path, "<fd:%d>", fd); /* for debugging */ data/sudo-1.9.3p1/lib/zlib/gzlib.c:615:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(state->msg, ": "); data/sudo-1.9.3p1/lib/zlib/gzread.c:161:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(state->x.next, strm->next_in, strm->avail_in); data/sudo-1.9.3p1/lib/zlib/gzread.c:325:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, state->x.next, n); data/sudo-1.9.3p1/lib/zlib/gzread.c:451:14: [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. unsigned char buf[1]; data/sudo-1.9.3p1/lib/zlib/gzread.c:591:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, state->x.next, n); data/sudo-1.9.3p1/lib/zlib/gzwrite.c:213:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(state->in + have, buf, copy); data/sudo-1.9.3p1/lib/zlib/gzwrite.c:309:14: [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. unsigned char buf[1]; data/sudo-1.9.3p1/lib/zlib/gzwrite.c:444:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(state->in, state->in + state->size, left); data/sudo-1.9.3p1/lib/zlib/gzwrite.c:543:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(state->in, state->in + state->size, left); data/sudo-1.9.3p1/lib/zlib/inflate.c:640:14: [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. unsigned char hbuf[4]; /* buffer for gzip header crc calculation */ data/sudo-1.9.3p1/lib/zlib/inflate.c:1427:14: [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. unsigned char buf[4]; /* to restore bit buffer to byte string */ data/sudo-1.9.3p1/lib/zlib/trees.c:328:20: [2] (misc) fopen: 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). FILE *header = fopen("trees.h", "w"); data/sudo-1.9.3p1/lib/zlib/zutil.c:13:9: [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. z_const char * const z_errmsg[10] = { data/sudo-1.9.3p1/lib/zlib/zutil.h:49:16: [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. extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ data/sudo-1.9.3p1/lib/zlib/zutil.h:109:6: [2] (misc) fopen: 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). fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") data/sudo-1.9.3p1/lib/zlib/zutil.h:202:30: [2] (misc) fopen: 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). # define F_OPEN(name, mode) fopen((name), (mode)) data/sudo-1.9.3p1/lib/zlib/zutil.h:226:21: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define zmemcpy memcpy data/sudo-1.9.3p1/logsrvd/eventlog.c:87:5: [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 sessid[7]; data/sudo-1.9.3p1/logsrvd/eventlog.c:249:5: [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 timebuf[1024]; data/sudo-1.9.3p1/logsrvd/eventlog.c:559:5: [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 *logline, timebuf[8192], *timestr = NULL; data/sudo-1.9.3p1/logsrvd/iolog_writer.c:600:5: [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 expanded_dir[PATH_MAX], expanded_file[PATH_MAX], pathbuf[PATH_MAX]; data/sudo-1.9.3p1/logsrvd/iolog_writer.c:766:5: [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 buf[64 * 1024]; data/sudo-1.9.3p1/logsrvd/iolog_writer.c:799:5: [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 tmpdir[PATH_MAX]; data/sudo-1.9.3p1/logsrvd/iolog_writer.c:888: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 from[PATH_MAX], to[PATH_MAX]; data/sudo-1.9.3p1/logsrvd/iolog_writer.c:1036:5: [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 tbuf[1024]; data/sudo-1.9.3p1/logsrvd/iolog_writer.c:1084:5: [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 tbuf[1024]; data/sudo-1.9.3p1/logsrvd/iolog_writer.c:1117:5: [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 tbuf[1024]; data/sudo-1.9.3p1/logsrvd/logsrv_util.c:67:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(newdata, buf->data + buf->off, buf->len - buf->off); data/sudo-1.9.3p1/logsrvd/logsrvd.c:171:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf->data, &msg_len, sizeof(msg_len)); data/sudo-1.9.3p1/logsrvd/logsrvd.c:1278:17: [2] (misc) fopen: 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). dhparam_file = fopen(tls_config->dhparams_path, "r"); data/sudo-1.9.3p1/logsrvd/logsrvd.c:1777:7: [2] (misc) fopen: 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). fp = fopen(logsrvd_conf_pid_file(), "w"); data/sudo-1.9.3p1/logsrvd/logsrvd.c:1820: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 ((fd = open(_PATH_DEVNULL, O_RDWR)) != -1) { data/sudo-1.9.3p1/logsrvd/logsrvd.h:68:5: [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 sessid[7]; data/sudo-1.9.3p1/logsrvd/logsrvd.h:112:5: [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 ipaddr[INET6_ADDRSTRLEN]; data/sudo-1.9.3p1/logsrvd/logsrvd.h:114:5: [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 ipaddr[INET_ADDRSTRLEN]; data/sudo-1.9.3p1/logsrvd/logsrvd_conf.c:420:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&addr->sa_un, res->ai_addr, res->ai_addrlen); data/sudo-1.9.3p1/logsrvd/logsrvd_conf.c:905:10: [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). fd = open(config->logfile.path, flags, S_IRUSR|S_IWUSR); data/sudo-1.9.3p1/logsrvd/logsrvd_conf.c:1146:15: [2] (misc) fopen: 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 ((fp = fopen(path, "r")) == NULL) { data/sudo-1.9.3p1/logsrvd/sendlog.c:84:8: [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. static char server_ip[INET6_ADDRSTRLEN]; data/sudo-1.9.3p1/logsrvd/sendlog.c:86:8: [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. static char server_ip[INET_ADDRSTRLEN]; data/sudo-1.9.3p1/logsrvd/sendlog.c:280:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf->data, &msg_len, sizeof(msg_len)); data/sudo-1.9.3p1/logsrvd/sendlog.c:1788:25: [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 ((iolog_dir_fd = open(iolog_dir, O_RDONLY)) == -1) { data/sudo-1.9.3p1/plugins/audit_json/audit_json.c:60:5: [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 uuid_str[37]; data/sudo-1.9.3p1/plugins/audit_json/audit_json.c:92:14: [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. unsigned char uuid[16]; data/sudo-1.9.3p1/plugins/audit_json/audit_json.c:158:10: [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). fd = open(state.logfile, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR); data/sudo-1.9.3p1/plugins/audit_json/audit_json.c:196:5: [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 name[256]; data/sudo-1.9.3p1/plugins/audit_json/audit_json.c:214:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(name, str, len); data/sudo-1.9.3p1/plugins/audit_json/audit_json.c:330:5: [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 timebuf[1024]; data/sudo-1.9.3p1/plugins/audit_json/audit_json.c:450:6: [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 signame[SIG2STR_MAX]; data/sudo-1.9.3p1/plugins/group_file/getgrent.c:66:8: [2] (misc) fopen: 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). grf = fopen(grfile, "r"); data/sudo-1.9.3p1/plugins/group_file/getgrent.c:89:12: [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. static char grbuf[LINE_MAX], *gr_mem[GRMEM_MAX+1]; data/sudo-1.9.3p1/plugins/group_file/getgrent.c:140:13: [2] (misc) fopen: 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 ((grf = fopen(grfile, "r")) == NULL) data/sudo-1.9.3p1/plugins/group_file/getgrent.c:163:13: [2] (misc) fopen: 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 ((grf = fopen(grfile, "r")) == NULL) data/sudo-1.9.3p1/plugins/group_file/plugin_test.c:79:5: [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 *args, path[PATH_MAX], savedch; data/sudo-1.9.3p1/plugins/python/pyhelpers.c:40:10: [2] (misc) fopen: 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). ttyfp = fopen(_PATH_TTY, "w"); data/sudo-1.9.3p1/plugins/python/python_plugin_audit.c:54:74: [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 (!PyObject_HasAttrString(plugin_ctx->py_instance, CALLBACK_PYNAME(open))) { data/sudo-1.9.3p1/plugins/python/python_plugin_audit.c:62:68: [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). rc = python_plugin_api_rc_call(plugin_ctx, CALLBACK_PYNAME(open), data/sudo-1.9.3p1/plugins/python/python_plugin_common.c:99:5: [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 path_copy[PATH_MAX]; data/sudo-1.9.3p1/plugins/python/python_plugin_common.c:159:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(python_inittab_copy, PyImport_Inittab, python_inittab_copy_len * sizeof(struct _inittab)); data/sudo-1.9.3p1/plugins/python/python_plugin_common.c:169:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(PyImport_Inittab, python_inittab_copy, python_inittab_copy_len * sizeof(struct _inittab)); data/sudo-1.9.3p1/plugins/python/python_plugin_io.c:55:74: [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 (!PyObject_HasAttrString(plugin_ctx->py_instance, CALLBACK_PYNAME(open))) { data/sudo-1.9.3p1/plugins/python/python_plugin_io.c:64:68: [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). rc = python_plugin_api_rc_call(plugin_ctx, CALLBACK_PYNAME(open), data/sudo-1.9.3p1/plugins/python/python_plugin_policy.c:279:20: [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). CALLBACK_CFUNC(open), data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:33:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(variable_name, &(variable_name ## _original), sizeof(variable_name ## _original)) data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:36:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&(variable_name ## _original), variable_name, sizeof(variable_name ## _original)) data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:54:5: [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 opt_module_path[PATH_MAX + 256]; data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:55:5: [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 opt_classname[PATH_MAX + 256]; data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:70:5: [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 opt_logpath[PATH_MAX + 16]; data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:90:5: [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 opt_logpath[PATH_MAX + 16]; data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:168:27: [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). VERIFY_INT(python_io->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:203:27: [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). VERIFY_INT(python_io->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:262:27: [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). VERIFY_INT(python_io->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:283:28: [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). VERIFY_INT(python_io2->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:346:27: [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). VERIFY_INT(python_io->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:367:27: [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). VERIFY_INT(python_io->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:391:27: [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). VERIFY_INT(python_io->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:408:27: [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). VERIFY_INT(python_io->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:470:12: [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. static char config_path[PATH_MAX] = "/"; data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:546:27: [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). VERIFY_INT(python_io->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:566:27: [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). VERIFY_INT(python_io->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:594:27: [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). VERIFY_INT(python_io->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:656:27: [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). VERIFY_INT(python_io->open(SUDO_API_VERSION, conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:682:27: [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). VERIFY_INT(python_io->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:701:31: [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). VERIFY_INT(python_policy->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:737:31: [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). VERIFY_INT(python_policy->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:786:31: [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). VERIFY_INT(python_policy->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:824:31: [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). VERIFY_INT(python_policy->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:855:31: [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). VERIFY_INT(python_policy->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:918:31: [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). VERIFY_INT(python_policy->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:944:31: [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). VERIFY_INT(python_policy->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:975:31: [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). VERIFY_INT(python_policy->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:994:31: [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). VERIFY_INT(python_policy->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:1033:27: [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). VERIFY_INT(python_io->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:1062:27: [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). VERIFY_INT(python_io->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:1068:31: [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). VERIFY_INT(python_policy->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:1095:30: [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). VERIFY_INT(python_audit->open(SUDO_API_VERSION, fake_conversation, fake_printf, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:1131:30: [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). VERIFY_INT(python_audit->open(SUDO_API_VERSION, fake_conversation, fake_printf, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:1158:30: [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). VERIFY_INT(python_audit->open(SUDO_API_VERSION, fake_conversation, fake_printf, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:1209:30: [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). VERIFY_INT(python_audit->open(SUDO_API_VERSION, fake_conversation, fake_printf, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:1219:31: [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). VERIFY_INT(python_audit2->open(SUDO_API_VERSION, fake_conversation, fake_printf, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:1261:30: [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). VERIFY_INT(python_audit->open(SUDO_API_VERSION, fake_conversation, fake_printf, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:1284:30: [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). VERIFY_INT(python_audit->open(SUDO_API_VERSION, fake_conversation, fake_printf, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:1308:30: [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). VERIFY_INT(python_audit->open(SUDO_API_VERSION, fake_conversation, fake_printf, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:1319:30: [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). VERIFY_INT(python_audit->open(SUDO_API_VERSION, fake_conversation, fake_printf, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:1356:33: [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). VERIFY_INT(python_approval->open(SUDO_API_VERSION, fake_conversation, fake_printf, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:1414:33: [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). VERIFY_INT(python_approval->open(SUDO_API_VERSION, fake_conversation, fake_printf, data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:1424:34: [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). VERIFY_INT(python_approval2->open(SUDO_API_VERSION, fake_conversation, fake_printf, data/sudo-1.9.3p1/plugins/python/regress/iohelpers.c:48:18: [2] (misc) fopen: 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). FILE *file = fopen(file_path, "w+"); data/sudo-1.9.3p1/plugins/python/regress/iohelpers.c:70:18: [2] (misc) fopen: 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). FILE *file = fopen(file_path, "rb"); data/sudo-1.9.3p1/plugins/python/regress/testhelpers.c:46:12: [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. static char expected_output_file[PATH_MAX]; data/sudo-1.9.3p1/plugins/python/regress/testhelpers.c:93:9: [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 expected_output[MAX_OUTPUT] = ""; data/sudo-1.9.3p1/plugins/python/regress/testhelpers.c:107:5: [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 actual_path[PATH_MAX]; data/sudo-1.9.3p1/plugins/python/regress/testhelpers.c:110:5: [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 actual_str[MAX_OUTPUT]; data/sudo-1.9.3p1/plugins/python/regress/testhelpers.c:181:5: [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 stored_path[PATH_MAX]; data/sudo-1.9.3p1/plugins/python/regress/testhelpers.c:184:18: [2] (misc) fopen: 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). FILE *file = fopen(stored_path, "rb"); data/sudo-1.9.3p1/plugins/python/regress/testhelpers.c:190:5: [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 line[1024] = ""; data/sudo-1.9.3p1/plugins/python/regress/testhelpers.c:191:5: [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 stored_str[MAX_OUTPUT] = ""; data/sudo-1.9.3p1/plugins/python/regress/testhelpers.c:241:9: [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 actual_set_str[MAX_OUTPUT] = ""; data/sudo-1.9.3p1/plugins/python/regress/testhelpers.c:242:9: [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 expected_set_str[MAX_OUTPUT] = ""; data/sudo-1.9.3p1/plugins/python/regress/testhelpers.h:42:5: [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 stdout_str[MAX_OUTPUT]; data/sudo-1.9.3p1/plugins/python/regress/testhelpers.h:43:5: [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 stderr_str[MAX_OUTPUT]; data/sudo-1.9.3p1/plugins/python/regress/testhelpers.h:45:5: [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 conv_str[MAX_OUTPUT]; data/sudo-1.9.3p1/plugins/python/regress/testhelpers.h:46:11: [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. const char *conv_replies[8]; data/sudo-1.9.3p1/plugins/python/regress/testhelpers.h:122:3: [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 errbuf[1024]; \ data/sudo-1.9.3p1/plugins/sample/sample_plugin.c:146:5: [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 pathbuf[PATH_MAX], *qualified = NULL; data/sudo-1.9.3p1/plugins/sample/sample_plugin.c:394:5: [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 path[PATH_MAX]; data/sudo-1.9.3p1/plugins/sample/sample_plugin.c:404:10: [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). fd = open(path, O_WRONLY|O_CREAT|O_EXCL, 0644); data/sudo-1.9.3p1/plugins/sample/sample_plugin.c:411:10: [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). fd = open(path, O_WRONLY|O_CREAT|O_EXCL, 0644); data/sudo-1.9.3p1/plugins/sudoers/alias.c:119:12: [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. static char errbuf[512]; data/sudo-1.9.3p1/plugins/sudoers/auth/aix_auth.c:68:15: [2] (misc) fopen: 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 ((fp = fopen("/etc/security/login.cfg", "r")) == NULL) data/sudo-1.9.3p1/plugins/sudoers/auth/dce.c:183:14: [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. unsigned char error_string[dce_c_error_string_len]; data/sudo-1.9.3p1/plugins/sudoers/auth/fwtk.c:50:5: [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 resp[128]; /* Response from the server */ data/sudo-1.9.3p1/plugins/sudoers/auth/fwtk.c:80:5: [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 buf[SUDO_CONV_REPL_MAX + 12]; /* General prupose buffer */ data/sudo-1.9.3p1/plugins/sudoers/auth/fwtk.c:81:5: [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 resp[128]; /* Response from the server */ data/sudo-1.9.3p1/plugins/sudoers/auth/kerb5.c:135:5: [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 cache_name[64], *pname = pw->pw_name; data/sudo-1.9.3p1/plugins/sudoers/auth/pam.c:180:12: [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. static char errbuf[32]; data/sudo-1.9.3p1/plugins/sudoers/auth/rfc1938.c:62:5: [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 challenge[256]; data/sudo-1.9.3p1/plugins/sudoers/base64.c:33:23: [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. static const unsigned char base64dec_tab[256]= { data/sudo-1.9.3p1/plugins/sudoers/base64.c:85:23: [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. static const unsigned char base64enc_tab[64] = data/sudo-1.9.3p1/plugins/sudoers/boottime.c:65:10: [2] (misc) fopen: 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). fp = fopen("/proc/stat", "r"); data/sudo-1.9.3p1/plugins/sudoers/check.c:235:5: [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 buf[BUFSIZ]; data/sudo-1.9.3p1/plugins/sudoers/check.c:248:35: [2] (misc) fopen: 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 (def_lecture_file && (fp = fopen(def_lecture_file, "r")) != NULL) { data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers.c:449:15: [2] (misc) fopen: 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 ((fp = fopen(conf_file, "r")) == NULL) data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers.c:616:12: [2] (misc) fopen: 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 ((fp = fopen(input_file, "r")) == NULL) data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers.c:633:29: [2] (misc) fopen: 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). } else if ((sudoersin = fopen(input_file, "r")) == NULL) data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers.c:657:12: [2] (misc) fopen: 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). return fopen(sudoers, "r"); data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers.c:1243:19: [2] (misc) fopen: 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 ((output_fp = fopen(output_file, "w")) == NULL) data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_json.c:601:5: [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 timebuf[sizeof("20120727121554Z")]; data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_json.c:871:19: [2] (misc) fopen: 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 ((output_fp = fopen(output_file, "w")) == NULL) data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_ldif.c:324:5: [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 timebuf[sizeof("20120727121554Z")]; data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_ldif.c:638:3: [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 numbuf[(((sizeof(conf->sudo_order) * 8) + 2) / 3) + 2]; data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_ldif.c:687:19: [2] (misc) fopen: 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 ((output_fp = fopen(output_file, "w")) == NULL) data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_pwutil.c:69:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cp, (src)->name, size); \ data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_pwutil.c:85:5: [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 *cp, uidstr[MAX_UID_T_LEN + 2]; data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_pwutil.c:160:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(newpw, &pw, sizeof(pw)); data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_pwutil.c:173:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cp, name, strlen(name) + 1); data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_pwutil.c:194:5: [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 *cp, gidstr[MAX_UID_T_LEN + 2]; data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_pwutil.c:263:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(newgr, &gr, sizeof(gr)); data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_pwutil.c:271:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cp, s->str, len); data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_pwutil.c:282:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cp, name, strlen(name) + 1); data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_pwutil.c:375:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cp, pw->pw_name, nsize); data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_pwutil.c:452:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cp, pw->pw_name, nsize); data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_pwutil.c:477:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cp, s->str, len); data/sudo-1.9.3p1/plugins/sudoers/editor.c:130:5: [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 *ev[3], *editor_path = NULL; data/sudo-1.9.3p1/plugins/sudoers/env.c:108:14: [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). void * (*open)(const char *); data/sudo-1.9.3p1/plugins/sudoers/env.c:268:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(env.envp, envp, len * sizeof(char *)); data/sudo-1.9.3p1/plugins/sudoers/env.c:883:5: [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 idbuf[MAX_UID_T_LEN + 1]; data/sudo-1.9.3p1/plugins/sudoers/env.c:1173:5: [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 *eq, errbuf[4096]; data/sudo-1.9.3p1/plugins/sudoers/env.c:1222:17: [2] (misc) fopen: 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 ((efl->fp = fopen(path, "r")) == NULL) { data/sudo-1.9.3p1/plugins/sudoers/env.c:1308:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ret, var, var_len + 1); /* includes '=' */ data/sudo-1.9.3p1/plugins/sudoers/env.c:1309:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ret + var_len + 1, val, val_len + 1); /* includes NUL */ data/sudo-1.9.3p1/plugins/sudoers/env.c:1359:18: [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). cookie = ef->open(path); data/sudo-1.9.3p1/plugins/sudoers/filedigest.c:40:14: [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. unsigned char buf[32 * 1024]; data/sudo-1.9.3p1/plugins/sudoers/find_path.c:98:5: [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 command[PATH_MAX]; data/sudo-1.9.3p1/plugins/sudoers/fmtsudoers.c:236: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 numbuf[(((sizeof(int) * 8) + 2) / 3) + 2]; data/sudo-1.9.3p1/plugins/sudoers/fmtsudoers.c:241: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 buf[sizeof("CCYYMMDDHHMMSSZ")]; data/sudo-1.9.3p1/plugins/sudoers/fmtsudoers.c:247: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 buf[sizeof("CCYYMMDDHHMMSSZ")]; data/sudo-1.9.3p1/plugins/sudoers/gentime.c:50:5: [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 tcopy[sizeof("yyyymmddHHMMSS.F")]; data/sudo-1.9.3p1/plugins/sudoers/gentime.c:66:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tcopy, timestr, len); data/sudo-1.9.3p1/plugins/sudoers/getdate.c:828:5: [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 buff[20]; data/sudo-1.9.3p1/plugins/sudoers/getdate.c:990:5: [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 buff[128]; data/sudo-1.9.3p1/plugins/sudoers/goodpath.c:48: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 pathbuf[PATH_MAX]; data/sudo-1.9.3p1/plugins/sudoers/gram.c:1205:3: [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 const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; data/sudo-1.9.3p1/plugins/sudoers/gram.c:1394:3: [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 yymsgbuf[128]; data/sudo-1.9.3p1/plugins/sudoers/gram.c:3138:3: [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 tildes[128]; data/sudo-1.9.3p1/plugins/sudoers/group_plugin.c:52:5: [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 *args, path[PATH_MAX]; data/sudo-1.9.3p1/plugins/sudoers/hexchar.c:35:14: [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. unsigned char result[2]; data/sudo-1.9.3p1/plugins/sudoers/iolog.c:56:11: [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). int (*open)(struct timespec *now); data/sudo-1.9.3p1/plugins/sudoers/iolog.c:210:5: [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 idbuf[MAX_UID_T_LEN + 2]; data/sudo-1.9.3p1/plugins/sudoers/iolog.c:561:5: [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 iolog_path[PATH_MAX], sessid[7]; data/sudo-1.9.3p1/plugins/sudoers/iolog.c:729:30: [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 ((ret = io_operations.open(&last_time)) != true) data/sudo-1.9.3p1/plugins/sudoers/iolog.c:849:5: [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 tbuf[1024]; data/sudo-1.9.3p1/plugins/sudoers/iolog.c:1023:5: [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 tbuf[1024]; data/sudo-1.9.3p1/plugins/sudoers/iolog.c:1122:5: [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 tbuf[1024]; data/sudo-1.9.3p1/plugins/sudoers/iolog.c:1173:5: [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 signame[SIG2STR_MAX]; data/sudo-1.9.3p1/plugins/sudoers/iolog_client.c:704:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf->data, &msg_len, sizeof(msg_len)); data/sudo-1.9.3p1/plugins/sudoers/iolog_client.c:969:5: [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 signame[SIG2STR_MAX]; data/sudo-1.9.3p1/plugins/sudoers/iolog_client.c:1425:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(newdata, buf->data + buf->off, buf->len - buf->off); data/sudo-1.9.3p1/plugins/sudoers/iolog_path_escapes.c:44:12: [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. static char sessid[7]; data/sudo-1.9.3p1/plugins/sudoers/iolog_plugin.h:101:5: [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 server_ip[INET6_ADDRSTRLEN]; data/sudo-1.9.3p1/plugins/sudoers/iolog_plugin.h:103:5: [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 server_ip[INET_ADDRSTRLEN]; data/sudo-1.9.3p1/plugins/sudoers/ldap.c:495:5: [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 timebuffer[sizeof("20120727121554.0Z")]; data/sudo-1.9.3p1/plugins/sudoers/ldap.c:925:5: [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 *buf, timebuffer[TIMEFILTER_LENGTH + 1], idbuf[MAX_UID_T_LEN + 1]; data/sudo-1.9.3p1/plugins/sudoers/ldap.c:1104:5: [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 *filt, timebuffer[TIMEFILTER_LENGTH + 1]; data/sudo-1.9.3p1/plugins/sudoers/ldap.c:1335:12: [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. static char new_ccname[sizeof(_PATH_TMP) + sizeof("sudocc_XXXXXXXX") - 1]; data/sudo-1.9.3p1/plugins/sudoers/ldap.c:1336:5: [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 buf[10240], *ret = NULL; data/sudo-1.9.3p1/plugins/sudoers/ldap.c:1344:8: [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). ofd = open(old_ccname, O_RDONLY|O_NONBLOCK); data/sudo-1.9.3p1/plugins/sudoers/ldap.c:1353:9: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). nfd = mkstemp(new_ccname); data/sudo-1.9.3p1/plugins/sudoers/ldap_conf.c:192:5: [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 *host, *last, *port, defport[13]; data/sudo-1.9.3p1/plugins/sudoers/ldap_conf.c:193:5: [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 hostbuf[LINE_MAX * 2]; data/sudo-1.9.3p1/plugins/sudoers/ldap_conf.c:238:5: [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 *buf, hostbuf[LINE_MAX]; data/sudo-1.9.3p1/plugins/sudoers/ldap_conf.c:360:15: [2] (misc) fopen: 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 ((fp = fopen(path_ldap_secret, "r")) != NULL) { data/sudo-1.9.3p1/plugins/sudoers/ldap_conf.c:459:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(str->val, value, len + 1); data/sudo-1.9.3p1/plugins/sudoers/ldap_conf.c:513:10: [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). fd = open(ccname_path, O_RDONLY|O_NONBLOCK, 0); data/sudo-1.9.3p1/plugins/sudoers/ldap_conf.c:557:15: [2] (misc) fopen: 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 ((fp = fopen(path_ldap_conf, "r")) == NULL) data/sudo-1.9.3p1/plugins/sudoers/ldap_conf.c:764:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ldap_conf.search_filter + 1, cp, len); data/sudo-1.9.3p1/plugins/sudoers/logging.c:161:10: [2] (misc) fopen: 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). fp = fopen(def_logfile, "a"); data/sudo-1.9.3p1/plugins/sudoers/logging.c:698:5: [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 *last, *p, *argv[MAX_MAILFLAGS + 1]; data/sudo-1.9.3p1/plugins/sudoers/logging.c:831:10: [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). fd = open(_PATH_DEVNULL, O_RDWR, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); data/sudo-1.9.3p1/plugins/sudoers/logging.c:957:5: [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 sessid[7]; data/sudo-1.9.3p1/plugins/sudoers/match_command.c:89:5: [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 pathbuf[PATH_MAX]; data/sudo-1.9.3p1/plugins/sudoers/match_command.c:115:5: [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 magic[2]; data/sudo-1.9.3p1/plugins/sudoers/match_command.c:138:5: [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 pathbuf[PATH_MAX]; data/sudo-1.9.3p1/plugins/sudoers/match_command.c:156:10: [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). fd = open(path, O_RDONLY|O_NONBLOCK); data/sudo-1.9.3p1/plugins/sudoers/match_command.c:161: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 ((fd = open(path, O_EXEC)) == -1) data/sudo-1.9.3p1/plugins/sudoers/match_command.c:187:6: [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 fdpath[PATH_MAX]; data/sudo-1.9.3p1/plugins/sudoers/match_command.c:220:5: [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 buf[PATH_MAX], sdbuf[PATH_MAX]; data/sudo-1.9.3p1/plugins/sudoers/match_command.c:377:5: [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 pathbuf[PATH_MAX]; data/sudo-1.9.3p1/plugins/sudoers/parse.c:586:7: [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 numbuf[(((sizeof(int) * 8) + 2) / 3) + 2]; data/sudo-1.9.3p1/plugins/sudoers/parse.c:591:7: [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 buf[sizeof("CCYYMMDDHHMMSSZ")]; data/sudo-1.9.3p1/plugins/sudoers/parse.c:597:7: [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 buf[sizeof("CCYYMMDDHHMMSSZ")]; data/sudo-1.9.3p1/plugins/sudoers/parse_ldif.c:160:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(attr, copy, len); data/sudo-1.9.3p1/plugins/sudoers/parse_ldif.c:651:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tmp + savedlen, line, len + 1); data/sudo-1.9.3p1/plugins/sudoers/policy.c:698:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(gid_list, "runas_groups=", sizeof("runas_groups=") - 1); data/sudo-1.9.3p1/plugins/sudoers/prompt.c:153:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new_prompt, old_prompt, len); /* len includes NUL */ data/sudo-1.9.3p1/plugins/sudoers/pwutil.c:295:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(item->k.name, name, len); data/sudo-1.9.3p1/plugins/sudoers/pwutil.c:377:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pw->pw_name, user, name_len + 1); data/sudo-1.9.3p1/plugins/sudoers/pwutil.c:379:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pw->pw_passwd, "*", 2); data/sudo-1.9.3p1/plugins/sudoers/pwutil.c:383:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pw->pw_dir, home, home_len + 1); data/sudo-1.9.3p1/plugins/sudoers/pwutil.c:385:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pw->pw_shell, shell, shell_len + 1); data/sudo-1.9.3p1/plugins/sudoers/pwutil.c:605:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(item->k.name, name, len); data/sudo-1.9.3p1/plugins/sudoers/pwutil.c:671:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(gr->gr_name, group, name_len + 1); data/sudo-1.9.3p1/plugins/sudoers/pwutil.h:30:5: [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 registry[16]; /* AIX-specific, empty otherwise */ data/sudo-1.9.3p1/plugins/sudoers/pwutil_impl.c:65:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cp, src->name, size); \ data/sudo-1.9.3p1/plugins/sudoers/pwutil_impl.c:129:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(newpw, pw, sizeof(*pw)); data/sudo-1.9.3p1/plugins/sudoers/pwutil_impl.c:139:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cp, pw_shell, ssize); data/sudo-1.9.3p1/plugins/sudoers/pwutil_impl.c:145:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cp, name, strlen(name) + 1); data/sudo-1.9.3p1/plugins/sudoers/pwutil_impl.c:204:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(newgr, gr, sizeof(*gr)); data/sudo-1.9.3p1/plugins/sudoers/pwutil_impl.c:211:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cp, gr->gr_mem[nmem], len); data/sudo-1.9.3p1/plugins/sudoers/pwutil_impl.c:222:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cp, name, strlen(name) + 1); data/sudo-1.9.3p1/plugins/sudoers/pwutil_impl.c:305:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cp, pw->pw_name, nsize); data/sudo-1.9.3p1/plugins/sudoers/pwutil_impl.c:377:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cp, pw->pw_name, nsize); data/sudo-1.9.3p1/plugins/sudoers/pwutil_impl.c:400:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cp, grp->gr_name, len); data/sudo-1.9.3p1/plugins/sudoers/rcstr.c:35:5: [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 str[1]; /* actually bigger */ data/sudo-1.9.3p1/plugins/sudoers/rcstr.c:50:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, src, len); data/sudo-1.9.3p1/plugins/sudoers/regress/check_symbols/check_symbols.c:47:5: [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 *cp, line[LINE_MAX]; data/sudo-1.9.3p1/plugins/sudoers/regress/check_symbols/check_symbols.c:65:10: [2] (misc) fopen: 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). fp = fopen(symbols_file, "r"); data/sudo-1.9.3p1/plugins/sudoers/regress/env_match/check_env_pattern.c:33:5: [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 pattern[1024], string[1024]; data/sudo-1.9.3p1/plugins/sudoers/regress/env_match/check_env_pattern.c:39:12: [2] (misc) fopen: 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 ((fp = fopen(argv[1], "r")) == NULL) { data/sudo-1.9.3p1/plugins/sudoers/regress/iolog_plugin/check_iolog_plugin.c:160:5: [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 buf[LINE_MAX]; data/sudo-1.9.3p1/plugins/sudoers/regress/iolog_plugin/check_iolog_plugin.c:212:5: [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 buf[1024], iolog_path[PATH_MAX]; data/sudo-1.9.3p1/plugins/sudoers/regress/iolog_plugin/check_iolog_plugin.c:213:5: [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 runas_gid[64], runas_uid[64]; data/sudo-1.9.3p1/plugins/sudoers/regress/iolog_plugin/check_iolog_plugin.c:257:21: [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). rc = sudoers_io.open(SUDO_API_VERSION, NULL, sudo_printf_int, settings, data/sudo-1.9.3p1/plugins/sudoers/regress/iolog_plugin/check_iolog_plugin.c:309:15: [2] (misc) fopen: 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 ((fp = fopen(iolog_path, "r")) == NULL) { data/sudo-1.9.3p1/plugins/sudoers/regress/iolog_plugin/check_iolog_plugin.c:337:15: [2] (misc) fopen: 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 ((fp = fopen(iolog_path, "r")) == NULL) { data/sudo-1.9.3p1/plugins/sudoers/regress/logging/check_wrap.c:49:5: [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 *line, lines[2][2048]; data/sudo-1.9.3p1/plugins/sudoers/regress/logging/check_wrap.c:58:10: [2] (misc) fopen: 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). fp = fopen(argv[1], "r"); data/sudo-1.9.3p1/plugins/sudoers/regress/parser/check_addr.c:79:5: [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 *cp, line[2048]; data/sudo-1.9.3p1/plugins/sudoers/regress/parser/check_addr.c:88:10: [2] (misc) fopen: 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). fp = fopen(argv[1], "r"); data/sudo-1.9.3p1/plugins/sudoers/regress/parser/check_base64.c:73:14: [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. unsigned char buf[64]; data/sudo-1.9.3p1/plugins/sudoers/regress/parser/check_base64.c:95:32: [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. len = base64_encode((unsigned char *)test_strings[i].ascii, data/sudo-1.9.3p1/plugins/sudoers/regress/parser/check_digest.c:36:14: [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. static const char *test_strings[NUM_TESTS] = { data/sudo-1.9.3p1/plugins/sudoers/regress/parser/check_digest.c:56:11: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). tfd = mkstemp(tfile); data/sudo-1.9.3p1/plugins/sudoers/regress/parser/check_digest.c:85:5: [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 buf[1000 * 1000]; data/sudo-1.9.3p1/plugins/sudoers/regress/parser/check_hexchar.c:35:5: [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 hex[3]; data/sudo-1.9.3p1/plugins/sudoers/regress/starttime/check_starttime.c:40:5: [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 buf[1024]; data/sudo-1.9.3p1/plugins/sudoers/regress/starttime/check_starttime.c:46:10: [2] (misc) fopen: 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). fp = fopen("/proc/stat", "r"); data/sudo-1.9.3p1/plugins/sudoers/set_perms.c:109:5: [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 errbuf[1024]; data/sudo-1.9.3p1/plugins/sudoers/set_perms.c:436:5: [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 errbuf[1024]; data/sudo-1.9.3p1/plugins/sudoers/set_perms.c:839:5: [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 errbuf[1024]; data/sudo-1.9.3p1/plugins/sudoers/set_perms.c:1145:5: [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 errbuf[1024]; data/sudo-1.9.3p1/plugins/sudoers/set_perms.c:1439:5: [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 errbuf[1024]; data/sudo-1.9.3p1/plugins/sudoers/solaris_audit.c:43:8: [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. static char cwd[PATH_MAX]; data/sudo-1.9.3p1/plugins/sudoers/solaris_audit.c:44:8: [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. static char cmdpath[PATH_MAX]; data/sudo-1.9.3p1/plugins/sudoers/sssd.c:105:10: [2] (misc) fopen: 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). fp = fopen(_PATH_SSSD_CONF, "r"); data/sudo-1.9.3p1/plugins/sudoers/starttime.c:140:5: [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 path[PATH_MAX]; data/sudo-1.9.3p1/plugins/sudoers/starttime.c:147: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 ((fd = open(path, O_RDONLY, 0)) != -1) { data/sudo-1.9.3p1/plugins/sudoers/starttime.c:170:5: [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 path[PATH_MAX]; data/sudo-1.9.3p1/plugins/sudoers/starttime.c:171:5: [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 *cp, buf[1024]; data/sudo-1.9.3p1/plugins/sudoers/starttime.c:191: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 ((fd = open(path, O_RDONLY | O_NOFOLLOW)) != -1) { data/sudo-1.9.3p1/plugins/sudoers/sudo_ldap_conf.h:80:5: [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 val[1]; data/sudo-1.9.3p1/plugins/sudoers/sudo_nss.c:74:15: [2] (misc) fopen: 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 ((fp = fopen(_PATH_NSSWITCH_CONF, "r")) == NULL) data/sudo-1.9.3p1/plugins/sudoers/sudo_nss.c:154:15: [2] (misc) fopen: 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 ((fp = fopen(_PATH_NETSVC_CONF, "r")) == NULL) data/sudo-1.9.3p1/plugins/sudoers/sudo_nss.h:30:11: [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). int (*open)(struct sudo_nss *nss); data/sudo-1.9.3p1/plugins/sudoers/sudo_printf.c:45:10: [2] (misc) fopen: 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). ttyfp = fopen(_PATH_TTY, "w"); data/sudo-1.9.3p1/plugins/sudoers/sudoers.c:209:11: [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 (nss->open(nss) == -1 || (nss->parse_tree = nss->parse(nss)) == NULL) { data/sudo-1.9.3p1/plugins/sudoers/sudoers.c:249:5: [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 dir[PATH_MAX], file[PATH_MAX]; data/sudo-1.9.3p1/plugins/sudoers/sudoers.c:390:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(NewArgv, argv, argc * sizeof(char *)); data/sudo-1.9.3p1/plugins/sudoers/sudoers.c:1086:16: [2] (misc) fopen: 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 ((fp = fopen(sudoers, "r")) == NULL) { data/sudo-1.9.3p1/plugins/sudoers/sudoers.c:1475:5: [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 flagfile[PATH_MAX]; data/sudo-1.9.3p1/plugins/sudoers/sudoers.c:1492:11: [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). int fd = open(flagfile, O_CREAT|O_WRONLY|O_NONBLOCK|O_EXCL, 0644); data/sudo-1.9.3p1/plugins/sudoers/sudoers.c:1516:11: [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). int fd = open(_PATH_TTY, O_RDWR); data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:94: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 buf[64 * 1024]; data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:208:5: [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 *cp, *ep, iolog_dir[PATH_MAX]; data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:587:5: [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 buf[1024]; data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:623:10: [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). ttyfd = open(_PATH_TTY, O_RDWR); data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:1106:34: [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. size_t len = (size_t)(nl - (char *)iov[0].iov_base); data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:1134:24: [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. iobuf->lastc = *((char *)iov[0].iov_base + nwritten); data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:1333:3: [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 buf[BUFSIZ]; data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:1360:5: [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 idbuf[7], *idstr, *cp; data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:1424:5: [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 pathbuf[PATH_MAX], **sessions = NULL; data/sudo-1.9.3p1/plugins/sudoers/testsudoers.c:458:11: [2] (misc) fopen: 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). fp = fopen(sudoers, "r"); data/sudo-1.9.3p1/plugins/sudoers/timestamp.c:174:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(entry, &cur, sizeof(struct timestamp_entry)); data/sudo-1.9.3p1/plugins/sudoers/timestamp.c:282:10: [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). fd = open(path, flags, S_IRUSR|S_IWUSR); data/sudo-1.9.3p1/plugins/sudoers/timestamp.c:805:11: [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). int fd = open(_PATH_TTY, O_RDWR); data/sudo-1.9.3p1/plugins/sudoers/timestamp.c:929:11: [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). int fd = open(_PATH_TTY, O_RDWR); data/sudo-1.9.3p1/plugins/sudoers/timestamp.c:977:7: [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). fd = open(_PATH_TTY, O_RDWR); data/sudo-1.9.3p1/plugins/sudoers/timestamp.c:1044:5: [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 status_file[PATH_MAX]; data/sudo-1.9.3p1/plugins/sudoers/timestamp.c:1068:5: [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 lecture_status[PATH_MAX]; data/sudo-1.9.3p1/plugins/sudoers/timestr.c:39:12: [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. static char buf[128]; data/sudo-1.9.3p1/plugins/sudoers/toke.c:5241:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(path, sudoers, dirlen); data/sudo-1.9.3p1/plugins/sudoers/toke.c:5249:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pp, user_shost, shost_len); data/sudo-1.9.3p1/plugins/sudoers/toke.c:5258:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pp, opath, len); data/sudo-1.9.3p1/plugins/sudoers/toke.c:5477:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, sudolinebuf.buf + sudolinebuf.off, avail); data/sudo-1.9.3p1/plugins/sudoers/tsdump.c:126:10: [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). fd = open(fname, O_RDONLY); data/sudo-1.9.3p1/plugins/sudoers/tsdump.c:190:12: [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. static char name[64]; data/sudo-1.9.3p1/plugins/sudoers/tsdump.c:249:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&orig, record, sizeof(union timestamp_entry_storage)); data/sudo-1.9.3p1/plugins/sudoers/tsdump.c:292: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 tty[PATH_MAX]; data/sudo-1.9.3p1/plugins/sudoers/tsgetgrpw.c:88:8: [2] (misc) fopen: 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). pwf = fopen(pwfile, "r"); data/sudo-1.9.3p1/plugins/sudoers/tsgetgrpw.c:111:12: [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. static char pwbuf[LINE_MAX]; data/sudo-1.9.3p1/plugins/sudoers/tsgetgrpw.c:165:13: [2] (misc) fopen: 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 ((pwf = fopen(pwfile, "r")) == NULL) data/sudo-1.9.3p1/plugins/sudoers/tsgetgrpw.c:188:13: [2] (misc) fopen: 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 ((pwf = fopen(pwfile, "r")) == NULL) data/sudo-1.9.3p1/plugins/sudoers/tsgetgrpw.c:217:8: [2] (misc) fopen: 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). grf = fopen(grfile, "r"); data/sudo-1.9.3p1/plugins/sudoers/tsgetgrpw.c:240:12: [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. static char grbuf[LINE_MAX], *gr_mem[GRMEM_MAX+1]; data/sudo-1.9.3p1/plugins/sudoers/tsgetgrpw.c:291:13: [2] (misc) fopen: 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 ((grf = fopen(grfile, "r")) == NULL) data/sudo-1.9.3p1/plugins/sudoers/tsgetgrpw.c:314:13: [2] (misc) fopen: 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 ((grf = fopen(grfile, "r")) == NULL) data/sudo-1.9.3p1/plugins/sudoers/visudo.c:423:5: [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 linestr[64]; /* string version of lineno */ data/sudo-1.9.3p1/plugins/sudoers/visudo.c:440:8: [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). tfd = open(sp->tpath, O_WRONLY|O_CREAT|O_TRUNC, S_IRWXU|S_IRUSR); data/sudo-1.9.3p1/plugins/sudoers/visudo.c:446:6: [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 buf[4096], lastch = '\0'; data/sudo-1.9.3p1/plugins/sudoers/visudo.c:596:7: [2] (misc) fopen: 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). fp = fopen(sp->tpath, "r+"); data/sudo-1.9.3p1/plugins/sudoers/visudo.c:759:6: [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 *av[4]; data/sudo-1.9.3p1/plugins/sudoers/visudo.c:920:29: [2] (misc) fopen: 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). } else if ((sudoersin = fopen(sudoers_file, "r")) == NULL) { data/sudo-1.9.3p1/plugins/sudoers/visudo.c:1012:17: [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). entry->fd = open(entry->path, open_flags, sudoers_mode); data/sudo-1.9.3p1/plugins/sudoers/visudo.c:1056:16: [2] (misc) fopen: 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 ((fp = fopen(entry->tpath, "r")) == NULL) data/sudo-1.9.3p1/src/conversation.c:97: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). ttyfd = open(_PATH_TTY, O_WRONLY); data/sudo-1.9.3p1/src/conversation.c:168:10: [2] (misc) fopen: 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). ttyfp = fopen(_PATH_TTY, "w"); data/sudo-1.9.3p1/src/copy_file.c:43:5: [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 zeroes[BUFSIZ] = { '\0' }; data/sudo-1.9.3p1/src/copy_file.c:85:5: [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 buf[BUFSIZ]; data/sudo-1.9.3p1/src/env_hooks.c:111:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(envp, environ, env_len * sizeof(char *)); data/sudo-1.9.3p1/src/exec_common.c:107:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(nenvp, envp, env_len * sizeof(*envp)); data/sudo-1.9.3p1/src/exec_common.c:207:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(nargv + 2, argv + 1, argc * sizeof(char *)); data/sudo-1.9.3p1/src/exec_monitor.c:77:5: [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 signame[SIG2STR_MAX]; data/sudo-1.9.3p1/src/exec_monitor.c:192:5: [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 signame[SIG2STR_MAX]; data/sudo-1.9.3p1/src/exec_nopty.c:114:5: [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 signame[SIG2STR_MAX]; data/sudo-1.9.3p1/src/exec_nopty.c:461:5: [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 signame[SIG2STR_MAX]; data/sudo-1.9.3p1/src/exec_nopty.c:495:7: [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). fd = open(_PATH_TTY, O_RDWR); data/sudo-1.9.3p1/src/exec_pty.c:97:5: [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 buf[64 * 1024]; data/sudo-1.9.3p1/src/exec_pty.c:101:8: [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. static char ptyname[PATH_MAX]; data/sudo-1.9.3p1/src/exec_pty.c:143:27: [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). io_fds[SFD_USERTTY] = open(_PATH_TTY, O_RDWR); data/sudo-1.9.3p1/src/exec_pty.c:185:11: [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). int fd = open(ptyname, O_RDWR); data/sudo-1.9.3p1/src/exec_pty.c:519:5: [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 signame[SIG2STR_MAX]; data/sudo-1.9.3p1/src/exec_pty.c:913:5: [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 signame[SIG2STR_MAX]; data/sudo-1.9.3p1/src/exec_pty.c:1064: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 signame[SIG2STR_MAX]; data/sudo-1.9.3p1/src/exec_pty.c:1084:5: [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 signame[SIG2STR_MAX]; data/sudo-1.9.3p1/src/exec_pty.c:1135:5: [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 signame[SIG2STR_MAX]; data/sudo-1.9.3p1/src/get_pty.c:84:14: [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). *follower = open(line, O_RDWR|O_NOCTTY, 0); data/sudo-1.9.3p1/src/get_pty.c:104:10: [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). fd = open(_PATH_DEV "ptc", oflag); data/sudo-1.9.3p1/src/get_pty.c:106:10: [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). fd = open(_PATH_DEV "ptmx", oflag); data/sudo-1.9.3p1/src/get_pty.c:131:14: [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). *follower = open(line, O_RDWR|O_NOCTTY, 0); data/sudo-1.9.3p1/src/get_pty.c:168:16: [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). *leader = open(line, O_RDWR|O_NOCTTY, 0); data/sudo-1.9.3p1/src/get_pty.c:180:18: [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). *follower = open(line, O_RDWR|O_NOCTTY, 0); data/sudo-1.9.3p1/src/limits.c:355: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 curlim[(((sizeof(long long) * 8) + 2) / 3) + 2]; data/sudo-1.9.3p1/src/limits.c:356: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 maxlim[(((sizeof(long long) * 8) + 2) / 3) + 2]; data/sudo-1.9.3p1/src/load_plugins.c:273:5: [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 path[PATH_MAX]; data/sudo-1.9.3p1/src/net_ifs.c:118:5: [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 addrstr[INET6_ADDRSTRLEN], maskstr[INET6_ADDRSTRLEN]; data/sudo-1.9.3p1/src/net_ifs.c:120:5: [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 addrstr[INET_ADDRSTRLEN], maskstr[INET_ADDRSTRLEN]; data/sudo-1.9.3p1/src/net_ifs.c:222:5: [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 ifr_tmpbuf[sizeof(struct ifreq)]; data/sudo-1.9.3p1/src/net_ifs.c:229:5: [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 addrstr[INET_ADDRSTRLEN], maskstr[INET_ADDRSTRLEN]; data/sudo-1.9.3p1/src/net_ifs.c:310:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ifr_tmp, ifr, sizeof(*ifr_tmp)); data/sudo-1.9.3p1/src/parse_args.c:708:5: [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 *uvec[6]; data/sudo-1.9.3p1/src/regress/ttyname/check_ttyname.c:66:5: [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 pathbuf[PATH_MAX]; data/sudo-1.9.3p1/src/selinux.c:187:19: [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). se_state.ttyfd = open(ttyn, O_RDWR|O_NOCTTY|O_NONBLOCK); data/sudo-1.9.3p1/src/selinux.c:232:19: [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). se_state.ttyfd = open(ttyn, O_RDWR|O_NOCTTY, 0); data/sudo-1.9.3p1/src/selinux.c:262:19: [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). se_state.ttyfd = open(ttyn, O_RDWR|O_NOCTTY|O_NONBLOCK); data/sudo-1.9.3p1/src/selinux.c:502:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&nargv[nargc], &argv[1], argc * sizeof(char *)); /* copies NULL */ data/sudo-1.9.3p1/src/sesh.c:190:16: [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 ((fd_src = open(path_src, O_RDONLY|follow, S_IRUSR|S_IWUSR)) < 0) { data/sudo-1.9.3p1/src/sesh.c:201:16: [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 ((fd_dst = open(path_dst, oflags_dst, post ? data/sudo-1.9.3p1/src/solaris.c:56:5: [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 buf[PROJECT_BUFSZ]; data/sudo-1.9.3p1/src/sudo.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). devnull = open(_PATH_DEVNULL, O_RDWR, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); data/sudo-1.9.3p1/src/sudo.c:473:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(gid_list, "groups=", sizeof("groups=") - 1); data/sudo-1.9.3p1/src/sudo.c:493:5: [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 *cp, **user_info, path[PATH_MAX]; data/sudo-1.9.3p1/src/sudo.c:524:10: [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). fd = open(_PATH_TTY, O_RDWR); data/sudo-1.9.3p1/src/sudo.c:879:5: [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 pathbuf[PATH_MAX]; data/sudo-1.9.3p1/src/sudo.c:1084:35: [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). ok = policy_plugin.u.policy_1_0->open(policy_plugin.u.io_1_0->version, data/sudo-1.9.3p1/src/sudo.c:1089:31: [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). ok = policy_plugin.u.policy->open(SUDO_API_VERSION, sudo_conversation, data/sudo-1.9.3p1/src/sudo.c:1383:26: [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). ret = plugin->u.io_1_0->open(plugin->u.io_1_0->version, data/sudo-1.9.3p1/src/sudo.c:1388:26: [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). ret = plugin->u.io_1_1->open(plugin->u.io_1_1->version, data/sudo-1.9.3p1/src/sudo.c:1393:22: [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). ret = plugin->u.io->open(SUDO_API_VERSION, sudo_conversation, data/sudo-1.9.3p1/src/sudo.c:1551:28: [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). ret = plugin->u.audit->open(SUDO_API_VERSION, sudo_conversation, data/sudo-1.9.3p1/src/sudo.c:1743:31: [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). ret = plugin->u.approval->open(SUDO_API_VERSION, sudo_conversation, data/sudo-1.9.3p1/src/sudo_edit.c:56:8: [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. static char edit_tmpdir[MAX(sizeof(_PATH_VARTMP), sizeof(_PATH_TMP))]; data/sudo-1.9.3p1/src/sudo_edit.c:219:13: [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 ((dfd = open(tmpdirs[i], O_RDONLY)) != -1) { data/sudo-1.9.3p1/src/sudo_edit.c:315:17: [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 ((odfd = open(".", O_RDONLY)) == -1) data/sudo-1.9.3p1/src/sudo_edit.c:333:10: [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). fd = open(path, oflags, mode); data/sudo-1.9.3p1/src/sudo_edit.c:390:8: [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). dfd = open("/", dflags); data/sudo-1.9.3p1/src/sudo_edit.c:393:8: [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). dfd = open(".", dflags); data/sudo-1.9.3p1/src/sudo_edit.c:463:7: [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). fd = open(path, oflags|O_NONBLOCK, mode); data/sudo-1.9.3p1/src/sudo_edit.c:496:7: [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). fd = open(path, oflags|O_NONBLOCK, mode); data/sudo-1.9.3p1/src/sudo_edit.c:1014:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&saved_command_details, command_details, sizeof(struct command_details)); data/sudo-1.9.3p1/src/sudo_plugin_int.h:40:11: [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). int (*open)(unsigned int version, sudo_conv_1_7_t conversation, data/sudo-1.9.3p1/src/sudo_plugin_int.h:57:11: [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). int (*open)(unsigned int version, sudo_conv_1_7_t conversation, data/sudo-1.9.3p1/src/sudo_plugin_int.h:72:11: [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). int (*open)(unsigned int version, sudo_conv_1_7_t conversation, data/sudo-1.9.3p1/src/tgetpass.c:118:12: [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. static char buf[SUDO_CONV_REPL_MAX + 1]; data/sudo-1.9.3p1/src/tgetpass.c:137:10: [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). ttyfd = open(_PATH_TTY, O_RDWR); data/sudo-1.9.3p1/src/tgetpass.c:291:12: [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. static char buf[SUDO_CONV_REPL_MAX + 1], *pass; data/sudo-1.9.3p1/src/ttyname.c:152:5: [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 path[PATH_MAX], *ret = NULL; data/sudo-1.9.3p1/src/ttyname.c:160: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 ((fd = open(path, O_RDONLY, 0)) != -1) { data/sudo-1.9.3p1/src/ttyname.c:194:5: [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 *cp, buf[1024]; data/sudo-1.9.3p1/src/ttyname.c:205: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 ((fd = open(path, O_RDONLY | O_NOFOLLOW)) != -1) { data/sudo-1.9.3p1/src/utmp.c:166:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ut_new, ut_old, sizeof(*ut_new)); data/sudo-1.9.3p1/src/utmp.c:324:15: [2] (misc) fopen: 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 ((fp = fopen(_PATH_UTMP, "r+")) == NULL) data/sudo-1.9.3p1/src/utmp.c:363:15: [2] (misc) fopen: 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 ((fp = fopen(_PATH_UTMP, "r+")) == NULL) data/sudo-1.9.3p1/lib/iolog/hostcheck.c:123:24: [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). int hostname_len = strlen(hostname); data/sudo-1.9.3p1/lib/iolog/iolog_fileio.c:163:13: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). omask = umask(ACCESSPERMS & ~(iolog_filemode|iolog_dirmode)); data/sudo-1.9.3p1/lib/iolog/iolog_fileio.c:199:5: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(omask); data/sudo-1.9.3p1/lib/iolog/iolog_fileio.c:391:10: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). omask = umask(ACCESSPERMS & ~(iolog_filemode|iolog_dirmode)); data/sudo-1.9.3p1/lib/iolog/iolog_fileio.c:419:2: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(omask); data/sudo-1.9.3p1/lib/iolog/iolog_fileio.c:474:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = read(fd, buf, sizeof(buf) - 1); data/sudo-1.9.3p1/lib/iolog/iolog_fileio.c:539:11: [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). len = strlen(path); data/sudo-1.9.3p1/lib/iolog/iolog_fileio.c:594:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, magic, sizeof(magic)) == ssizeof(magic)) { data/sudo-1.9.3p1/lib/iolog/iolog_json.c:447:15: [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). size_t len = strlen(li->cmd) + 1; data/sudo-1.9.3p1/lib/iolog/iolog_json.c:453:13: [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). len += strlen(li->argv[ac]) + 1; data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:446:22: [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). size_t len = str ? strlen(str) : 0; data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:663:17: [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). size_t len = strlen(((char **) array)[i]); data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:1000:16: [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). size_t len = strlen(str); data/sudo-1.9.3p1/lib/logsrv/protobuf-c.c:1602:25: [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). size_t sublen = str ? strlen(str) : 0; data/sudo-1.9.3p1/lib/util/event.c:153:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((nread = read(fd, &ch, 1)) > 0) { data/sudo-1.9.3p1/lib/util/fnmatch.c:123:9: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. *ep = mismatch; data/sudo-1.9.3p1/lib/util/fnmatch.c:129:9: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. *ep = mismatch; data/sudo-1.9.3p1/lib/util/fnmatch.c:146:9: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. *ep = mismatch; data/sudo-1.9.3p1/lib/util/fnmatch.c:263:20: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. *pattern = mismatch; data/sudo-1.9.3p1/lib/util/fnmatch.c:471:31: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. pattern = mismatch; data/sudo-1.9.3p1/lib/util/getcwd.c:54:25: [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). # define NAMLEN(dirent) strlen((dirent)->d_name) data/sudo-1.9.3p1/lib/util/getdelim.c:60:12: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((ch = getc(fp)) == EOF) { data/sudo-1.9.3p1/lib/util/getentropy.c:232:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t ret = read(fd, (char *)buf + i, wanted); data/sudo-1.9.3p1/lib/util/getopt_long.c:238:22: [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). current_argv_len = strlen(current_argv); data/sudo-1.9.3p1/lib/util/getopt_long.c:246:7: [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 (strlen(long_options[i].name) == current_argv_len) { data/sudo-1.9.3p1/lib/util/inet_ntop.c:178:10: [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). cp += strlen(cp); data/sudo-1.9.3p1/lib/util/json.c:101:11: [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). len = strlen(str); data/sudo-1.9.3p1/lib/util/key_val.c:40:22: [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). size_t key_len = strlen(key); data/sudo-1.9.3p1/lib/util/key_val.c:41:22: [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). size_t val_len = strlen(val); data/sudo-1.9.3p1/lib/util/lbuf.c:119:9: [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). len = strlen(s); data/sudo-1.9.3p1/lib/util/lbuf.c:166:12: [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). len = strlen(s); data/sudo-1.9.3p1/lib/util/lbuf.c:206:12: [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). contlen = strlen(lbuf->continuation); data/sudo-1.9.3p1/lib/util/lbuf.c:277:32: [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). len = lbuf->continuation ? strlen(lbuf->continuation) : 0; data/sudo-1.9.3p1/lib/util/mktemp.c:67:8: [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). len = strlen(path); data/sudo-1.9.3p1/lib/util/pw_dup.c:42:10: [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). size = strlen(pw->name) + 1; \ data/sudo-1.9.3p1/lib/util/regress/getdelim/getdelim_test.c:81:42: [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 (send(sv[1], test_data[i].input, strlen(test_data[i].input), 0) == -1) { data/sudo-1.9.3p1/lib/util/regress/glob/globtest.c:66:9: [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). len = strlen(buf); data/sudo-1.9.3p1/lib/util/regress/glob/globtest.c:189:8: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. goto mismatch; data/sudo-1.9.3p1/lib/util/regress/glob/globtest.c:193:9: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. goto mismatch; data/sudo-1.9.3p1/lib/util/regress/glob/globtest.c:197:2: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. mismatch: data/sudo-1.9.3p1/lib/util/regress/mktemp/mktemp_test.c:87:16: [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). size_t plen = strlen(prefix); data/sudo-1.9.3p1/lib/util/regress/mktemp/mktemp_test.c:106:16: [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). size_t plen = strlen(prefix); data/sudo-1.9.3p1/lib/util/regress/mktemp/mktemp_test.c:107:16: [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). size_t slen = strlen(suffix); data/sudo-1.9.3p1/lib/util/regress/mktemp/mktemp_test.c:138:9: [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). clen = strlen(cwd); data/sudo-1.9.3p1/lib/util/regress/strsplit/strsplit_test.c:74:12: [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). len = strlen(test_data[i].output[j]); data/sudo-1.9.3p1/lib/util/snprintf.c:870:16: [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 ((len = strlen(cp)) > INT_MAX) data/sudo-1.9.3p1/lib/util/snprintf.c:945:13: [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). size = strlen(cp); data/sudo-1.9.3p1/lib/util/strlcat.c:57:17: [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). return(dlen + strlen(src)); data/sudo-1.9.3p1/lib/util/sudo_conf.c:164:37: [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). const char *entry_end = entry + strlen(entry); data/sudo-1.9.3p1/lib/util/sudo_conf.c:219:37: [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). const char *entry_end = entry + strlen(entry); data/sudo-1.9.3p1/lib/util/sudo_conf.c:289:37: [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). const char *entry_end = entry + strlen(entry); data/sudo-1.9.3p1/lib/util/sudo_conf.c:512:33: [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). prognamelen = progbaselen = strlen(progname); data/sudo-1.9.3p1/lib/util/sudo_conf.c:515:16: [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). progbaselen = strlen(++progbase); data/sudo-1.9.3p1/lib/util/sudo_debug.c:355:22: [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). sudo_debug_pidlen = strlen(sudo_debug_pidstr); data/sudo-1.9.3p1/lib/util/sudo_debug.c:467:22: [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). sudo_debug_pidlen = strlen(sudo_debug_pidstr); data/sudo-1.9.3p1/lib/util/sudo_debug.c:568:21: [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). int len = ret ? strlen(ret) : sizeof("(null)") - 1; data/sudo-1.9.3p1/lib/util/sudo_debug.c:593:22: [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). iov[1].iov_len = strlen(iov[1].iov_base); data/sudo-1.9.3p1/lib/util/sudo_debug.c:614:24: [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). iov[iovcnt].iov_len = strlen(iov[iovcnt].iov_base); data/sudo-1.9.3p1/lib/util/sudo_debug.c:625:24: [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). iov[iovcnt].iov_len = strlen(func); data/sudo-1.9.3p1/lib/util/sudo_debug.c:633:24: [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). iov[iovcnt].iov_len = strlen(file); data/sudo-1.9.3p1/lib/util/sudo_debug.c:638:24: [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). iov[iovcnt].iov_len = strlen(numbuf); data/sudo-1.9.3p1/lib/util/sudo_debug.c:830:9: [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). plen = strlen(path); data/sudo-1.9.3p1/lib/util/sudo_debug.c:835:13: [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). buflen += strlen(*av) + 1; data/sudo-1.9.3p1/lib/util/sudo_debug.c:841:13: [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). buflen += strlen(*av) + 1; data/sudo-1.9.3p1/lib/util/sudo_debug.c:861:18: [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). size_t avlen = strlen(*av); data/sudo-1.9.3p1/lib/util/sudo_debug.c:873:18: [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). size_t avlen = strlen(*av); data/sudo-1.9.3p1/lib/util/ttyname_dev.c:150:13: [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). sdlen = strlen(dir); data/sudo-1.9.3p1/lib/util/ttyname_dev.c:214:25: [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). pathbuf, namelen, strlen(pathbuf) + 1); data/sudo-1.9.3p1/lib/util/ttyname_dev.c:242:20: [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). devname, buflen, strlen(devname) + 1); data/sudo-1.9.3p1/lib/util/ttyname_dev.c:276:33: [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). devsearch_end = devsearch + strlen(devsearch); data/sudo-1.9.3p1/lib/zlib/gzguts.h:48:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define read _read data/sudo-1.9.3p1/lib/zlib/gzlib.c:199:15: [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). len = strlen((const char *)path); data/sudo-1.9.3p1/lib/zlib/gzlib.c:605:38: [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 ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) == data/sudo-1.9.3p1/lib/zlib/gzlib.c:605:60: [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 ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) == data/sudo-1.9.3p1/lib/zlib/gzlib.c:611:32: [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). (void)snprintf(state->msg, strlen(state->path) + strlen(msg) + 3, data/sudo-1.9.3p1/lib/zlib/gzlib.c:611:54: [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). (void)snprintf(state->msg, strlen(state->path) + strlen(msg) + 3, data/sudo-1.9.3p1/lib/zlib/gzread.c:35:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(state->fd, buf + *have, get); data/sudo-1.9.3p1/lib/zlib/gzwrite.c:370:11: [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). len = strlen(str); data/sudo-1.9.3p1/lib/zlib/gzwrite.c:426:11: [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). len = strlen(next); data/sudo-1.9.3p1/lib/zlib/gzwrite.c:524:11: [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). len = strlen(next); data/sudo-1.9.3p1/logsrvd/eventlog.c:113:9: [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). len += strlen(message) + 3; data/sudo-1.9.3p1/logsrvd/eventlog.c:115:9: [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). len += strlen(errstr) + 3; data/sudo-1.9.3p1/logsrvd/eventlog.c:116:38: [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). len += sizeof(LL_HOST_STR) + 2 + strlen(details->submithost); data/sudo-1.9.3p1/logsrvd/eventlog.c:117:37: [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). len += sizeof(LL_TTY_STR) + 2 + strlen(details->ttyname); data/sudo-1.9.3p1/logsrvd/eventlog.c:119:37: [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). len += sizeof(LL_CHROOT_STR) + 2 + strlen(details->runchroot); data/sudo-1.9.3p1/logsrvd/eventlog.c:120:37: [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). len += sizeof(LL_CWD_STR) + 2 + strlen(details->runcwd); data/sudo-1.9.3p1/logsrvd/eventlog.c:122:35: [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). len += sizeof(LL_USER_STR) + 2 + strlen(details->runuser); data/sudo-1.9.3p1/logsrvd/eventlog.c:124:36: [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). len += sizeof(LL_GROUP_STR) + 2 + strlen(details->rungroup); data/sudo-1.9.3p1/logsrvd/eventlog.c:126:35: [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). len += sizeof(LL_TSID_STR) + 2 + strlen(tsid); data/sudo-1.9.3p1/logsrvd/eventlog.c:132:15: [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). evlen += strlen(*ep) + 1; data/sudo-1.9.3p1/logsrvd/eventlog.c:148:35: [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). len += sizeof(LL_CMND_STR) - 1 + strlen(details->command); data/sudo-1.9.3p1/logsrvd/eventlog.c:151:10: [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). len += strlen(details->argv[i]) + 1; data/sudo-1.9.3p1/logsrvd/eventlog.c:442:3: [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). (strlen(fmt) - 5 + strlen(details->submituser)); data/sudo-1.9.3p1/logsrvd/eventlog.c:442:21: [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). (strlen(fmt) - 5 + strlen(details->submituser)); data/sudo-1.9.3p1/logsrvd/eventlog.c:444:8: [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). len = strlen(p); data/sudo-1.9.3p1/logsrvd/eventlog.c:471:7: [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). (strlen(fmt) - 5 + strlen(details->submituser)); data/sudo-1.9.3p1/logsrvd/eventlog.c:471:25: [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). (strlen(fmt) - 5 + strlen(details->submituser)); data/sudo-1.9.3p1/logsrvd/iolog_writer.c:644:49: [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). details->iolog_file = details->iolog_path + strlen(expanded_dir) + 1; data/sudo-1.9.3p1/logsrvd/logsrvd_conf.c:904:15: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). oldmask = umask(S_IRWXG|S_IRWXO); data/sudo-1.9.3p1/logsrvd/logsrvd_conf.c:906:11: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (void)umask(oldmask); data/sudo-1.9.3p1/plugins/audit_json/audit_json.c:157:15: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). oldmask = umask(S_IRWXG|S_IRWXO); data/sudo-1.9.3p1/plugins/audit_json/audit_json.c:159:11: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (void)umask(oldmask); data/sudo-1.9.3p1/plugins/group_file/getgrent.c:116:11: [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). len = strlen(colon); data/sudo-1.9.3p1/plugins/python/python_plugin_common.c:52:21: [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). size_t keylen = strlen(key); data/sudo-1.9.3p1/plugins/python/python_plugin_common.c:112:18: [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). size_t len = strlen(module_name); data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:207:60: [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). VERIFY_INT(python_io->log_stdin("some standard input", strlen("some standard input"), &errstr), SUDO_RC_OK); data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:209:62: [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). VERIFY_INT(python_io->log_stdout("some standard output", strlen("some standard output"), &errstr), SUDO_RC_OK); data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:211:61: [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). VERIFY_INT(python_io->log_stderr("some standard error", strlen("some standard error"), &errstr), SUDO_RC_OK); data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:219:55: [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). VERIFY_INT(python_io->log_ttyin("some tty input", strlen("some tty input"), &errstr), SUDO_RC_OK); data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:221:57: [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). VERIFY_INT(python_io->log_ttyout("some tty output", strlen("some tty output"), &errstr), SUDO_RC_OK); data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:288:59: [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). VERIFY_INT(python_io->log_stdin("stdin for plugin 1", strlen("stdin for plugin 1"), &errstr), SUDO_RC_OK); data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:290:60: [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). VERIFY_INT(python_io2->log_stdin("stdin for plugin 2", strlen("stdin for plugin 2"), &errstr), SUDO_RC_OK); data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:292:61: [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). VERIFY_INT(python_io->log_stdout("stdout for plugin 1", strlen("stdout for plugin 1"), &errstr), SUDO_RC_OK); data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:294:62: [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). VERIFY_INT(python_io2->log_stdout("stdout for plugin 2", strlen("stdout for plugin 2"), &errstr), SUDO_RC_OK); data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:296:61: [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). VERIFY_INT(python_io->log_stderr("stderr for plugin 1", strlen("stderr for plugin 1"), &errstr), SUDO_RC_OK); data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:298:62: [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). VERIFY_INT(python_io2->log_stderr("stderr for plugin 2", strlen("stderr for plugin 2"), &errstr), SUDO_RC_OK); data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:312:63: [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). VERIFY_INT(python_io->log_ttyin("tty input for plugin 1", strlen("tty input for plugin 1"), &errstr), SUDO_RC_OK); data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:314:64: [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). VERIFY_INT(python_io2->log_ttyin("tty input for plugin 2", strlen("tty input for plugin 2"), &errstr), SUDO_RC_OK); data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:316:65: [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). VERIFY_INT(python_io->log_ttyout("tty output for plugin 1", strlen("tty output for plugin 1"), &errstr), SUDO_RC_OK); data/sudo-1.9.3p1/plugins/python/regress/check_python_examples.c:318:66: [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). VERIFY_INT(python_io2->log_ttyout("tty output for plugin 2", strlen("tty output for plugin 2"), &errstr), SUDO_RC_OK); data/sudo-1.9.3p1/plugins/python/regress/iohelpers.c:52:19: [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). size_t size = strlen(string); data/sudo-1.9.3p1/plugins/python/regress/iohelpers.c:104:25: [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). size_t output_len = strlen(output); data/sudo-1.9.3p1/plugins/python/regress/iohelpers.c:146:22: [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). size_t old_len = strlen(old); data/sudo-1.9.3p1/plugins/sudoers/auth/aix_auth.c:162:37: [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(cp, badpass_msgid, strlen(badpass_msgid)) == 0) data/sudo-1.9.3p1/plugins/sudoers/auth/aix_auth.c:246:17: [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). freezero(pass, strlen(pass)); data/sudo-1.9.3p1/plugins/sudoers/auth/bsdauth.c:139:12: [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). len = strlen(prompt) - 1; data/sudo-1.9.3p1/plugins/sudoers/auth/bsdauth.c:154:17: [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). freezero(pass, strlen(pass)); data/sudo-1.9.3p1/plugins/sudoers/auth/fwtk.c:137:20: [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). freezero(pass, strlen(pass)); data/sudo-1.9.3p1/plugins/sudoers/auth/pam.c:615:16: [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). user_len = strlen(user_name); data/sudo-1.9.3p1/plugins/sudoers/auth/pam.c:701:7: [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 (strlen(pass) >= PAM_MAX_RESP_SIZE) { data/sudo-1.9.3p1/plugins/sudoers/auth/pam.c:705:28: [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). explicit_bzero(pass, strlen(pass)); data/sudo-1.9.3p1/plugins/sudoers/auth/pam.c:735:22: [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). freezero(pr->resp, strlen(pr->resp)); data/sudo-1.9.3p1/plugins/sudoers/auth/passwd.c:77:14: [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). pw_len = strlen(pw_epasswd); data/sudo-1.9.3p1/plugins/sudoers/auth/passwd.c:89:41: [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 (HAS_AGEINFO(pw_epasswd, pw_len) && strlen(epass) == DESLEN) data/sudo-1.9.3p1/plugins/sudoers/auth/passwd.c:119:23: [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). freezero(pw_epasswd, strlen(pw_epasswd)); data/sudo-1.9.3p1/plugins/sudoers/auth/rfc1938.c:76:11: [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). op_len = strlen(orig_prompt); data/sudo-1.9.3p1/plugins/sudoers/auth/rfc1938.c:107:21: [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). challenge_len = strlen(challenge); data/sudo-1.9.3p1/plugins/sudoers/auth/secureware.c:105:23: [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). freezero(pw_epasswd, strlen(pw_epasswd)); data/sudo-1.9.3p1/plugins/sudoers/auth/securid5.c:180:22: [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). freezero(pass, strlen(pass)); data/sudo-1.9.3p1/plugins/sudoers/auth/securid5.c:219:17: [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). freezero(pass, strlen(pass)); data/sudo-1.9.3p1/plugins/sudoers/auth/sia.c:93:20: [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). freezero(pass, strlen(pass)); data/sudo-1.9.3p1/plugins/sudoers/auth/sudo_auth.c:329:21: [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). freezero(pass, strlen(pass)); data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_ldif.c:106:22: [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). const size_t vlen = strlen(value); data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_ldif.c:223:24: [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). bufsiz = negated + strlen(cmnd) + 1; data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_ldif.c:225:16: [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). bufsiz += 1 + strlen(c->args); data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_ldif.c:227:12: [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). bufsiz += strlen(digest_type_to_name(digest->digest_type)) + 1 + data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_ldif.c:228:6: [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). strlen(digest->digest_str) + 1; data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_ldif.c:522:17: [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). size = (2 * strlen(user)) + 64 + 1; data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_pwutil.c:59:10: [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). size = strlen((src)->name) + 1; \ data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_pwutil.c:146:11: [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). total += strlen(name) + 1; data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_pwutil.c:173:19: [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). memcpy(cp, name, strlen(name) + 1); data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_pwutil.c:243:15: [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). total += strlen(s->str) + 1; data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_pwutil.c:249:11: [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). total += strlen(name) + 1; data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_pwutil.c:270:12: [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). len = strlen(s->str) + 1; data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_pwutil.c:282:19: [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). memcpy(cp, name, strlen(name) + 1); data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_pwutil.c:353:13: [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). nsize = strlen(pw->pw_name) + 1; data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_pwutil.c:430:13: [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). nsize = strlen(pw->pw_name) + 1; data/sudo-1.9.3p1/plugins/sudoers/cvtsudoers_pwutil.c:471:8: [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). len = strlen(s->str) + 1; data/sudo-1.9.3p1/plugins/sudoers/defaults.c:937:26: [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). const char *end = str + strlen(str); data/sudo-1.9.3p1/plugins/sudoers/editor.c:146:43: [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). editor_path = resolve_editor(editor, strlen(editor), data/sudo-1.9.3p1/plugins/sudoers/editor.c:155:44: [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). const char *def_editor_end = def_editor + strlen(def_editor); data/sudo-1.9.3p1/plugins/sudoers/env.c:426:13: [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). esize = strlen(var) + 1 + strlen(val) + 1; data/sudo-1.9.3p1/plugins/sudoers/env.c:426:31: [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). esize = strlen(var) + 1 + strlen(val) + 1; data/sudo-1.9.3p1/plugins/sudoers/env.c:484:11: [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). esize += strlen(val); /* glibc treats a NULL val as "" */ data/sudo-1.9.3p1/plugins/sudoers/env.c:523:11: [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). len = strlen(var); data/sudo-1.9.3p1/plugins/sudoers/env.c:1294:12: [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). val_len = strlen(++val); data/sudo-1.9.3p1/plugins/sudoers/find_path.c:122:22: [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). pathend = path + strlen(path); data/sudo-1.9.3p1/plugins/sudoers/getdate.c:741:9: [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 (strlen(buff) == 3) data/sudo-1.9.3p1/plugins/sudoers/getdate.c:743:14: [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). else if (strlen(buff) == 4 && buff[3] == '.') { data/sudo-1.9.3p1/plugins/sudoers/getdate.c:779:9: [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). i = strlen(buff) - 1; data/sudo-1.9.3p1/plugins/sudoers/gram.c:1102:21: [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). # define yystrlen strlen data/sudo-1.9.3p1/plugins/sudoers/interfaces.c:126:31: [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). const char *ai_end = ai + strlen(ai); data/sudo-1.9.3p1/plugins/sudoers/iolog.c:170:29: [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). const char *s_end = s + strlen(s); data/sudo-1.9.3p1/plugins/sudoers/iolog.c:570:12: [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 (len + strlen("/00/00/00") >= sizeof(iolog_path)) { data/sudo-1.9.3p1/plugins/sudoers/iolog_path_escapes.c:80:8: [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). len = strlen(str); data/sudo-1.9.3p1/plugins/sudoers/iolog_path_escapes.c:108:12: [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). len = strlen(str); data/sudo-1.9.3p1/plugins/sudoers/ldap.c:180:9: [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). len += strlen(uri->val) + 1; data/sudo-1.9.3p1/plugins/sudoers/ldap.c:585:16: [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). return dlen + strlen(s); data/sudo-1.9.3p1/plugins/sudoers/ldap.c:681:13: [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). filt_len = strlen(ldap_conf.netgroup_search_filter) + 7; data/sudo-1.9.3p1/plugins/sudoers/ldap.c:943:8: [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). sz += strlen(ldap_conf.search_filter); data/sudo-1.9.3p1/plugins/sudoers/ldap.c:973:14: [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). sz += 14 + strlen(ng->name); data/sudo-1.9.3p1/plugins/sudoers/ldap.c:1357:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((nread = read(ofd, buf, sizeof(buf))) > 0) { data/sudo-1.9.3p1/plugins/sudoers/ldap.c:1416:18: [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). interact->len = strlen(interact->result); data/sudo-1.9.3p1/plugins/sudoers/ldap.c:1563:14: [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). bv.bv_len = strlen(bv.bv_val); data/sudo-1.9.3p1/plugins/sudoers/ldap_conf.c:334:13: [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). reslen = ((strlen(secret) + 3) / 4 * 3); data/sudo-1.9.3p1/plugins/sudoers/ldap_conf.c:451:20: [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). size_t len = strlen(value); data/sudo-1.9.3p1/plugins/sudoers/ldap_conf.c:756:15: [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). size_t len = strlen(ldap_conf.search_filter); data/sudo-1.9.3p1/plugins/sudoers/ldap_util.c:100:23: [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). char *ep = val + strlen(val); data/sudo-1.9.3p1/plugins/sudoers/ldap_util.c:506:42: [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). size_t slen = sizeof("sudoRole") + strlen(priv->ldap_role); data/sudo-1.9.3p1/plugins/sudoers/linux_audit.c:80:10: [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). size += strlen(*av) + 1; data/sudo-1.9.3p1/plugins/sudoers/logging.c:112:35: [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). maxlen = def_syslog_maxlen - (strlen(fmt) - 5 + strlen(user_name)); data/sudo-1.9.3p1/plugins/sudoers/logging.c:112:53: [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). maxlen = def_syslog_maxlen - (strlen(fmt) - 5 + strlen(user_name)); data/sudo-1.9.3p1/plugins/sudoers/logging.c:114:15: [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). size_t len = strlen(cp); data/sudo-1.9.3p1/plugins/sudoers/logging.c:136:32: [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). maxlen = def_syslog_maxlen - (strlen(fmt) - 5 + strlen(user_name)); data/sudo-1.9.3p1/plugins/sudoers/logging.c:136:50: [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). maxlen = def_syslog_maxlen - (strlen(fmt) - 5 + strlen(user_name)); data/sudo-1.9.3p1/plugins/sudoers/logging.c:160:15: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). oldmask = umask(S_IRWXG|S_IRWXO); data/sudo-1.9.3p1/plugins/sudoers/logging.c:162:12: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (void) umask(oldmask); data/sudo-1.9.3p1/plugins/sudoers/logging.c:454:12: [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). size = strlen(src) + 33; data/sudo-1.9.3p1/plugins/sudoers/logging.c:985:9: [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). len += strlen(message) + 3; data/sudo-1.9.3p1/plugins/sudoers/logging.c:987:9: [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). len += strlen(errstr) + 3; data/sudo-1.9.3p1/plugins/sudoers/logging.c:988:37: [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). len += sizeof(LL_TTY_STR) + 2 + strlen(user_tty); data/sudo-1.9.3p1/plugins/sudoers/logging.c:990:37: [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). len += sizeof(LL_CHROOT_STR) + 2 + strlen(user_runchroot); data/sudo-1.9.3p1/plugins/sudoers/logging.c:991:37: [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). len += sizeof(LL_CWD_STR) + 2 + strlen(user_runcwd); data/sudo-1.9.3p1/plugins/sudoers/logging.c:993:35: [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). len += sizeof(LL_USER_STR) + 2 + strlen(runas_pw->pw_name); data/sudo-1.9.3p1/plugins/sudoers/logging.c:995:36: [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). len += sizeof(LL_GROUP_STR) + 2 + strlen(runas_gr->gr_name); data/sudo-1.9.3p1/plugins/sudoers/logging.c:997:35: [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). len += sizeof(LL_TSID_STR) + 2 + strlen(tsid); data/sudo-1.9.3p1/plugins/sudoers/logging.c:1003:15: [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). evlen += strlen(*ep) + 1; data/sudo-1.9.3p1/plugins/sudoers/logging.c:1017:35: [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). len += sizeof(LL_CMND_STR) - 1 + strlen(user_cmnd); data/sudo-1.9.3p1/plugins/sudoers/logging.c:1021:13: [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). len += strlen(user_args) + 1; data/sudo-1.9.3p1/plugins/sudoers/match_command.c:118:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, magic, 2) == 2) { data/sudo-1.9.3p1/plugins/sudoers/match_command.c:237:14: [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). chrootlen = strlen(runchroot); data/sudo-1.9.3p1/plugins/sudoers/match_command.c:388:12: [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). dlen = strlen(sudoers_cmnd); data/sudo-1.9.3p1/plugins/sudoers/match_command.c:406:14: [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). chrootlen = strlen(runchroot); data/sudo-1.9.3p1/plugins/sudoers/match_command.c:470:13: [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). dlen = strlen(cp); data/sudo-1.9.3p1/plugins/sudoers/match_command.c:530:12: [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). dlen = strlen(sudoers_cmnd); data/sudo-1.9.3p1/plugins/sudoers/match_digest.c:83:6: [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 (strlen(digest->digest_str) == digest_len * 2) { data/sudo-1.9.3p1/plugins/sudoers/parse.c:771:22: [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). debug_return_int(strlen(buf)); data/sudo-1.9.3p1/plugins/sudoers/parse_ldif.c:135:15: [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). ep = cp + strlen(cp); data/sudo-1.9.3p1/plugins/sudoers/parse_ldif.c:155:51: [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). len = base64_decode(attr, (unsigned char *)copy, strlen(copy)); data/sudo-1.9.3p1/plugins/sudoers/parse_ldif.c:546:11: [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). len = strlen(src); data/sudo-1.9.3p1/plugins/sudoers/parse_ldif.c:658:12: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((ch = getc(fp)) == ' ') { data/sudo-1.9.3p1/plugins/sudoers/parse_ldif.c:669:22: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if (*line == '#' || mismatch) data/sudo-1.9.3p1/plugins/sudoers/policy.c:498:15: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). user_umask = umask(0); data/sudo-1.9.3p1/plugins/sudoers/policy.c:499:2: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(user_umask); data/sudo-1.9.3p1/plugins/sudoers/policy.c:538:19: [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). result_size = strlen(varname) + 1; data/sudo-1.9.3p1/plugins/sudoers/policy.c:540:17: [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). result_size += strlen(lm->value) + 1; data/sudo-1.9.3p1/plugins/sudoers/prompt.c:53:32: [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). for (p = old_prompt, len = strlen(old_prompt); *p; p++) { data/sudo-1.9.3p1/plugins/sudoers/prompt.c:58:14: [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). len += strlen(user_shost) - 2; data/sudo-1.9.3p1/plugins/sudoers/prompt.c:63:14: [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). len += strlen(user_host) - 2; data/sudo-1.9.3p1/plugins/sudoers/prompt.c:68:14: [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). len += strlen(auth_user) - 2; data/sudo-1.9.3p1/plugins/sudoers/prompt.c:73:14: [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). len += strlen(user_name) - 2; data/sudo-1.9.3p1/plugins/sudoers/prompt.c:78:14: [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). len += strlen(runas_pw->pw_name) - 2; data/sudo-1.9.3p1/plugins/sudoers/pwutil.c:287:21: [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). const size_t len = strlen(name) + 1; data/sudo-1.9.3p1/plugins/sudoers/pwutil.c:357:16: [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). name_len = strlen(user); data/sudo-1.9.3p1/plugins/sudoers/pwutil.c:358:16: [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). home_len = strlen(home); data/sudo-1.9.3p1/plugins/sudoers/pwutil.c:359:17: [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). shell_len = strlen(shell); data/sudo-1.9.3p1/plugins/sudoers/pwutil.c:597:21: [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). const size_t len = strlen(name) + 1; data/sudo-1.9.3p1/plugins/sudoers/pwutil.c:656:16: [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). name_len = strlen(group); data/sudo-1.9.3p1/plugins/sudoers/pwutil_impl.c:55:10: [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). size = strlen(src->name) + 1; \ data/sudo-1.9.3p1/plugins/sudoers/pwutil_impl.c:112:13: [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). ssize = strlen(pw_shell) + 1; data/sudo-1.9.3p1/plugins/sudoers/pwutil_impl.c:115:11: [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). total += strlen(name) + 1; data/sudo-1.9.3p1/plugins/sudoers/pwutil_impl.c:145:19: [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). memcpy(cp, name, strlen(name) + 1); data/sudo-1.9.3p1/plugins/sudoers/pwutil_impl.c:185:15: [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). total += strlen(gr->gr_mem[nmem]) + 1; data/sudo-1.9.3p1/plugins/sudoers/pwutil_impl.c:190:11: [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). total += strlen(name) + 1; data/sudo-1.9.3p1/plugins/sudoers/pwutil_impl.c:210:12: [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). len = strlen(gr->gr_mem[nmem]) + 1; data/sudo-1.9.3p1/plugins/sudoers/pwutil_impl.c:222:19: [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). memcpy(cp, name, strlen(name) + 1); data/sudo-1.9.3p1/plugins/sudoers/pwutil_impl.c:283:13: [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). nsize = strlen(pw->pw_name) + 1; data/sudo-1.9.3p1/plugins/sudoers/pwutil_impl.c:353:13: [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). nsize = strlen(pw->pw_name) + 1; data/sudo-1.9.3p1/plugins/sudoers/pwutil_impl.c:393:12: [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). len = strlen(grp->gr_name) + 1; data/sudo-1.9.3p1/plugins/sudoers/rcstr.c:45:18: [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). size_t len = strlen(src); data/sudo-1.9.3p1/plugins/sudoers/regress/iolog_plugin/check_iolog_plugin.c:267:40: [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). rc = sudoers_io.log_ttyout(output, strlen(output), &errstr); data/sudo-1.9.3p1/plugins/sudoers/regress/iolog_plugin/check_iolog_plugin.c:316:50: [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 (!validate_timing(fp, 1, IO_EVENT_TTYOUT, strlen(output), 0)) { data/sudo-1.9.3p1/plugins/sudoers/regress/logging/check_wrap.c:95:38: [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). writeln_wrap(stdout, lines[0], strlen(lines[0]), len); data/sudo-1.9.3p1/plugins/sudoers/regress/parser/check_base64.c:96:6: [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). strlen(test_strings[i].ascii), (char *)buf, sizeof(buf)); data/sudo-1.9.3p1/plugins/sudoers/regress/parser/check_digest.c:96:3: [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). strlen(test_strings[i]), &digest_len); data/sudo-1.9.3p1/plugins/sudoers/regress/parser/check_fill.c:140:12: [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). len = strlen(data[i].input); data/sudo-1.9.3p1/plugins/sudoers/starttime.c:148:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = read(fd, &psinfo, sizeof(psinfo)); data/sudo-1.9.3p1/plugins/sudoers/starttime.c:193:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((nread = read(fd, cp, buf + sizeof(buf) - cp)) != 0) { data/sudo-1.9.3p1/plugins/sudoers/sudoers.c:274:43: [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). iolog_path + sizeof("iolog_path=") - 1 + strlen(dir) + 1; data/sudo-1.9.3p1/plugins/sudoers/sudoers.c:993:11: [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). size += strlen(*av) + 1; data/sudo-1.9.3p1/plugins/sudoers/sudoers.c:1089:26: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (sb.st_size != 0 && fgetc(fp) == EOF) { data/sudo-1.9.3p1/plugins/sudoers/sudoers.h:123:12: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). mode_t umask; data/sudo-1.9.3p1/plugins/sudoers/sudoers.h:210:32: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). #define user_umask (sudo_user.umask) data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:444:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t nread = read(ttyfd, &ch, 1); data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:531:39: [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 (write(ttyfd, getsize_request, strlen(getsize_request)) == -1) { data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:598:27: [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 (write(ttyfd, buf, strlen(buf)) == -1) { data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:709:8: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (void)getchar(); data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:1181:30: [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(*av, "and", strlen(*av)) != 0) data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:1185:29: [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(*av, "or", strlen(*av)) != 0) data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:1197:30: [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(*av, "cwd", strlen(*av)) == 0) data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:1199:39: [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). else if (strncmp(*av, "command", strlen(*av)) == 0) data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:1205:35: [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(*av, "fromdate", strlen(*av)) != 0) data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:1210:32: [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(*av, "group", strlen(*av)) != 0) data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:1215:31: [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(*av, "host", strlen(*av)) != 0) data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:1220:32: [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(*av, "runas", strlen(*av)) != 0) data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:1227:33: [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(*av, "todate", strlen(*av)) == 0) data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:1229:35: [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). else if (strncmp(*av, "tty", strlen(*av)) == 0) data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:1235:31: [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(*av, "user", strlen(*av)) != 0) data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:1374:20: [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). cp = log_dir + strlen(session_dir) + 1; data/sudo-1.9.3p1/plugins/sudoers/sudoreplay.c:1542:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = read(fd, &ch, 1); data/sudo-1.9.3p1/plugins/sudoers/testsudoers.c:242:14: [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). size += strlen(*from) + 1; data/sudo-1.9.3p1/plugins/sudoers/timestamp.c:156:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (read(fd, &cur, sizeof(cur)) == sizeof(cur)) { data/sudo-1.9.3p1/plugins/sudoers/timestamp.c:196:13: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). omask = umask(ACCESSPERMS & ~(mode|parent_mode)); data/sudo-1.9.3p1/plugins/sudoers/timestamp.c:215:5: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(omask); data/sudo-1.9.3p1/plugins/sudoers/timestamp.c:588:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = read(cookie->fd, entry, sizeof(*entry)); data/sudo-1.9.3p1/plugins/sudoers/timestamp.c:657:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = read(cookie->fd, &entry, sizeof(entry)); data/sudo-1.9.3p1/plugins/sudoers/toke.c:2759:25: [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). # define NAMLEN(dirent) strlen((dirent)->d_name) data/sudo-1.9.3p1/plugins/sudoers/toke.c:2918:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (c = getc( sudoersin )) != EOF && c != '\n'; ++n ) \ data/sudo-1.9.3p1/plugins/sudoers/toke.c:4767:34: [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). return sudoers_scan_bytes(yystr,strlen(yystr) ); data/sudo-1.9.3p1/plugins/sudoers/toke.c:5080:8: [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). len = strlen(dirpath) + 1 + NAMLEN(dent); data/sudo-1.9.3p1/plugins/sudoers/toke.c:5227:18: [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). shost_len = strlen(user_shost); data/sudo-1.9.3p1/plugins/sudoers/toke.c:5279:39: [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 ((path = expand_include(opath, strlen(opath))) == NULL) data/sudo-1.9.3p1/plugins/sudoers/toke_util.c:85:9: [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). olen = strlen(sudoerslval.string); data/sudo-1.9.3p1/plugins/sudoers/tsdump.c:135:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((nread = read(fd, &cur, sizeof(cur))) == 0) data/sudo-1.9.3p1/plugins/sudoers/tsgetgrpw.c:153:11: [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). len = strlen(colon); data/sudo-1.9.3p1/plugins/sudoers/tsgetgrpw.c:267:11: [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). len = strlen(colon); data/sudo-1.9.3p1/plugins/sudoers/visudo.c:280:19: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((ch = getchar()) != EOF && ch != '\n') data/sudo-1.9.3p1/plugins/sudoers/visudo.c:314:44: [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). const char *def_editor_end = def_editor + strlen(def_editor); data/sudo-1.9.3p1/plugins/sudoers/visudo.c:400:20: [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). size_t blen = strlen(editor_base); data/sudo-1.9.3p1/plugins/sudoers/visudo.c:401:20: [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). size_t clen = strlen(++cp); data/sudo-1.9.3p1/plugins/sudoers/visudo.c:450:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((nread = read(sp->fd, buf, sizeof(buf))) > 0) { data/sudo-1.9.3p1/plugins/sudoers/visudo.c:660:16: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((ch = getchar()) != EOF && ch != '\n') data/sudo-1.9.3p1/plugins/sudoers/visudo.c:806:11: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). choice = getchar(); data/sudo-1.9.3p1/plugins/sudoers/visudo.c:808:10: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getchar(); data/sudo-1.9.3p1/plugins/sudoers/visudo.c:982:7: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = getchar(); data/sudo-1.9.3p1/plugins/sudoers/visudo.c:1278:22: [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). iov[0].iov_len = strlen(iov[0].iov_base); data/sudo-1.9.3p1/plugins/sudoers/visudo.c:1282:22: [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). iov[2].iov_len = strlen(iov[2].iov_base); data/sudo-1.9.3p1/src/conversation.c:83:24: [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). explicit_bzero(pass, strlen(pass)); data/sudo-1.9.3p1/src/conversation.c:90:20: [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). size_t len = strlen(msg->msg); data/sudo-1.9.3p1/src/conversation.c:138:28: [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). freezero(repl->reply, strlen(repl->reply)); data/sudo-1.9.3p1/src/copy_file.c:107:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((nread = read(src_fd, buf, sizeof(buf))) > 0) { data/sudo-1.9.3p1/src/env_hooks.c:165:18: [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). esize += strlen(val); /* glibc treats a NULL val as "" */ data/sudo-1.9.3p1/src/env_hooks.c:228:11: [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). len = strlen(var); data/sudo-1.9.3p1/src/exec.c:163:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (void) umask(details->umask); data/sudo-1.9.3p1/src/exec.c:163:24: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (void) umask(details->umask); data/sudo-1.9.3p1/src/exec_common.c:67:29: [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). const char *end = cp + strlen(cp); data/sudo-1.9.3p1/src/exec_common.c:69:29: [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). const size_t dso_len = strlen(dso_file); data/sudo-1.9.3p1/src/exec_monitor.c:311:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = read(fd, &errval, sizeof(errval)); data/sudo-1.9.3p1/src/exec_nopty.c:76:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = read(fd, &errval, sizeof(errval)); data/sudo-1.9.3p1/src/exec_pty.c:650:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(fd, iob->buf + iob->len, sizeof(iob->buf) - iob->len); data/sudo-1.9.3p1/src/parse_args.c:260:15: [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). proglen = strlen(progname); data/sudo-1.9.3p1/src/parse_args.c:612:3: [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). strlen(argv[argc - 1]) + 1; data/sudo-1.9.3p1/src/parse_args.c:730:17: [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). ulen = (int)strlen(getprogname()) + 8; data/sudo-1.9.3p1/src/sudo.c:583:12: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). mask = umask(0); data/sudo-1.9.3p1/src/sudo.c:584:5: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(mask); data/sudo-1.9.3p1/src/sudo.c:891:32: [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). const char *pathend = path + strlen(path); data/sudo-1.9.3p1/src/sudo.c:1338:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (void) umask(details->umask); data/sudo-1.9.3p1/src/sudo.c:1338:24: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (void) umask(details->umask); data/sudo-1.9.3p1/src/sudo.h:150:12: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). mode_t umask; data/sudo-1.9.3p1/src/sudo_edit.c:264:35: [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). tfd = mkstemps(*tfile, suff ? strlen(suff) : 0); data/sudo-1.9.3p1/src/sudo_edit.c:688:12: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). oldmask = umask(command_details->umask); data/sudo-1.9.3p1/src/sudo_edit.c:688:35: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). oldmask = umask(command_details->umask); data/sudo-1.9.3p1/src/sudo_edit.c:691:2: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(oldmask); data/sudo-1.9.3p1/src/tgetpass.c:220:28: [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 (write(output, prompt, strlen(prompt)) == -1) data/sudo-1.9.3p1/src/tgetpass.c:386:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nr = read(fd, &c, 1); data/sudo-1.9.3p1/src/ttyname.c:161:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = read(fd, &psinfo, sizeof(psinfo)); data/sudo-1.9.3p1/src/ttyname.c:207:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((nread = read(fd, cp, buf + sizeof(buf) - cp)) != 0) { data/sudo-1.9.3p1/src/utmp.c:118:13: [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). idlen = strlen(line); data/sudo-1.9.3p1/src/utmp.c:123:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(new->ut_id, line, idlen); data/sudo-1.9.3p1/src/utmp.c:162:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ut_new->ut_user, user_details.username, data/sudo-1.9.3p1/src/utmp.c:169:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ut_new->ut_user, user, sizeof(ut_new->ut_user)); data/sudo-1.9.3p1/src/utmp.c:170:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ut_new->ut_line, line, sizeof(ut_new->ut_line)); data/sudo-1.9.3p1/src/utmp.c:211:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(utbuf.ut_line, from_line, sizeof(utbuf.ut_line)); data/sudo-1.9.3p1/src/utmp.c:234:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(utbuf.ut_line, line, sizeof(utbuf.ut_line)); ANALYSIS SUMMARY: Hits = 1102 Lines analyzed = 132878 in approximately 3.47 seconds (38323 lines/second) Physical Source Lines of Code (SLOC) = 96040 Hits@level = [0] 444 [1] 344 [2] 610 [3] 38 [4] 91 [5] 19 Hits@level+ = [0+] 1546 [1+] 1102 [2+] 758 [3+] 148 [4+] 110 [5+] 19 Hits/KSLOC@level+ = [0+] 16.0975 [1+] 11.4744 [2+] 7.89254 [3+] 1.54102 [4+] 1.14536 [5+] 0.197834 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.