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/stress-ng-0.11.24/stress-netlink-task.c Examining data/stress-ng-0.11.24/stress-inotify.c Examining data/stress-ng-0.11.24/stress-watchdog.c Examining data/stress-ng-0.11.24/stress-sem.c Examining data/stress-ng-0.11.24/stress-idle-page.c Examining data/stress-ng-0.11.24/stress-cpu-online.c Examining data/stress-ng-0.11.24/stress-vm-addr.c Examining data/stress-ng-0.11.24/stress-tun.c Examining data/stress-ng-0.11.24/stress-apparmor.c Examining data/stress-ng-0.11.24/stress-mmapaddr.c Examining data/stress-ng-0.11.24/stress-sigpending.c Examining data/stress-ng-0.11.24/stress-inode-flags.c Examining data/stress-ng-0.11.24/stress-skiplist.c Examining data/stress-ng-0.11.24/stress-resources.c Examining data/stress-ng-0.11.24/stress-futex.c Examining data/stress-ng-0.11.24/stress-rawpkt.c Examining data/stress-ng-0.11.24/stress-mcontend.c Examining data/stress-ng-0.11.24/core-try-open.c Examining data/stress-ng-0.11.24/stress-sockmany.c Examining data/stress-ng-0.11.24/stress-binderfs.c Examining data/stress-ng-0.11.24/stress-fallocate.c Examining data/stress-ng-0.11.24/stress-sigsegv.c Examining data/stress-ng-0.11.24/stress-aio-linux.c Examining data/stress-ng-0.11.24/stress-sctp.c Examining data/stress-ng-0.11.24/stress-cache.c Examining data/stress-ng-0.11.24/stress-vm-rw.c Examining data/stress-ng-0.11.24/stress-seek.c Examining data/stress-ng-0.11.24/stress-stackmmap.c Examining data/stress-ng-0.11.24/stress-quota.c Examining data/stress-ng-0.11.24/stress-hrtimers.c Examining data/stress-ng-0.11.24/stress-klog.c Examining data/stress-ng-0.11.24/stress-funcret.c Examining data/stress-ng-0.11.24/core-perf-event.c Examining data/stress-ng-0.11.24/stress-readahead.c Examining data/stress-ng-0.11.24/stress-reboot.c Examining data/stress-ng-0.11.24/core-limit.c Examining data/stress-ng-0.11.24/stress-nop.c Examining data/stress-ng-0.11.24/stress-bigheap.c Examining data/stress-ng-0.11.24/stress-kcmp.c Examining data/stress-ng-0.11.24/core-job.c Examining data/stress-ng-0.11.24/stress-radixsort.c Examining data/stress-ng-0.11.24/stress-dev-shm.c Examining data/stress-ng-0.11.24/stress-rtc.c Examining data/stress-ng-0.11.24/stress-revio.c Examining data/stress-ng-0.11.24/stress-af-alg.c Examining data/stress-ng-0.11.24/stress-icmp-flood.c Examining data/stress-ng-0.11.24/stress-mmap.c Examining data/stress-ng-0.11.24/stress-mremap.c Examining data/stress-ng-0.11.24/stress-chattr.c Examining data/stress-ng-0.11.24/stress-copy-file.c Examining data/stress-ng-0.11.24/stress-sysbadaddr.c Examining data/stress-ng-0.11.24/stress-physpage.c Examining data/stress-ng-0.11.24/stress-bad-altstack.c Examining data/stress-ng-0.11.24/stress-eventfd.c Examining data/stress-ng-0.11.24/stress-rlimit.c Examining data/stress-ng-0.11.24/core-parse-opts.c Examining data/stress-ng-0.11.24/stress-pipeherd.c Examining data/stress-ng-0.11.24/stress-shm-sysv.c Examining data/stress-ng-0.11.24/stress-chdir.c Examining data/stress-ng-0.11.24/stress-vforkmany.c Examining data/stress-ng-0.11.24/stress-memcpy.c Examining data/stress-ng-0.11.24/stress-locka.c Examining data/stress-ng-0.11.24/stress-ptrace.c Examining data/stress-ng-0.11.24/stress-msync.c Examining data/stress-ng-0.11.24/core-mincore.c Examining data/stress-ng-0.11.24/stress-pthread.c Examining data/stress-ng-0.11.24/stress-lsearch.c Examining data/stress-ng-0.11.24/stress-full.c Examining data/stress-ng-0.11.24/stress-io-uring.c Examining data/stress-ng-0.11.24/stress-tee.c Examining data/stress-ng-0.11.24/stress-nanosleep.c Examining data/stress-ng-0.11.24/stress-sock.c Examining data/stress-ng-0.11.24/core-net.c Examining data/stress-ng-0.11.24/stress-lockofd.c Examining data/stress-ng-0.11.24/stress-fanotify.c Examining data/stress-ng-0.11.24/stress-filename.c Examining data/stress-ng-0.11.24/stress-get.c Examining data/stress-ng-0.11.24/core-shim.c Examining data/stress-ng-0.11.24/stress-poll.c Examining data/stress-ng-0.11.24/stress-stream.c Examining data/stress-ng-0.11.24/stress-dynlib.c Examining data/stress-ng-0.11.24/stress-uprobe.c Examining data/stress-ng-0.11.24/stress-nice.c Examining data/stress-ng-0.11.24/stress-sem-sysv.c Examining data/stress-ng-0.11.24/stress-sigtrap.c Examining data/stress-ng-0.11.24/stress-memrate.c Examining data/stress-ng-0.11.24/stress-kill.c Examining data/stress-ng-0.11.24/stress-crypt.c Examining data/stress-ng-0.11.24/stress-af-alg-defconfigs.h Examining data/stress-ng-0.11.24/stress-fp-error.c Examining data/stress-ng-0.11.24/stress-loop.c Examining data/stress-ng-0.11.24/stress-sockabuse.c Examining data/stress-ng-0.11.24/stress-bind-mount.c Examining data/stress-ng-0.11.24/stress-numa.c Examining data/stress-ng-0.11.24/stress-unshare.c Examining data/stress-ng-0.11.24/stress-sendfile.c Examining data/stress-ng-0.11.24/core-out-of-memory.c Examining data/stress-ng-0.11.24/stress-stack.c Examining data/stress-ng-0.11.24/stress-chown.c Examining data/stress-ng-0.11.24/stress-key.c Examining data/stress-ng-0.11.24/stress-zlib.c Examining data/stress-ng-0.11.24/stress-flock.c Examining data/stress-ng-0.11.24/core-ignite-cpu.c Examining data/stress-ng-0.11.24/stress-malloc.c Examining data/stress-ng-0.11.24/stress-sleep.c Examining data/stress-ng-0.11.24/stress-itimer.c Examining data/stress-ng-0.11.24/stress-heapsort.c Examining data/stress-ng-0.11.24/stress-pidfd.c Examining data/stress-ng-0.11.24/stress-dccp.c Examining data/stress-ng-0.11.24/stress-remap-file-pages.c Examining data/stress-ng-0.11.24/stress-enosys.c Examining data/stress-ng-0.11.24/stress-tsearch.c Examining data/stress-ng-0.11.24/stress-judy.c Examining data/stress-ng-0.11.24/stress-verity.c Examining data/stress-ng-0.11.24/core-madvise.c Examining data/stress-ng-0.11.24/core-perf.c Examining data/stress-ng-0.11.24/stress-dentry.c Examining data/stress-ng-0.11.24/stress-bad-ioctl.c Examining data/stress-ng-0.11.24/stress-rawdev.c Examining data/stress-ng-0.11.24/stress-zero.c Examining data/stress-ng-0.11.24/stress-timerfd.c Examining data/stress-ng-0.11.24/stress-netlink-proc.c Examining data/stress-ng-0.11.24/stress-lease.c Examining data/stress-ng-0.11.24/stress-epoll.c Examining data/stress-ng-0.11.24/stress-zombie.c Examining data/stress-ng-0.11.24/stress-bsearch.c Examining data/stress-ng-0.11.24/stress-exec.c Examining data/stress-ng-0.11.24/stress-fiemap.c Examining data/stress-ng-0.11.24/stress-lockf.c Examining data/stress-ng-0.11.24/stress-clone.c Examining data/stress-ng-0.11.24/core-cpu.c Examining data/stress-ng-0.11.24/stress-memthrash.c Examining data/stress-ng-0.11.24/stress-context.c Examining data/stress-ng-0.11.24/core-io-priority.c Examining data/stress-ng-0.11.24/stress-urandom.c Examining data/stress-ng-0.11.24/stress-brk.c Examining data/stress-ng-0.11.24/stress-hsearch.c Examining data/stress-ng-0.11.24/stress-oom-pipe.c Examining data/stress-ng-0.11.24/stress-getrandom.c Examining data/stress-ng-0.11.24/stress-pkey.c Examining data/stress-ng-0.11.24/stress-vm-segv.c Examining data/stress-ng-0.11.24/stress-ioprio.c Examining data/stress-ng-0.11.24/test/test-uname.c Examining data/stress-ng-0.11.24/test/test-faccessat.c Examining data/stress-ng-0.11.24/test/test-getpgrp.c Examining data/stress-ng-0.11.24/test/test-int128_t.c Examining data/stress-ng-0.11.24/test/test-shminfo.c Examining data/stress-ng-0.11.24/test/test-settimeofday.c Examining data/stress-ng-0.11.24/test/test-posix-spawn.c Examining data/stress-ng-0.11.24/test/test-sendmmsg.c Examining data/stress-ng-0.11.24/test/test-chroot.c Examining data/stress-ng-0.11.24/test/test-wcsfunc.c Examining data/stress-ng-0.11.24/test/test-openat.c Examining data/stress-ng-0.11.24/test/test-pselect.c Examining data/stress-ng-0.11.24/test/test-sem-posix.c Examining data/stress-ng-0.11.24/test/test-pkey-mprotect.c Examining data/stress-ng-0.11.24/test/test-serial-struct.c Examining data/stress-ng-0.11.24/test/test-sock-diag.c Examining data/stress-ng-0.11.24/test/test-builtin-memcpy.c Examining data/stress-ng-0.11.24/test/test-waitid.c Examining data/stress-ng-0.11.24/test/test-syncfs.c Examining data/stress-ng-0.11.24/test/test-accept4.c Examining data/stress-ng-0.11.24/test/test-libaio.c Examining data/stress-ng-0.11.24/test/test-getxattr.c Examining data/stress-ng-0.11.24/test/test-dm_ioctl.c Examining data/stress-ng-0.11.24/test/test-libcrypt.c Examining data/stress-ng-0.11.24/test/test-sched-getaffinity.c Examining data/stress-ng-0.11.24/test/test-fanotify.c Examining data/stress-ng-0.11.24/test/test-pidfd-open.c Examining data/stress-ng-0.11.24/test/test-epoll-create1.c Examining data/stress-ng-0.11.24/test/test-lremovexattr.c Examining data/stress-ng-0.11.24/test/test-pidfd-getfd.c Examining data/stress-ng-0.11.24/test/test-v4l2_capability.c Examining data/stress-ng-0.11.24/test/test-builtin-ctz.c Examining data/stress-ng-0.11.24/test/test-sysinfo.c Examining data/stress-ng-0.11.24/test/test-pthread-attr-setstack.c Examining data/stress-ng-0.11.24/test/test-clock-gettime.c Examining data/stress-ng-0.11.24/test/test-cdrom_mcn.c Examining data/stress-ng-0.11.24/test/test-utimensat.c Examining data/stress-ng-0.11.24/test/test-mincore.c Examining data/stress-ng-0.11.24/test/test-complex.c Examining data/stress-ng-0.11.24/test/test-off64_t.c Examining data/stress-ng-0.11.24/test/test-ppoll.c Examining data/stress-ng-0.11.24/test/test-renameat2.c Examining data/stress-ng-0.11.24/test/test-cdrom_tocentry.c Examining data/stress-ng-0.11.24/test/test-aligned-64.c Examining data/stress-ng-0.11.24/test/test-media_device_info.c Examining data/stress-ng-0.11.24/test/test-msync.c Examining data/stress-ng-0.11.24/test/test-madvise.c Examining data/stress-ng-0.11.24/test/test-personality.c Examining data/stress-ng-0.11.24/test/test-nice.c Examining data/stress-ng-0.11.24/test/test-getresgid.c Examining data/stress-ng-0.11.24/test/test-builtin-prefetch.c Examining data/stress-ng-0.11.24/test/test-libsctp.c Examining data/stress-ng-0.11.24/test/test-sem-sysv.c Examining data/stress-ng-0.11.24/test/test-inotify1.c Examining data/stress-ng-0.11.24/test/test-vhangup.c Examining data/stress-ng-0.11.24/test/test-tee.c Examining data/stress-ng-0.11.24/test/test-swapcontext.c Examining data/stress-ng-0.11.24/test/test-fgetxattr.c Examining data/stress-ng-0.11.24/test/test-v4l2_framebuffer.c Examining data/stress-ng-0.11.24/test/test-ptrace.c Examining data/stress-ng-0.11.24/test/test-statfs.c Examining data/stress-ng-0.11.24/test/test-clone.c Examining data/stress-ng-0.11.24/test/test-aligned-64K.c Examining data/stress-ng-0.11.24/test/test-setresuid.c Examining data/stress-ng-0.11.24/test/test-sched-getcpu.c Examining data/stress-ng-0.11.24/test/test-tcflush.c Examining data/stress-ng-0.11.24/test/test-aligned-128.c Examining data/stress-ng-0.11.24/test/test-unshare.c Examining data/stress-ng-0.11.24/test/test-target-clones.c Examining data/stress-ng-0.11.24/test/test-kbentry.c Examining data/stress-ng-0.11.24/test/test-affinity.c Examining data/stress-ng-0.11.24/test/test-futimes.c Examining data/stress-ng-0.11.24/test/test-timer-delete.c Examining data/stress-ng-0.11.24/test/test-llistxattr.c Examining data/stress-ng-0.11.24/test/test-getresuid.c Examining data/stress-ng-0.11.24/test/test-kbkeycode.c Examining data/stress-ng-0.11.24/test/test-sigwaitinfo.c Examining data/stress-ng-0.11.24/test/test-getsid.c Examining data/stress-ng-0.11.24/test/test-executable_start.c Examining data/stress-ng-0.11.24/test/test-getauxval.c Examining data/stress-ng-0.11.24/test/test-v4l2_enc_idx.c Examining data/stress-ng-0.11.24/test/test-mtrr_gentry.c Examining data/stress-ng-0.11.24/test/test-aio-cancel.c Examining data/stress-ng-0.11.24/test/test-getpagesize.c Examining data/stress-ng-0.11.24/test/test-pkey-alloc.c Examining data/stress-ng-0.11.24/test/test-clock-nanosleep.c Examining data/stress-ng-0.11.24/test/test-kernel_long_t.c Examining data/stress-ng-0.11.24/test/test-builtin-cpu-is.c Examining data/stress-ng-0.11.24/test/test-vt_sizes.c Examining data/stress-ng-0.11.24/test/test-remap-file-pages.c Examining data/stress-ng-0.11.24/test/test-fsetxattr.c Examining data/stress-ng-0.11.24/test/test-fremovexattr.c Examining data/stress-ng-0.11.24/test/test-consolefontdesc.c Examining data/stress-ng-0.11.24/test/test-fchmodat.c Examining data/stress-ng-0.11.24/test/test-shmid-ds.c Examining data/stress-ng-0.11.24/test/test-eventfd.c Examining data/stress-ng-0.11.24/test/test-setfsuid.c Examining data/stress-ng-0.11.24/test/test-unlinkat.c Examining data/stress-ng-0.11.24/test/test-posix-openpt.c Examining data/stress-ng-0.11.24/test/test-posix-fadvise.c Examining data/stress-ng-0.11.24/test/test-signalfd.c Examining data/stress-ng-0.11.24/test/test-stime.c Examining data/stress-ng-0.11.24/test/test-posix-fallocate.c Examining data/stress-ng-0.11.24/test/test-brk.c Examining data/stress-ng-0.11.24/test/test-posix-madvise.c Examining data/stress-ng-0.11.24/test/test-wait4.c Examining data/stress-ng-0.11.24/test/test-aio-write.c Examining data/stress-ng-0.11.24/test/test-timer-gettime.c Examining data/stress-ng-0.11.24/test/test-v4l2_std_id.c Examining data/stress-ng-0.11.24/test/test-cdrom_tochdr.c Examining data/stress-ng-0.11.24/test/test-mlock.c Examining data/stress-ng-0.11.24/test/test-posix-memalign.c Examining data/stress-ng-0.11.24/test/test-timer-settime.c Examining data/stress-ng-0.11.24/test/test-setpwent.c Examining data/stress-ng-0.11.24/test/test-process-vm-readv.c Examining data/stress-ng-0.11.24/test/test-termios.c Examining data/stress-ng-0.11.24/test/test-cdrom_ti.c Examining data/stress-ng-0.11.24/test/test-libipsec-mb.c Examining data/stress-ng-0.11.24/test/test-snd_ctl_card_info.c Examining data/stress-ng-0.11.24/test/test-unimapdesc.c Examining data/stress-ng-0.11.24/test/test-lockf.c Examining data/stress-ng-0.11.24/test/test-lookup-dcookie.c Examining data/stress-ng-0.11.24/test/test-atomic_add_fetch.c Examining data/stress-ng-0.11.24/test/test-getpwent.c Examining data/stress-ng-0.11.24/test/test-linkat.c Examining data/stress-ng-0.11.24/test/test-epoll-create.c Examining data/stress-ng-0.11.24/test/test-cdrom_msf.c Examining data/stress-ng-0.11.24/test/test-fdatasync.c Examining data/stress-ng-0.11.24/test/test-msginfo.c Examining data/stress-ng-0.11.24/test/test-tcgetattr.c Examining data/stress-ng-0.11.24/test/test-setns.c Examining data/stress-ng-0.11.24/test/test-pthread_sigqueue.c Examining data/stress-ng-0.11.24/test/test-kbsentry.c Examining data/stress-ng-0.11.24/test/test-splice.c Examining data/stress-ng-0.11.24/test/test-v4l2_dv_timings.c Examining data/stress-ng-0.11.24/test/test-mathfunc.c Examining data/stress-ng-0.11.24/test/test-mq-sysv.c Examining data/stress-ng-0.11.24/test/test-vt_stat.c Examining data/stress-ng-0.11.24/test/test-setxattr.c Examining data/stress-ng-0.11.24/test/test-clock-settime.c Examining data/stress-ng-0.11.24/test/test-prctl.c Examining data/stress-ng-0.11.24/test/test-nanosleep.c Examining data/stress-ng-0.11.24/test/test-mremap.c Examining data/stress-ng-0.11.24/test/test-icmphdr.c Examining data/stress-ng-0.11.24/test/test-process-vm-writev.c Examining data/stress-ng-0.11.24/test/test-pwritev2.c Examining data/stress-ng-0.11.24/test/test-sched-get-priority-max.c Examining data/stress-ng-0.11.24/test/test-flistxattr.c Examining data/stress-ng-0.11.24/test/test-tcflow.c Examining data/stress-ng-0.11.24/test/test-setreuid.c Examining data/stress-ng-0.11.24/test/test-modify-ldt.c Examining data/stress-ng-0.11.24/test/test-getmntent.c Examining data/stress-ng-0.11.24/test/test-mprotect.c Examining data/stress-ng-0.11.24/test/test-user-desc.c Examining data/stress-ng-0.11.24/test/test-munlock.c Examining data/stress-ng-0.11.24/test/test-dvd_struct.c Examining data/stress-ng-0.11.24/test/test-loff_t.c Examining data/stress-ng-0.11.24/test/test-vt_consize.c Examining data/stress-ng-0.11.24/test/test-recvmmsg.c Examining data/stress-ng-0.11.24/test/test-serial-icounter.c Examining data/stress-ng-0.11.24/test/test-fallocate.c Examining data/stress-ng-0.11.24/test/test-asm-nop.c Examining data/stress-ng-0.11.24/test/test-setpriority.c Examining data/stress-ng-0.11.24/test/test-fsverity_enable_arg.c Examining data/stress-ng-0.11.24/test/test-wait3.c Examining data/stress-ng-0.11.24/test/test-listxattr.c Examining data/stress-ng-0.11.24/test/test-fsverity_digest.c Examining data/stress-ng-0.11.24/test/test-snd_ctl_tlv.c Examining data/stress-ng-0.11.24/test/test-daddr_t.c Examining data/stress-ng-0.11.24/test/test-gethostname.c Examining data/stress-ng-0.11.24/test/test-ioport.c Examining data/stress-ng-0.11.24/test/test-shm-sysv.c Examining data/stress-ng-0.11.24/test/test-mknodat.c Examining data/stress-ng-0.11.24/test/test-endpwent.c Examining data/stress-ng-0.11.24/test/test-clock-getres.c Examining data/stress-ng-0.11.24/test/test-setdomainname.c Examining data/stress-ng-0.11.24/test/test-gethostid.c Examining data/stress-ng-0.11.24/test/test-clearenv.c Examining data/stress-ng-0.11.24/test/test-apparmor.c Examining data/stress-ng-0.11.24/test/test-libpthread.c Examining data/stress-ng-0.11.24/test/test-ifconf.c Examining data/stress-ng-0.11.24/test/test-preadv.c Examining data/stress-ng-0.11.24/test/test-strfunc.c Examining data/stress-ng-0.11.24/test/test-cap.c Examining data/stress-ng-0.11.24/test/test-open_how.c Examining data/stress-ng-0.11.24/test/test-sync-file-range.c Examining data/stress-ng-0.11.24/test/test-ustat.c Examining data/stress-ng-0.11.24/test/test-semtimedop.c Examining data/stress-ng-0.11.24/test/test-judy.c Examining data/stress-ng-0.11.24/test/test-pidfd-send-signal.c Examining data/stress-ng-0.11.24/test/test-float.c Examining data/stress-ng-0.11.24/test/test-arch_prctl.c Examining data/stress-ng-0.11.24/test/test-dvd_authinfo.c Examining data/stress-ng-0.11.24/test/test-sched-yield.c Examining data/stress-ng-0.11.24/test/test-renameat.c Examining data/stress-ng-0.11.24/test/test-bsd-wchar.c Examining data/stress-ng-0.11.24/test/test-sbrk.c Examining data/stress-ng-0.11.24/test/test-cdrom_read_audio.c Examining data/stress-ng-0.11.24/test/test-getpgid.c Examining data/stress-ng-0.11.24/test/test-timer-create.c Examining data/stress-ng-0.11.24/test/test-fchownat.c Examining data/stress-ng-0.11.24/test/test-ptsname.c Examining data/stress-ng-0.11.24/test/test-libbsd.c Examining data/stress-ng-0.11.24/test/test-kernel_ulong_t.c Examining data/stress-ng-0.11.24/test/test-preadv2.c Examining data/stress-ng-0.11.24/test/test-vla-arg.c Examining data/stress-ng-0.11.24/test/test-removexattr.c Examining data/stress-ng-0.11.24/test/test-libz.c Examining data/stress-ng-0.11.24/test/test-adjtime.c Examining data/stress-ng-0.11.24/test/test-copy-file-range.c Examining data/stress-ng-0.11.24/test/test-crypt-r.c Examining data/stress-ng-0.11.24/test/test-sched-get-priority-min.c Examining data/stress-ng-0.11.24/test/test-builtin-sfence.c Examining data/stress-ng-0.11.24/test/test-prlimit.c Examining data/stress-ng-0.11.24/test/test-mq-posix.c Examining data/stress-ng-0.11.24/test/test-setpgid.c Examining data/stress-ng-0.11.24/test/test-sched-setscheduler.c Examining data/stress-ng-0.11.24/test/test-setfsgid.c Examining data/stress-ng-0.11.24/test/test-getpriority.c Examining data/stress-ng-0.11.24/test/test-dup3.c Examining data/stress-ng-0.11.24/test/test-pwritev.c Examining data/stress-ng-0.11.24/test/test-cdrom_volctrl.c Examining data/stress-ng-0.11.24/test/test-swap.c Examining data/stress-ng-0.11.24/test/test-cpuid.c Examining data/stress-ng-0.11.24/test/test-getdtablesize.c Examining data/stress-ng-0.11.24/test/test-readlinkat.c Examining data/stress-ng-0.11.24/test/test-getdomainname.c Examining data/stress-ng-0.11.24/test/test-futimens.c Examining data/stress-ng-0.11.24/test/test-libpthread-spinlock.c Examining data/stress-ng-0.11.24/test/test-kbdiacrs.c Examining data/stress-ng-0.11.24/test/test-sigqueue.c Examining data/stress-ng-0.11.24/test/test-builtin-memmove.c Examining data/stress-ng-0.11.24/test/test-mlock2.c Examining data/stress-ng-0.11.24/test/test-tcdrain.c Examining data/stress-ng-0.11.24/test/test-wchar.c Examining data/stress-ng-0.11.24/test/test-ttyname.c Examining data/stress-ng-0.11.24/test/test-cdrom_blk.c Examining data/stress-ng-0.11.24/test/test-sigaltstack.c Examining data/stress-ng-0.11.24/test/test-open-by-handle-at.c Examining data/stress-ng-0.11.24/test/test-label-as-value.c Examining data/stress-ng-0.11.24/test/test-darn.c Examining data/stress-ng-0.11.24/test/test-v4l2_audio.c Examining data/stress-ng-0.11.24/test/test-pkey-free.c Examining data/stress-ng-0.11.24/test/test-ppc-get-timebase.c Examining data/stress-ng-0.11.24/test/test-cdrom_subchnl.c Examining data/stress-ng-0.11.24/test/test-fsync.c Examining data/stress-ng-0.11.24/test/test-librt.c Examining data/stress-ng-0.11.24/test/test-inotify.c Examining data/stress-ng-0.11.24/test/test-libdl.c Examining data/stress-ng-0.11.24/test/test-pipe2.c Examining data/stress-ng-0.11.24/test/test-aio-read.c Examining data/stress-ng-0.11.24/test/test-memfd-create.c Examining data/stress-ng-0.11.24/test/test-setresgid.c Examining data/stress-ng-0.11.24/test/test-adjtimex.c Examining data/stress-ng-0.11.24/test/test-getmntinfo.c Examining data/stress-ng-0.11.24/test/test-lsetxattr.c Examining data/stress-ng-0.11.24/test/test-mlockall.c Examining data/stress-ng-0.11.24/test/test-flock.c Examining data/stress-ng-0.11.24/test/test-ino64_t.c Examining data/stress-ng-0.11.24/test/test-setpgrp.c Examining data/stress-ng-0.11.24/test/test-mallopt.c Examining data/stress-ng-0.11.24/test/test-execveat.c Examining data/stress-ng-0.11.24/test/test-mkdirat.c Examining data/stress-ng-0.11.24/test/test-lgetxattr.c Examining data/stress-ng-0.11.24/test/test-winsize.c Examining data/stress-ng-0.11.24/test/test-setregid.c Examining data/stress-ng-0.11.24/test/test-timer-getoverrun.c Examining data/stress-ng-0.11.24/test/test-v4l2_jpegcompression.c Examining data/stress-ng-0.11.24/test/test-name-to-handle-at.c Examining data/stress-ng-0.11.24/test/test-sched-rr-get-interval.c Examining data/stress-ng-0.11.24/test/test-setproctitle.c Examining data/stress-ng-0.11.24/test/test-faccessat2.c Examining data/stress-ng-0.11.24/test/test-v4l2_audioout.c Examining data/stress-ng-0.11.24/test/test-vmsplice.c Examining data/stress-ng-0.11.24/test/test-vt_mode.c Examining data/stress-ng-0.11.24/stress-chroot.c Examining data/stress-ng-0.11.24/stress-icache.c Examining data/stress-ng-0.11.24/stress-longjmp.c Examining data/stress-ng-0.11.24/stress-seal.c Examining data/stress-ng-0.11.24/stress-rawsock.c Examining data/stress-ng-0.11.24/stress-tsc.c Examining data/stress-ng-0.11.24/stress-qsort.c Examining data/stress-ng-0.11.24/stress-dev.c Examining data/stress-ng-0.11.24/stress-mmapfork.c Examining data/stress-ng-0.11.24/stress-yield.c Examining data/stress-ng-0.11.24/core-mounts.c Examining data/stress-ng-0.11.24/stress-xattr.c Examining data/stress-ng-0.11.24/stress-null.c Examining data/stress-ng-0.11.24/stress-close.c Examining data/stress-ng-0.11.24/stress-udp.c Examining data/stress-ng-0.11.24/stress-str.c Examining data/stress-ng-0.11.24/stress-shm.c Examining data/stress-ng-0.11.24/stress-opcode.c Examining data/stress-ng-0.11.24/stress-pipe.c Examining data/stress-ng-0.11.24/stress-dup.c Examining data/stress-ng-0.11.24/core-setting.c Examining data/stress-ng-0.11.24/stress-sigpipe.c Examining data/stress-ng-0.11.24/stress-matrix.c Examining data/stress-ng-0.11.24/stress-switch.c Examining data/stress-ng-0.11.24/stress-link.c Examining data/stress-ng-0.11.24/stress-matrix-3d.c Examining data/stress-ng-0.11.24/stress-mergesort.c Examining data/stress-ng-0.11.24/core-ftrace.c Examining data/stress-ng-0.11.24/stress-rmap.c Examining data/stress-ng-0.11.24/stress-wcstr.c Examining data/stress-ng-0.11.24/stress-vm-splice.c Examining data/stress-ng-0.11.24/stress-open.c Examining data/stress-ng-0.11.24/stress-sockpair.c Examining data/stress-ng-0.11.24/core-personality.c Examining data/stress-ng-0.11.24/stress-sigfd.c Examining data/stress-ng-0.11.24/stress-efivar.c Examining data/stress-ng-0.11.24/stress-mknod.c Examining data/stress-ng-0.11.24/stress-spawn.c Examining data/stress-ng-0.11.24/stress-sigio.c Examining data/stress-ng-0.11.24/stress-version.h Examining data/stress-ng-0.11.24/stress-memfd.c Examining data/stress-ng-0.11.24/stress-session.c Examining data/stress-ng-0.11.24/stress-wait.c Examining data/stress-ng-0.11.24/stress-cap.c Examining data/stress-ng-0.11.24/stress-mincore.c Examining data/stress-ng-0.11.24/stress-membarrier.c Examining data/stress-ng-0.11.24/stress-sysinval.c Examining data/stress-ng-0.11.24/stress-utime.c Examining data/stress-ng-0.11.24/stress-splice.c Examining data/stress-ng-0.11.24/stress-mmapmany.c Examining data/stress-ng-0.11.24/stress-ng.c Examining data/stress-ng-0.11.24/stress-seccomp.c Examining data/stress-ng-0.11.24/stress-mq.c Examining data/stress-ng-0.11.24/stress-pty.c Examining data/stress-ng-0.11.24/stress-sysinfo.c Examining data/stress-ng-0.11.24/stress-memhotplug.c Examining data/stress-ng-0.11.24/stress-vm.c Examining data/stress-ng-0.11.24/stress-getdent.c Examining data/stress-ng-0.11.24/stress-sigfpe.c Examining data/stress-ng-0.11.24/stress-udp-flood.c Examining data/stress-ng-0.11.24/stress-dirdeep.c Examining data/stress-ng-0.11.24/stress-timer.c Examining data/stress-ng-0.11.24/stress-tlb-shootdown.c Examining data/stress-ng-0.11.24/stress-fifo.c Examining data/stress-ng-0.11.24/stress-schedpolicy.c Examining data/stress-ng-0.11.24/stress-set.c Examining data/stress-ng-0.11.24/stress-clock.c Examining data/stress-ng-0.11.24/stress-dir.c Examining data/stress-ng-0.11.24/core-affinity.c Examining data/stress-ng-0.11.24/stress-softlockup.c Examining data/stress-ng-0.11.24/core-hash.c Examining data/stress-ng-0.11.24/stress-sigsuspend.c Examining data/stress-ng-0.11.24/stress-ramfs.c Examining data/stress-ng-0.11.24/stress-userfaultfd.c Examining data/stress-ng-0.11.24/stress-rename.c Examining data/stress-ng-0.11.24/stress-madvise.c Examining data/stress-ng-0.11.24/stress-fault.c Examining data/stress-ng-0.11.24/stress-shellsort.c Examining data/stress-ng-0.11.24/stress-ipsec-mb.c Examining data/stress-ng-0.11.24/stress-iomix.c Examining data/stress-ng-0.11.24/stress-funccall.c Examining data/stress-ng-0.11.24/stress-mlockmany.c Examining data/stress-ng-0.11.24/stress-sigq.c Examining data/stress-ng-0.11.24/stress-rawudp.c Examining data/stress-ng-0.11.24/stress-sigrt.c Examining data/stress-ng-0.11.24/stress-sigchld.c Examining data/stress-ng-0.11.24/stress-ioport.c Examining data/stress-ng-0.11.24/stress-rdrand.c Examining data/stress-ng-0.11.24/stress-procfs.c Examining data/stress-ng-0.11.24/stress-signal.c Examining data/stress-ng-0.11.24/stress-ng.h Examining data/stress-ng-0.11.24/stress-vecmath.c Examining data/stress-ng-0.11.24/core-sched.c Examining data/stress-ng-0.11.24/core-io-uring.c Examining data/stress-ng-0.11.24/stress-vdso.c Examining data/stress-ng-0.11.24/core-mmap.c Examining data/stress-ng-0.11.24/stress-daemon.c Examining data/stress-ng-0.11.24/stress-cpu.c Examining data/stress-ng-0.11.24/stress-tmpfs.c Examining data/stress-ng-0.11.24/stress-file-ioctl.c Examining data/stress-ng-0.11.24/stress-cyclic.c Examining data/stress-ng-0.11.24/core-time.c Examining data/stress-ng-0.11.24/stress-handle.c Examining data/stress-ng-0.11.24/stress-fork.c Examining data/stress-ng-0.11.24/stress-mlock.c Examining data/stress-ng-0.11.24/stress-env.c Examining data/stress-ng-0.11.24/stress-netdev.c Examining data/stress-ng-0.11.24/stress-chmod.c Examining data/stress-ng-0.11.24/core-thrash.c Examining data/stress-ng-0.11.24/stress-sockdiag.c Examining data/stress-ng-0.11.24/stress-aio.c Examining data/stress-ng-0.11.24/core-thermal-zone.c Examining data/stress-ng-0.11.24/stress-fstat.c Examining data/stress-ng-0.11.24/stress-fcntl.c Examining data/stress-ng-0.11.24/stress-atomic.c Examining data/stress-ng-0.11.24/stress-lockbus.c Examining data/stress-ng-0.11.24/stress-x86syscall.c Examining data/stress-ng-0.11.24/stress-personality.c Examining data/stress-ng-0.11.24/core-log.c Examining data/stress-ng-0.11.24/stress-hdd.c Examining data/stress-ng-0.11.24/stress-iosync.c Examining data/stress-ng-0.11.24/stress-sysfs.c Examining data/stress-ng-0.11.24/stress-sigabrt.c Examining data/stress-ng-0.11.24/stress-sockfd.c Examining data/stress-ng-0.11.24/stress-dnotify.c Examining data/stress-ng-0.11.24/stress-prctl.c Examining data/stress-ng-0.11.24/core-mlock.c Examining data/stress-ng-0.11.24/stress-access.c Examining data/stress-ng-0.11.24/stress-msg.c Examining data/stress-ng-0.11.24/core-helper.c Examining data/stress-ng-0.11.24/stress-sync-file.c Examining data/stress-ng-0.11.24/core-mwc.c Examining data/stress-ng-0.11.24/stress-swap.c Examining data/stress-ng-0.11.24/stress-branch.c Examining data/stress-ng-0.11.24/stress-tree.c Examining data/stress-ng-0.11.24/stress-mmapfixed.c Examining data/stress-ng-0.11.24/stress-affinity.c Examining data/stress-ng-0.11.24/core-cache.c FINAL RESULTS: data/stress-ng-0.11.24/core-shim.c:1833:9: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. return readlink(pathname, buf, bufsiz); data/stress-ng-0.11.24/stress-chmod.c:131:8: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. CHECK(chmod(filename, modes[i]) < 0); data/stress-ng-0.11.24/stress-chmod.c:132:8: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. CHECK(chmod(filename, mask) < 0); data/stress-ng-0.11.24/stress-chmod.c:133:8: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. CHECK(chmod(filename, modes[i] ^ all_mask) < 0); data/stress-ng-0.11.24/stress-chmod.c:134:8: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. CHECK(chmod(filename, mask ^ all_mask) < 0); data/stress-ng-0.11.24/stress-chown.c:208:18: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. ret = do_chown(chown, filename, cap_chown, uid, gid); data/stress-ng-0.11.24/stress-dnotify.c:203: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(path, S_IRUSR | S_IWUSR) < 0) { data/stress-ng-0.11.24/stress-inotify.c:425: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(path, S_IRUSR | S_IWUSR) < 0) { data/stress-ng-0.11.24/stress-ng.h:2291:8: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. MACRO(chmod) \ data/stress-ng-0.11.24/stress-ng.h:2292:8: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. MACRO(chown) \ data/stress-ng-0.11.24/stress-sysbadaddr.c:226: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((char *)addr, 0); data/stress-ng-0.11.24/stress-sysbadaddr.c:231:9: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. return chown((char *)addr, getuid(), getgid()); data/stress-ng-0.11.24/stress-sysinval.c:310:12: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. #if DEFSYS(chmod) data/stress-ng-0.11.24/stress-sysinval.c:311:8: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. { SYS(chmod), 2, { ARG_PTR | ARG_EMPTY_FILENAME, ARG_INT, 0, 0, 0, 0 } }, data/stress-ng-0.11.24/stress-sysinval.c:313:12: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. #if DEFSYS(chown) data/stress-ng-0.11.24/stress-sysinval.c:314:8: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. { SYS(chown), 2, { ARG_PTR | ARG_EMPTY_FILENAME, ARG_INT, 0, 0, 0, 0 } }, data/stress-ng-0.11.24/stress-sysinval.c:1151:12: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. #if DEFSYS(readlink) data/stress-ng-0.11.24/stress-sysinval.c:1152:8: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. { SYS(readlink), 3, { ARG_EMPTY_FILENAME, ARG_PTR, ARG_LEN, 0, 0, 0 } }, data/stress-ng-0.11.24/stress-sysinval.c:1153:8: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. { SYS(readlink), 3, { ARG_EMPTY_FILENAME, ARG_PTR_WR, ARG_LEN, 0, 0, 0 } }, data/stress-ng-0.11.24/stress-sysinval.c:1154:8: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. { SYS(readlink), 3, { ARG_DEVNULL_FILENAME, ARG_PTR, ARG_LEN, 0, 0, 0 } }, data/stress-ng-0.11.24/stress-sysinval.c:1155:8: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. { SYS(readlink), 3, { ARG_DEVNULL_FILENAME, ARG_PTR_WR, ARG_LEN, 0, 0, 0 } }, data/stress-ng-0.11.24/core-helper.c:676:6: [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(path, R_OK | W_OK) < 0) { data/stress-ng-0.11.24/core-helper.c:697: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. return snprintf(path, len, "%s/tmp-%s-%d-%" data/stress-ng-0.11.24/core-helper.c:730: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. return snprintf(path, len, "%s/tmp-%s-%d-%" PRIu32, data/stress-ng-0.11.24/core-helper.c:824:6: [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(path, R_OK | W_OK)) { data/stress-ng-0.11.24/core-ignite-cpu.c:128:11: [4] (buffer) sscanf: 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. If the scanf format is influenceable by an attacker, it's exploitable. ret = sscanf(buffer, "%" SCNu64, data/stress-ng-0.11.24/core-ignite-cpu.c:140:11: [4] (buffer) sscanf: 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. If the scanf format is influenceable by an attacker, it's exploitable. ret = sscanf(buffer, "%" SCNu64, data/stress-ng-0.11.24/core-log.c:111:9: [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. ret = vfprintf(fp, fmt, ap); data/stress-ng-0.11.24/core-log.c:151:21: [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. va_list ap) FORMAT(printf, 4, 0); data/stress-ng-0.11.24/core-log.c:208: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. int n = vsnprintf(buf, sizeof(buf), fmt, ap); data/stress-ng-0.11.24/core-log.c:218: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. ret = vsnprintf(buf + n, sizeof(buf) - n, fmt, ap); data/stress-ng-0.11.24/core-net.c:148: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. (void)snprintf(addr.sun_path, sizeof(addr.sun_path), data/stress-ng-0.11.24/core-parse-opts.c:142:6: [4] (buffer) sscanf: 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. If the scanf format is influenceable by an attacker, it's exploitable. if (sscanf(str, "%" SCNu64, &val) != 1) { data/stress-ng-0.11.24/core-parse-opts.c:163:6: [4] (buffer) sscanf: 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. If the scanf format is influenceable by an attacker, it's exploitable. if (sscanf(str, "%" SCNd64, &val) != 1) { data/stress-ng-0.11.24/core-parse-opts.c:190:6: [4] (buffer) sscanf: 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. If the scanf format is influenceable by an attacker, it's exploitable. if (sscanf(str, "%" SCNu64, &val) != 1) { data/stress-ng-0.11.24/core-parse-opts.c:212:6: [4] (buffer) sscanf: 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. If the scanf format is influenceable by an attacker, it's exploitable. if (sscanf(str, "%" SCNu64, &val) != 1) { data/stress-ng-0.11.24/core-thermal-zone.c:132: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. If the scanf format is influenceable by an attacker, it's exploitable. if (fscanf(fp, "%" SCNu64, data/stress-ng-0.11.24/stress-access.c:129:10: [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. ret = access(filename, modes[i].access_mode); data/stress-ng-0.11.24/stress-access.c:182: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. ret = access(filename, modes[i].access_mode); data/stress-ng-0.11.24/stress-close.c:189: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(shm_name, SHM_NAME_LEN, data/stress-ng-0.11.24/stress-cpu-online.c:127: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. ret = access(filename, O_RDWR); data/stress-ng-0.11.24/stress-crypt.c:56:14: [4] (crypto) crypt_r: 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. encrypted = crypt_r(passwd, salt, &data); data/stress-ng-0.11.24/stress-crypt.c:58: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. encrypted = crypt(passwd, salt); data/stress-ng-0.11.24/stress-dentry.c:340: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. rc = access(path, R_OK); data/stress-ng-0.11.24/stress-dentry.c:346: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. rc = access(path, R_OK); data/stress-ng-0.11.24/stress-dev-shm.c:130:6: [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("/dev/shm", R_OK | W_OK) < 0) { data/stress-ng-0.11.24/stress-dev-shm.c:142: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(path, sizeof(path), "/dev/shm/stress-dev-shm-%d-%d-%" PRIu32, data/stress-ng-0.11.24/stress-env.c:84:3: [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(name, sizeof(name), "STRESS_ENV_%" PRIx64, i); data/stress-ng-0.11.24/stress-env.c:98:6: [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(name, sizeof(name), "STRESS_ENV_%" PRIx64, j); data/stress-ng-0.11.24/stress-fanotify.c:46: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. uint64_t access; data/stress-ng-0.11.24/stress-fanotify.c:648:12: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. account.access, data/stress-ng-0.11.24/stress-fstat.c:56:8: [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. bool access; /* false if we can't access path */ data/stress-ng-0.11.24/stress-fstat.c:128: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 ((si->access) && (ctxt->euid)) { data/stress-ng-0.11.24/stress-idle-page.c:54:6: [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(bitmap_file, R_OK) != 0) { data/stress-ng-0.11.24/stress-memfd.c:127: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. (void)snprintf(filename, sizeof(filename), "memfd-%u-%" PRIu64, args->pid, i); data/stress-ng-0.11.24/stress-mq.c:101: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(mq_name, sizeof(mq_name), "/%s-%i-%" PRIu32, data/stress-ng-0.11.24/stress-ng.h:1271:44: [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. const char *const fmt, va_list va) FORMAT(printf, 3, 0); data/stress-ng-0.11.24/stress-ng.h:1272:65: [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. extern int pr_yaml(FILE *fp, const char *const fmt, ...) FORMAT(printf, 2, 3); data/stress-ng-0.11.24/stress-ng.h:1278:50: [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. extern void pr_dbg(const char *fmt, ...) FORMAT(printf, 1, 2); data/stress-ng-0.11.24/stress-ng.h:1279:50: [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. extern void pr_inf(const char *fmt, ...) FORMAT(printf, 1, 2); data/stress-ng-0.11.24/stress-ng.h:1280:50: [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. extern void pr_err(const char *fmt, ...) FORMAT(printf, 1, 2); data/stress-ng-0.11.24/stress-ng.h:1281:50: [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. extern void pr_fail(const char *fmt, ...) FORMAT(printf, 1, 2); data/stress-ng-0.11.24/stress-ng.h:1282:50: [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. extern void pr_tidy(const char *fmt, ...) FORMAT(printf, 1, 2); data/stress-ng-0.11.24/stress-ng.h:1286:69: [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. extern void pr_inf_lock(bool *locked, const char *fmt, ...) FORMAT(printf, 2, 3); data/stress-ng-0.11.24/stress-ng.h:1287:69: [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. extern void pr_dbg_lock(bool *locked, const char *fmt, ...) FORMAT(printf, 2, 3); data/stress-ng-0.11.24/stress-ng.h:1299:3: [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(priority, format, __VA_ARGS__) data/stress-ng-0.11.24/stress-ng.h:2272:8: [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. MACRO(access) \ data/stress-ng-0.11.24/stress-ng.h:2301:8: [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. MACRO(crypt) \ data/stress-ng-0.11.24/stress-open.c:186: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(filename, sizeof(filename), "stress-open-%d-%" PRIu32, data/stress-ng-0.11.24/stress-open.c:205: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(filename, sizeof(filename), "stress-open-%d-%" PRIu32, data/stress-ng-0.11.24/stress-ramfs.c:256: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. (void)snprintf(opt, sizeof(opt), "size=%" PRIu64, ramfs_size); data/stress-ng-0.11.24/stress-ramfs.c:290: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. (void)snprintf(opt, sizeof(opt), "%" PRIu64, ramfs_size); data/stress-ng-0.11.24/stress-seal.c:77: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. (void)snprintf(filename, sizeof(filename), "%s-%d-%" PRIu32 "-%" PRIu32, data/stress-ng-0.11.24/stress-shm.c:164: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. (void)snprintf(shm_name, SHM_NAME_LEN, data/stress-ng-0.11.24/stress-str.c:607:31: [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", stress_strcat, strcat }, data/stress-ng-0.11.24/stress-str.c:615:31: [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", stress_strcpy, strcpy }, data/stress-ng-0.11.24/stress-swap.c:123: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((char *)swap_info.sws_volume, data/stress-ng-0.11.24/stress-sysbadaddr.c:204: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. return access((char *)addr, R_OK); data/stress-ng-0.11.24/stress-sysfs.c:599:8: [4] (buffer) sscanf: 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. If the scanf format is influenceable by an attacker, it's exploitable. if (sscanf(utsbuf.release, "%5" SCNd16 ".%5" SCNd16, &major, &minor) == 2) data/stress-ng-0.11.24/stress-sysinval.c:223:12: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. #if DEFSYS(access) data/stress-ng-0.11.24/stress-sysinval.c:224:8: [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. { SYS(access), 2, { ARG_PTR | ARG_EMPTY_FILENAME, ARG_MODE, 0, 0, 0, 0 } }, data/stress-ng-0.11.24/stress-sysinval.c:225:8: [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. { SYS(access), 2, { ARG_PTR | ARG_DEVZERO_FILENAME, ARG_MODE, 0, 0, 0, 0 } }, data/stress-ng-0.11.24/stress-sysinval.c:226:8: [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. { SYS(access), 2, { ARG_PTR | ARG_EMPTY_FILENAME, ARG_ACCESS_MODE, 0, 0, 0, 0 } }, data/stress-ng-0.11.24/stress-sysinval.c:227:8: [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. { SYS(access), 2, { ARG_PTR | ARG_DEVZERO_FILENAME, ARG_ACCESS_MODE, 0, 0, 0, 0 } }, data/stress-ng-0.11.24/stress-sysinval.c:409:12: [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. #if DEFSYS(execv) data/stress-ng-0.11.24/stress-sysinval.c:1626:12: [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. #if DEFSYS(syslog) data/stress-ng-0.11.24/stress-sysinval.c:1627:8: [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. { SYS(syslog), 3, { ARG_INT, ARG_PTR, ARG_PTR, 0, 0, 0 } }, data/stress-ng-0.11.24/stress-tmpfs.c:131: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. (void)snprintf(path, sizeof(path), "%s/%s-%d-%" PRIu32 "-%" PRIu32, data/stress-ng-0.11.24/stress-tun.c:148: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. (void)snprintf(ip_addr, sizeof(ip_addr), "192.168.%" PRIu8 ".%" PRIu8, data/stress-ng-0.11.24/stress-uprobe.c:139: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(event, sizeof(event), "stressngprobe%d%" PRIu32, data/stress-ng-0.11.24/stress-vdso.c:316:9: [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). (void)strcat(tmp, vdso_sym->name); data/stress-ng-0.11.24/stress-watchdog.c:121:6: [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(dev_watchdog, R_OK | W_OK) < 0) { data/stress-ng-0.11.24/stress-wcstr.c:589:31: [4] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). { "wcscat", stress_wcscat, wcscat }, data/stress-ng-0.11.24/stress-wcstr.c:600:31: [4] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. { "wcscpy", stress_wcscpy, wcscpy }, data/stress-ng-0.11.24/stress-x86syscall.c:245:10: [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). (void)strcat(tmp, x86syscalls[i].name); data/stress-ng-0.11.24/test/test-crypt-r.c:38:8: [4] (crypto) crypt_r: 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. ptr = crypt_r(key, salt, &data); data/stress-ng-0.11.24/test/test-libcrypt.c:40:14: [4] (crypto) crypt_r: 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. encrypted = crypt_r(passwd, salt, &data); data/stress-ng-0.11.24/test/test-libcrypt.c:42: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. encrypted = crypt(passwd, salt); data/stress-ng-0.11.24/test/test-ustat.c:28:62: [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. #error ustat is not implemented and will always fail on this system data/stress-ng-0.11.24/stress-chroot.c:66:10: [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. *ret1 = chroot(path); data/stress-ng-0.11.24/stress-cpu.c:421:8: [3] (random) drand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. d += drand48(); data/stress-ng-0.11.24/stress-cpu.c:422:8: [3] (random) lrand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. l += lrand48(); data/stress-ng-0.11.24/stress-ng.c:2640: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 ((c = getopt_long(argc, argv, "?khMVvqnt:b:c:i:j:m:d:f:s:l:p:P:C:S:a:y:F:D:T:u:o:r:B:R:Y:x:", data/stress-ng-0.11.24/stress-ng.h:2293:8: [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. MACRO(chroot) \ data/stress-ng-0.11.24/stress-ramfs.c:235:7: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if (!realpath(pathname, realpathname)) { data/stress-ng-0.11.24/stress-sysbadaddr.c:237:9: [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. return chroot((char *)addr); data/stress-ng-0.11.24/stress-sysinval.c:316:12: [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 DEFSYS(chroot) data/stress-ng-0.11.24/stress-sysinval.c:317:8: [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. { SYS(chroot), 1, { ARG_PTR | ARG_EMPTY_FILENAME, 0, 0, 0, 0, 0 } }, data/stress-ng-0.11.24/stress-sysinval.c:318:8: [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. { SYS(chroot), 1, { ARG_PTR | ARG_DEVZERO_FILENAME, 0, 0, 0, 0, 0 } }, data/stress-ng-0.11.24/stress-zlib.c:708:11: [3] (random) lrand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. *data = lrand48(); data/stress-ng-0.11.24/test/test-chroot.c:29: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("/") < 0) data/stress-ng-0.11.24/core-cache.c:175: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 tmp[2048]; data/stress-ng-0.11.24/core-cache.c:176: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 path[path_len]; data/stress-ng-0.11.24/core-cache.c:203:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). cache->level = (uint16_t)atoi(tmp); data/stress-ng-0.11.24/core-cache.c:208:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). cache->line_size = (uint32_t)atoi(tmp); data/stress-ng-0.11.24/core-cache.c:212:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). cache->ways = atoi(tmp); data/stress-ng-0.11.24/core-cache.c:320: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 path[cpu_path_len + strlen(SYS_CPU_CACHE_DIR) + 2]; data/stress-ng-0.11.24/core-cache.c:368:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 fullpath[strlen(path) + strlen(name) + 2]; data/stress-ng-0.11.24/core-cache.c:428:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 fullpath[fullpath_len]; data/stress-ng-0.11.24/core-cache.c:438: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 onlinepath[fullpath_len + 8]; data/stress-ng-0.11.24/core-cache.c:439: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 tmp[2048]; data/stress-ng-0.11.24/core-cache.c:445:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). cpu->online = atoi(tmp); data/stress-ng-0.11.24/core-ftrace.c:66: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 *mnts[MAX_MOUNTS]; data/stress-ng-0.11.24/core-ftrace.c:67: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 debugfs_path[1024]; data/stress-ng-0.11.24/core-ftrace.c:118: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 buffer[4096]; data/stress-ng-0.11.24/core-ftrace.c:120: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(path, "r"); data/stress-ng-0.11.24/core-ftrace.c:224: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 filename[PATH_MAX]; data/stress-ng-0.11.24/core-ftrace.c:232:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 funcfile[PATH_MAX]; data/stress-ng-0.11.24/core-ftrace.c:252: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 filename[PATH_MAX]; data/stress-ng-0.11.24/core-ftrace.c:254: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 buffer[32]; data/stress-ng-0.11.24/core-ftrace.c:266: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(filename, O_WRONLY | (pid < 0 ? O_TRUNC : O_APPEND)); data/stress-ng-0.11.24/core-ftrace.c:285: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 *path, filename[PATH_MAX]; data/stress-ng-0.11.24/core-ftrace.c:377: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 *path, filename[PATH_MAX]; data/stress-ng-0.11.24/core-hash.c:203: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(HASH_STR(hash), str, len); data/stress-ng-0.11.24/core-helper.c:315: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("/proc/sys/kernel/shmall", "r"); data/stress-ng-0.11.24/core-helper.c:522: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("/proc/self/coredump_filter", O_WRONLY)) >= 0) { data/stress-ng-0.11.24/core-helper.c:611: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 munged[128]; data/stress-ng-0.11.24/core-helper.c:757: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 tmp[PATH_MAX]; data/stress-ng-0.11.24/core-helper.c:790: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 tmp[PATH_MAX + 1]; data/stress-ng-0.11.24/core-helper.c:818: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 path[PATH_MAX]; data/stress-ng-0.11.24/core-helper.c:837: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 buffer[40]; data/stress-ng-0.11.24/core-helper.c:884: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 hostname[128]; data/stress-ng-0.11.24/core-helper.c:1035: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, O_WRONLY); data/stress-ng-0.11.24/core-helper.c:1060: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, O_RDONLY); data/stress-ng-0.11.24/core-helper.c:1375: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. static char str[sizeof(buf.machine) + data/stress-ng-0.11.24/core-helper.c:1443: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]; data/stress-ng-0.11.24/core-helper.c:2052: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]; data/stress-ng-0.11.24/core-helper.c:2067:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). max_pid = atoi(buf); data/stress-ng-0.11.24/core-helper.c:2115: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 path[PATH_MAX]; data/stress-ng-0.11.24/core-helper.c:2116: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[4096]; data/stress-ng-0.11.24/core-ignite-cpu.c:39: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 cur_governor[128]; /* Original governor setting */ data/stress-ng-0.11.24/core-ignite-cpu.c:66: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 path[PATH_MAX]; data/stress-ng-0.11.24/core-ignite-cpu.c:70: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 buffer[128]; data/stress-ng-0.11.24/core-ignite-cpu.c:109: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 buffer[128]; data/stress-ng-0.11.24/core-ignite-cpu.c:110: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 path[PATH_MAX]; data/stress-ng-0.11.24/core-ignite-cpu.c:159: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[4096]; data/stress-ng-0.11.24/core-job.c:111: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[4096]; data/stress-ng-0.11.24/core-job.c:112: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 *new_argv[MAX_ARGS]; data/stress-ng-0.11.24/core-job.c:113: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 txt[sizeof(buf)]; data/stress-ng-0.11.24/core-job.c:122: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). fp = fopen(argv[optind], "r"); data/stress-ng-0.11.24/core-job.c:127: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). fp = fopen(jobfile, "r"); data/stress-ng-0.11.24/core-job.c:184:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 tmp[len]; data/stress-ng-0.11.24/core-log.c:44: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("/dev/stdout", O_RDONLY); data/stress-ng-0.11.24/core-log.c:70: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("/dev/stdout", O_RDONLY); data/stress-ng-0.11.24/core-log.c:139: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). log_file = fopen(filename, "w"); data/stress-ng-0.11.24/core-log.c:165: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 ts[32]; data/stress-ng-0.11.24/core-log.c:191: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[4096]; data/stress-ng-0.11.24/core-out-of-memory.c:45: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("/dev/kmsg", O_RDONLY | O_NONBLOCK); data/stress-ng-0.11.24/core-out-of-memory.c:50: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[4096], *ptr; data/stress-ng-0.11.24/core-out-of-memory.c:94: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). fd = open(procname, O_WRONLY); data/stress-ng-0.11.24/core-parse-opts.c:72: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 strval[32], strlo[32], strhi[32]; data/stress-ng-0.11.24/core-perf.c:302: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 path[PATH_MAX]; data/stress-ng-0.11.24/core-perf.c:311: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(path, "r")) == NULL) data/stress-ng-0.11.24/core-perf.c:563: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 buffer[40]; data/stress-ng-0.11.24/core-perf.c:651: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 extra[32]; data/stress-ng-0.11.24/core-perf.c:652: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 yaml_label[128]; data/stress-ng-0.11.24/core-perf.c:691:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 buffer[64]; data/stress-ng-0.11.24/core-shim.c:121: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 buffer[buf_sz]; data/stress-ng-0.11.24/core-shim.c:702: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 pw_name[256]; data/stress-ng-0.11.24/core-thermal-zone.c:43: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 path[PATH_MAX]; data/stress-ng-0.11.24/core-thermal-zone.c:71: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(path, "r")) != NULL) { data/stress-ng-0.11.24/core-thermal-zone.c:72:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 type[128]; data/stress-ng-0.11.24/core-thermal-zone.c: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 path[PATH_MAX]; data/stress-ng-0.11.24/core-thermal-zone.c:131: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(path, "r")) != NULL) { data/stress-ng-0.11.24/core-thrash.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 path[PATH_MAX]; data/stress-ng-0.11.24/core-thrash.c:49: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 buffer[4096]; data/stress-ng-0.11.24/core-thrash.c:58: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). fdmem = open(path, O_RDONLY); data/stress-ng-0.11.24/core-thrash.c:63: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). fpmap = fopen(path, "r"); data/stress-ng-0.11.24/core-thrash.c:75: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 tmppath[1024]; data/stress-ng-0.11.24/core-thrash.c:76: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 prot[5]; data/stress-ng-0.11.24/core-thrash.c:139: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 mode[2]; data/stress-ng-0.11.24/core-thrash.c:188:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 procpath[128]; data/stress-ng-0.11.24/core-time.c:92: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 str[128]; data/stress-ng-0.11.24/core-try-open.c:66: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). fd = open(path, flags); data/stress-ng-0.11.24/stress-access.c:97: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-af-alg.c:797:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return atoi(ptr + 2); data/stress-ng-0.11.24/stress-af-alg.c:886: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 buffer[1024]; data/stress-ng-0.11.24/stress-af-alg.c:890: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("/proc/crypto", "r"); data/stress-ng-0.11.24/stress-aio-linux.c:259: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-aio-linux.c:260: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]; data/stress-ng-0.11.24/stress-aio-linux.c:362: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). fds[0] = open(filename, O_CREAT | O_RDWR | O_DIRECT, S_IRUSR | S_IWUSR); data/stress-ng-0.11.24/stress-aio-linux.c:376: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). fds[i] = open(filename, O_RDWR | O_DIRECT, S_IRUSR | S_IWUSR); data/stress-ng-0.11.24/stress-aio.c:181: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-aio.c:205: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(filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR)) < 0) { data/stress-ng-0.11.24/stress-apparmor.c:55: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-apparmor.c:78: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_RDONLY)) < 0) { data/stress-ng-0.11.24/stress-apparmor.c:129: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 buffer[APPARMOR_BUF_SZ]; data/stress-ng-0.11.24/stress-apparmor.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). if ((fd = open(path, O_RDONLY | O_NONBLOCK)) < 0) data/stress-ng-0.11.24/stress-apparmor.c:180: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 name[PATH_MAX]; data/stress-ng-0.11.24/stress-apparmor.c:260: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-apparmor.c:284: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-apparmor.c:544: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 copy[g_apparmor_data_len]; data/stress-ng-0.11.24/stress-apparmor.c:556: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, g_apparmor_data, g_apparmor_data_len); data/stress-ng-0.11.24/stress-bad-altstack.c:99: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("/dev/zero", O_RDONLY); data/stress-ng-0.11.24/stress-bad-ioctl.c:81: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-bad-ioctl.c:143: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 ((fd = open(path, O_RDONLY | O_NONBLOCK)) < 0) data/stress-ng-0.11.24/stress-bad-ioctl.c:252: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-bad-ioctl.c:253: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 tmp[PATH_MAX]; data/stress-ng-0.11.24/stress-bad-ioctl.c:275:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). dev_n = atoi(ptr); data/stress-ng-0.11.24/stress-bind-mount.c:110: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. static char stack[CLONE_STACK_SIZE]; data/stress-ng-0.11.24/stress-binderfs.c:90: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 pathname[PATH_MAX]; data/stress-ng-0.11.24/stress-binderfs.c:91: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 filename[PATH_MAX + 16]; data/stress-ng-0.11.24/stress-binderfs.c:122: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). fd = open(filename, O_RDONLY | O_CLOEXEC); data/stress-ng-0.11.24/stress-chattr.c:89: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). fd = open(filename, O_RDONLY | O_NONBLOCK | O_CREAT, S_IRUSR | S_IWUSR); data/stress-ng-0.11.24/stress-chattr.c:110: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). fdw = open(filename, O_RDWR); data/stress-ng-0.11.24/stress-chattr.c:156: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 filename[PATH_MAX], pathname[PATH_MAX]; data/stress-ng-0.11.24/stress-chdir.c:55: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 path[PATH_MAX], cwd[PATH_MAX]; data/stress-ng-0.11.24/stress-chdir.c:127: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). fds[i] = open(paths[i], flags); data/stress-ng-0.11.24/stress-chmod.c:169: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 filename[PATH_MAX], pathname[PATH_MAX]; data/stress-ng-0.11.24/stress-chmod.c:170: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 tmp[PATH_MAX], *filebase; data/stress-ng-0.11.24/stress-chmod.c:185: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(pathname, O_DIRECTORY | O_RDONLY); data/stress-ng-0.11.24/stress-chmod.c:203: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). if ((fd = open(filename, O_RDWR, S_IRUSR | S_IWUSR)) > - 1) data/stress-ng-0.11.24/stress-chown.c:142: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 filename[PATH_MAX], pathname[PATH_MAX]; data/stress-ng-0.11.24/stress-chown.c:175: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). if ((fd = open(filename, O_RDWR, S_IRUSR | S_IWUSR)) > - 1) data/stress-ng-0.11.24/stress-chroot.c:37: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 temppath[PATH_MAX]; data/stress-ng-0.11.24/stress-chroot.c:38: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 longpath[PATH_MAX + 32]; data/stress-ng-0.11.24/stress-chroot.c:39: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 badpath[PATH_MAX]; data/stress-ng-0.11.24/stress-chroot.c:40: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-chroot.c:80: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]; data/stress-ng-0.11.24/stress-clock.c:485: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("/dev/ptp0", O_RDWR); data/stress-ng-0.11.24/stress-clone.c:262: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). fd = open("/proc/self/ns/uts", O_RDONLY); data/stress-ng-0.11.24/stress-close.c:182: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-close.c:185: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 shm_name[SHM_NAME_LEN]; data/stress-ng-0.11.24/stress-close.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). file_fd = open(filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); data/stress-ng-0.11.24/stress-close.c:244: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("/dev/zero", O_RDONLY); data/stress-ng-0.11.24/stress-close.c:248: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("/tmp", O_TMPFILE | O_RDWR, data/stress-ng-0.11.24/stress-close.c:304: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("/tmp", O_PATH | O_RDWR); data/stress-ng-0.11.24/stress-close.c:310: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("/tmp/", O_RDONLY | O_DIRECTORY | O_CLOEXEC); data/stress-ng-0.11.24/stress-close.c:327: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("/dev/null", O_RDWR); data/stress-ng-0.11.24/stress-copy-file.c:59: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 filename[PATH_MAX - 5], tmp[PATH_MAX]; data/stress-ng-0.11.24/stress-copy-file.c:80: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_in = open(tmp, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR)) < 0) { data/stress-ng-0.11.24/stress-copy-file.c:100: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_out = open(tmp, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR)) < 0) { data/stress-ng-0.11.24/stress-cpu-online.c:44: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-cpu-online.c:45: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 data[3] = { '0' + setting, '\n', 0 }; data/stress-ng-0.11.24/stress-cpu-online.c: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-cpu.c:572: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(tmp, buf, sizeof(*tmp) * FFT_SIZE); data/stress-ng-0.11.24/stress-cpu.c:649: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 buffer[128]; data/stress-ng-0.11.24/stress-crypt.c:77: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 passwd[16]; data/stress-ng-0.11.24/stress-daemon.c:70: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 ((fds[0] = open("/dev/null", O_RDWR)) < 0) data/stress-ng-0.11.24/stress-daemon.c:94:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[1] = { 0xff }; data/stress-ng-0.11.24/stress-daemon.c:169:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[1]; data/stress-ng-0.11.24/stress-dccp.c:134: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[DCCP_BUF]; data/stress-ng-0.11.24/stress-dccp.c:215: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[DCCP_BUF]; data/stress-ng-0.11.24/stress-dentry.c:108:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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/stress-ng-0.11.24/stress-dentry.c:122:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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/stress-ng-0.11.24/stress-dentry.c:134:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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/stress-ng-0.11.24/stress-dentry.c:157: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[1024]; data/stress-ng-0.11.24/stress-dentry.c:163: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); data/stress-ng-0.11.24/stress-dentry.c:280: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 dir_path[PATH_MAX]; data/stress-ng-0.11.24/stress-dentry.c:298: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-dentry.c:307: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). if ((fd = open(path, O_CREAT | O_RDWR, data/stress-ng-0.11.24/stress-dev-shm.c:121: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-dev-shm.c:144: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, O_CREAT | O_EXCL | O_RDWR, S_IRUSR | S_IWUSR); data/stress-ng-0.11.24/stress-dev.c:985: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 scsi_block_path[PATH_MAX]; data/stress-ng-0.11.24/stress-dev.c:1136:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 buffer[page_size]; data/stress-ng-0.11.24/stress-dev.c:1288: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 buffer[CD_FRAMESIZE_RAW]; /* return */ data/stress-ng-0.11.24/stress-dev.c:1302: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 buffer[CD_FRAMESIZE]; /* return */ data/stress-ng-0.11.24/stress-dev.c:1316: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 buffer[CD_FRAMESIZE_RAW0]; /* return */ data/stress-ng-0.11.24/stress-dev.c:1868: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. unsigned char colormap[3*16]; data/stress-ng-0.11.24/stress-dev.c:1938: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. unsigned char argp[8192]; data/stress-ng-0.11.24/stress-dev.c:1955: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. unsigned char argp[E_TABSZ]; data/stress-ng-0.11.24/stress-dev.c:2298: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 data[1]; data/stress-ng-0.11.24/stress-dev.c:2359: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. unsigned char identity[512]; data/stress-ng-0.11.24/stress-dev.c:2581: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-dev.c:2603: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 ((fd = open(path, O_RDONLY | O_NONBLOCK)) < 0) { data/stress-ng-0.11.24/stress-dev.c:2732: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 ((fd = open(path, O_RDONLY | O_NONBLOCK)) < 0) { data/stress-ng-0.11.24/stress-dev.c:2761: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). fd = open(path, O_RDONLY | O_WRONLY | O_NONBLOCK); data/stress-ng-0.11.24/stress-dev.c:2846: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-dev.c:2847: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 tmp[PATH_MAX]; data/stress-ng-0.11.24/stress-dev.c:2875:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). dev_n = atoi(ptr); data/stress-ng-0.11.24/stress-dir.c:145: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-dir.c:170: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-dir.c:188: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 tmp[PATH_MAX], *filename; data/stress-ng-0.11.24/stress-dir.c:213: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 pathname[PATH_MAX]; data/stress-ng-0.11.24/stress-dir.c:224: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). dirfd = open(pathname, O_DIRECTORY | O_RDONLY); data/stress-ng-0.11.24/stress-dir.c:235:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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/stress-ng-0.11.24/stress-dirdeep.c:151: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). dirfd = open(path, O_RDONLY | O_DIRECTORY); data/stress-ng-0.11.24/stress-dirdeep.c:179: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). pathfd = open(path, O_PATH | O_RDONLY); data/stress-ng-0.11.24/stress-dirdeep.c:255: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_RDONLY); data/stress-ng-0.11.24/stress-dirdeep.c:331: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 path[PATH_MAX + 16]; data/stress-ng-0.11.24/stress-dirdeep.c:332: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 linkpath[sizeof(path)]; data/stress-ng-0.11.24/stress-dirdeep.c:333: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 rootpath[PATH_MAX]; data/stress-ng-0.11.24/stress-dnotify.c:44: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]; data/stress-ng-0.11.24/stress-dnotify.c:102: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(watchname, O_RDONLY)) < 0) { data/stress-ng-0.11.24/stress-dnotify.c:163: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 buffer[BUF_SIZE]; data/stress-ng-0.11.24/stress-dnotify.c:165: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(filename, O_CREAT | O_RDWR, FILE_FLAGS)) < 0) { data/stress-ng-0.11.24/stress-dnotify.c:213: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 filepath[PATH_MAX]; data/stress-ng-0.11.24/stress-dnotify.c:230: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 buffer[1]; data/stress-ng-0.11.24/stress-dnotify.c:234: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_RDONLY)) < 0) { data/stress-ng-0.11.24/stress-dnotify.c:255: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 filepath[PATH_MAX]; data/stress-ng-0.11.24/stress-dnotify.c:272: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 buffer[1] = { 0 }; data/stress-ng-0.11.24/stress-dnotify.c:277: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_RDWR)) < 0) { data/stress-ng-0.11.24/stress-dnotify.c:299: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 filepath[PATH_MAX]; data/stress-ng-0.11.24/stress-dnotify.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 filepath[PATH_MAX]; data/stress-ng-0.11.24/stress-dnotify.c:344: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 filepath[PATH_MAX]; data/stress-ng-0.11.24/stress-dnotify.c:372: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 oldfile[PATH_MAX], newfile[PATH_MAX]; data/stress-ng-0.11.24/stress-dnotify.c:402: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 pathname[PATH_MAX]; data/stress-ng-0.11.24/stress-dup.c:52: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 fifoname[PATH_MAX]; /* name of fifo file */ data/stress-ng-0.11.24/stress-dup.c:66: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/null", O_RDONLY)) == -1) data/stress-ng-0.11.24/stress-dup.c:118: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). info->fd = open("/dev/null", O_RDONLY); data/stress-ng-0.11.24/stress-dup.c:147: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). info->fd_pipe = open(info->fifoname, O_RDONLY); data/stress-ng-0.11.24/stress-dup.c:233: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). fds[0] = open("/dev/zero", O_RDONLY); data/stress-ng-0.11.24/stress-efivar.c:126: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 data[1]; data/stress-ng-0.11.24/stress-efivar.c:147: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-efivar.c:154: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(filename, O_RDONLY)) < 0) data/stress-ng-0.11.24/stress-efivar.c:233: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-efivar.c:234: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 data[4096]; data/stress-ng-0.11.24/stress-efivar.c:249: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(filename, O_RDONLY)) < 0) data/stress-ng-0.11.24/stress-efivar.c:320:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 varname[513]; data/stress-ng-0.11.24/stress-efivar.c:321:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 guid_str[37]; data/stress-ng-0.11.24/stress-enosys.c:3321: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 buffer[1024]; data/stress-ng-0.11.24/stress-env.c:79: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 name[64]; data/stress-ng-0.11.24/stress-epoll.c:198: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[8192]; data/stress-ng-0.11.24/stress-epoll.c:480: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[4096]; data/stress-ng-0.11.24/stress-eventfd.c:117:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 re[7]; data/stress-ng-0.11.24/stress-exec.c:125: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 buffer[128]; data/stress-ng-0.11.24/stress-exec.c:144: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 buffer[128]; data/stress-ng-0.11.24/stress-exec.c:212: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 path[PATH_MAX + 1]; data/stress-ng-0.11.24/stress-exec.c:213: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-exec.c:245: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). fdexec = open(path, O_PATH); data/stress-ng-0.11.24/stress-exec.c:273: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). if ((fd_out = open("/dev/null", O_WRONLY)) < 0) { data/stress-ng-0.11.24/stress-exec.c:278: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). if ((fd_in = open("/dev/zero", O_RDONLY)) < 0) { data/stress-ng-0.11.24/stress-exec.c:296: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 buffer[1024]; data/stress-ng-0.11.24/stress-exec.c:299: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). fd = open(filename, O_CREAT | O_RDWR | O_TRUNC, S_IRUSR | S_IWUSR | S_IXUSR); data/stress-ng-0.11.24/stress-exec.c:318: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). fd = open(filename, O_PATH); data/stress-ng-0.11.24/stress-fallocate.c:97: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-fallocate.c:118: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(filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR)) < 0) { data/stress-ng-0.11.24/stress-fanotify.c:43: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). uint64_t open; data/stress-ng-0.11.24/stress-fanotify.c:125: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 *mnts[MAX_MNTS]; data/stress-ng-0.11.24/stress-fanotify.c:383: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 pathname[PATH_MAX - 16], filename[PATH_MAX]; data/stress-ng-0.11.24/stress-fanotify.c:420:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 buffer[64]; data/stress-ng-0.11.24/stress-fanotify.c:433: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(filename, O_WRONLY, S_IRUSR | S_IWUSR); data/stress-ng-0.11.24/stress-fanotify.c:445: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(filename, O_RDONLY, S_IRUSR | S_IWUSR); data/stress-ng-0.11.24/stress-fanotify.c:645: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). account.open, data/stress-ng-0.11.24/stress-fault.c:57: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-fault.c:93: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). fd = open(filename, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); data/stress-ng-0.11.24/stress-fault.c:114:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 buffer[1]; data/stress-ng-0.11.24/stress-fcntl.c:636: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 filename[PATH_MAX], pathname[PATH_MAX]; data/stress-ng-0.11.24/stress-fiemap.c:232: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-fiemap.c:269: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(filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR)) < 0) { data/stress-ng-0.11.24/stress-fifo.c:93: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(fifoname, O_RDONLY | O_NONBLOCK); data/stress-ng-0.11.24/stress-fifo.c:163: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 fifoname[PATH_MAX]; data/stress-ng-0.11.24/stress-fifo.c:202: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(fifoname, O_WRONLY); data/stress-ng-0.11.24/stress-file-ioctl.c:75: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-file-ioctl.c:89: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(filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); data/stress-ng-0.11.24/stress-file-ioctl.c:100: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(filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); data/stress-ng-0.11.24/stress-file-ioctl.c:256:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[sz] ALIGNED(64); data/stress-ng-0.11.24/stress-filename.c:51: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 allowed[256]; data/stress-ng-0.11.24/stress-filename.c:195:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-filename.c:264: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 pathname[PATH_MAX - 256]; data/stress-ng-0.11.24/stress-filename.c:265: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-flock.c:125: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-flock.c:133: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(filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); data/stress-ng-0.11.24/stress-fork.c:174:19: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. if ((fork_fn == vfork) && (stress_time_now() > time_end)) data/stress-ng-0.11.24/stress-fork.c:218:30: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. return stress_fork_fn(args, vfork, "vfork", vfork_max); data/stress-ng-0.11.24/stress-fstat.c:131: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). fd = open(si->path, O_RDONLY | O_NONBLOCK); data/stress-ng-0.11.24/stress-fstat.c:252: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-full.c:57: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 buffer[4096]; data/stress-ng-0.11.24/stress-full.c:59: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 ((fd = open("/dev/full", O_RDWR)) < 0) { data/stress-ng-0.11.24/stress-funcret.c:63: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(&b, &a, sizeof(a)); \ data/stress-ng-0.11.24/stress-funcret.c:75: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(&b, &a, sizeof(a)); \ data/stress-ng-0.11.24/stress-funcret.c:87: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(&b, &a, sizeof(a)); \ data/stress-ng-0.11.24/stress-get.c:138: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 *mnts[MOUNTS_MAX]; data/stress-ng-0.11.24/stress-get.c:153: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-get.c:203:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[128]; data/stress-ng-0.11.24/stress-get.c:223:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[128]; data/stress-ng-0.11.24/stress-get.c:399:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 kern_version[64]; data/stress-ng-0.11.24/stress-get.c:553:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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/stress-ng-0.11.24/stress-get.c:597:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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]; data/stress-ng-0.11.24/stress-get.c:622: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(mnts[i], O_RDONLY); data/stress-ng-0.11.24/stress-getdent.c:112: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, O_RDONLY | O_DIRECTORY); data/stress-ng-0.11.24/stress-getdent.c:149: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 newpath[PATH_MAX]; data/stress-ng-0.11.24/stress-getdent.c:188: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, O_RDONLY | O_DIRECTORY); data/stress-ng-0.11.24/stress-getdent.c:224: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 newpath[PATH_MAX]; data/stress-ng-0.11.24/stress-getrandom.c:51: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 buffer[RANDOM_BUFFER_SIZE]; data/stress-ng-0.11.24/stress-getrandom.c:91: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 buffer[RANDOM_BUFFER_SIZE]; data/stress-ng-0.11.24/stress-handle.c:72: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("/proc/self/mountinfo", "r")) == NULL) { data/stress-ng-0.11.24/stress-handle.c:80: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 mount_path[PATH_MAX + 1]; data/stress-ng-0.11.24/stress-handle.c:153: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). mount_fd = open(mount_info[i].mount_path, O_RDONLY); data/stress-ng-0.11.24/stress-hdd.c:392: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-hdd.c:512: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 ((fd = open(filename, flags, S_IRUSR | S_IWUSR)) < 0) { data/stress-ng-0.11.24/stress-hsearch.c:81: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 buffer[32]; data/stress-ng-0.11.24/stress-icmp-flood.c:93: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 pkt[pkt_len]; data/stress-ng-0.11.24/stress-idle-page.c:77: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(bitmap_file, O_RDWR); data/stress-ng-0.11.24/stress-inode-flags.c:198: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 tmp[PATH_MAX], file_name[PATH_MAX]; data/stress-ng-0.11.24/stress-inode-flags.c:217: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). data.dir_fd = open(dir_name, O_RDONLY | O_DIRECTORY); data/stress-ng-0.11.24/stress-inode-flags.c:224: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). data.file_fd = open(file_name, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); data/stress-ng-0.11.24/stress-inotify.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 buffer[1024]; data/stress-ng-0.11.24/stress-inotify.c:341:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-inotify.c:383: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 buffer[BUF_SIZE]; data/stress-ng-0.11.24/stress-inotify.c:386: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(filename, O_CREAT | O_RDWR, FILE_FLAGS)) < 0) { data/stress-ng-0.11.24/stress-inotify.c:438: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 filepath[PATH_MAX]; data/stress-ng-0.11.24/stress-inotify.c:457: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 buffer[1]; data/stress-ng-0.11.24/stress-inotify.c:461: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_RDONLY)) < 0) { data/stress-ng-0.11.24/stress-inotify.c:485: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 filepath[PATH_MAX]; data/stress-ng-0.11.24/stress-inotify.c:504: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 buffer[1] = { 0 }; data/stress-ng-0.11.24/stress-inotify.c:509: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_RDWR)) < 0) { data/stress-ng-0.11.24/stress-inotify.c:534: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 filepath[PATH_MAX]; data/stress-ng-0.11.24/stress-inotify.c:564: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 filepath[PATH_MAX]; data/stress-ng-0.11.24/stress-inotify.c:582: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_RDONLY)) < 0) { data/stress-ng-0.11.24/stress-inotify.c:596: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 filepath[PATH_MAX]; data/stress-ng-0.11.24/stress-inotify.c:623: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 filepath[PATH_MAX]; data/stress-ng-0.11.24/stress-inotify.c:651: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 filepath[PATH_MAX]; data/stress-ng-0.11.24/stress-inotify.c:685: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 filepath[PATH_MAX], newpath[PATH_MAX]; data/stress-ng-0.11.24/stress-inotify.c:719: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 olddir[PATH_MAX - 16], oldfile[PATH_MAX], newfile[PATH_MAX]; data/stress-ng-0.11.24/stress-inotify.c:758: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 oldfile[PATH_MAX], newdir[PATH_MAX - 16], newfile[PATH_MAX]; data/stress-ng-0.11.24/stress-inotify.c:794: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 filepath[PATH_MAX]; data/stress-ng-0.11.24/stress-inotify.c:801: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(filepath, O_RDWR)) < 0) { data/stress-ng-0.11.24/stress-inotify.c:832: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 filepath[PATH_MAX]; data/stress-ng-0.11.24/stress-inotify.c:839: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(filepath, O_RDONLY)) < 0) { data/stress-ng-0.11.24/stress-inotify.c:899: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 pathname[PATH_MAX - 16]; data/stress-ng-0.11.24/stress-io-uring.c:400: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-io-uring.c:440: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). if ((io_uring_file.fd = open(filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR)) < 0) { data/stress-ng-0.11.24/stress-iomix.c:69:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 buffer[512]; data/stress-ng-0.11.24/stress-iomix.c:109:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 buffer[512]; data/stress-ng-0.11.24/stress-iomix.c:161:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 buffer[512]; data/stress-ng-0.11.24/stress-iomix.c:210:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 buffer[512]; data/stress-ng-0.11.24/stress-iomix.c:246:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 buffer[512]; data/stress-ng-0.11.24/stress-iomix.c:297:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 buffer[512]; data/stress-ng-0.11.24/stress-iomix.c:451:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 buffer[1] = { (stress_mwc8() % 26) + 'A' }; data/stress-ng-0.11.24/stress-iomix.c:483:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 buffer[1]; data/stress-ng-0.11.24/stress-iomix.c:677: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-iomix.c:714: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(filename, O_CREAT | O_RDWR | O_SYNC, S_IRUSR | S_IWUSR)) < 0) { data/stress-ng-0.11.24/stress-ioport.c:126: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("/dev/port", O_RDWR); data/stress-ng-0.11.24/stress-ioprio.c:51: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-ioprio.c:59: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(filename, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR)) < 0) { data/stress-ng-0.11.24/stress-ioprio.c:70: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 buffer[MAX_IOV][BUF_SIZE]; data/stress-ng-0.11.24/stress-iosync.c:43: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 *mnts[MAX_MNTS]; data/stress-ng-0.11.24/stress-ipsec-mb.c:113: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 str[128] = ""; data/stress-ng-0.11.24/stress-ipsec-mb.c:116:4: [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(str, " sse"); data/stress-ng-0.11.24/stress-ipsec-mb.c:118:4: [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(str, " avx"); data/stress-ng-0.11.24/stress-ipsec-mb.c:120:4: [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(str, " avx2"); data/stress-ng-0.11.24/stress-ipsec-mb.c:122:4: [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(str, " avx512"); data/stress-ng-0.11.24/stress-kcmp.c:122: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 ((fd1 = open("/dev/null", O_WRONLY)) < 0) { data/stress-ng-0.11.24/stress-kcmp.c:212: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). if ((fd2 = open("/dev/null", O_WRONLY)) < 0) { data/stress-ng-0.11.24/stress-key.c:104: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 description[64]; data/stress-ng-0.11.24/stress-key.c:105: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 payload[64]; data/stress-ng-0.11.24/stress-lease.c:105: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(filename, O_NONBLOCK | O_WRONLY, S_IRUSR | S_IWUSR); data/stress-ng-0.11.24/stress-lease.c:137: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(filename, flags, S_IRUSR | S_IWUSR); data/stress-ng-0.11.24/stress-lease.c:185: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-link.c:50: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-link.c:69: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 oldpath[PATH_MAX]; data/stress-ng-0.11.24/stress-link.c:77: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(oldpath, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR)) < 0) { data/stress-ng-0.11.24/stress-link.c:94:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 newpath[PATH_MAX]; data/stress-ng-0.11.24/stress-link.c:113: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]; data/stress-ng-0.11.24/stress-link.c:118: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 tmpfile[PATH_MAX], *filename; data/stress-ng-0.11.24/stress-link.c:118:11: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). char tmpfile[PATH_MAX], *filename; data/stress-ng-0.11.24/stress-link.c:119: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 tmpdir[PATH_MAX], *dir; data/stress-ng-0.11.24/stress-link.c:122:19: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). shim_strlcpy(tmpfile, newpath, sizeof(tmpfile)); data/stress-ng-0.11.24/stress-link.c:122:44: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). shim_strlcpy(tmpfile, newpath, sizeof(tmpfile)); data/stress-ng-0.11.24/stress-link.c:123:26: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). filename = basename(tmpfile); data/stress-ng-0.11.24/stress-link.c:130: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). dirfd = open(dir, O_DIRECTORY | O_RDONLY); data/stress-ng-0.11.24/stress-locka.c:219: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-locka.c:220: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 pathname[PATH_MAX]; data/stress-ng-0.11.24/stress-locka.c:221: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 buffer[4096]; data/stress-ng-0.11.24/stress-locka.c:249: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(filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR)) < 0) { data/stress-ng-0.11.24/stress-lockf.c:245: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-lockf.c:246: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 pathname[PATH_MAX]; data/stress-ng-0.11.24/stress-lockf.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 buffer[4096]; data/stress-ng-0.11.24/stress-lockf.c:275: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(filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR)) < 0) { data/stress-ng-0.11.24/stress-lockofd.c:217: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-lockofd.c:218: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 pathname[PATH_MAX]; data/stress-ng-0.11.24/stress-lockofd.c:219: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 buffer[4096]; data/stress-ng-0.11.24/stress-lockofd.c:247: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(filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR)) < 0) { data/stress-ng-0.11.24/stress-loop.c:101: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 backing_file[PATH_MAX]; data/stress-ng-0.11.24/stress-loop.c:112: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). if ((backing_fd = open(backing_file, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR)) < 0) { data/stress-ng-0.11.24/stress-loop.c:132: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 dev_name[PATH_MAX]; data/stress-ng-0.11.24/stress-loop.c:149: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). ctrl_dev = open("/dev/loop-control", O_RDWR); data/stress-ng-0.11.24/stress-loop.c:174: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). loop_dev = open(dev_name, O_RDWR); data/stress-ng-0.11.24/stress-loop.c:193:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 attr_path[PATH_MAX]; data/stress-ng-0.11.24/stress-loop.c:194:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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]; data/stress-ng-0.11.24/stress-madvise.c:322: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-madvise.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 page[page_size]; data/stress-ng-0.11.24/stress-madvise.c:352: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(filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR)) < 0) { data/stress-ng-0.11.24/stress-mcontend.c:58: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 buffer[256]; data/stress-ng-0.11.24/stress-mcontend.c:316: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-mcontend.c:317: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 buffer[args->page_size]; data/stress-ng-0.11.24/stress-mcontend.c:329: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(filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); data/stress-ng-0.11.24/stress-memcpy.c:49: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. return memcpy(dest, src, n); data/stress-ng-0.11.24/stress-memcpy.c:125: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(aligned_buf, str_shared, STR_SHARED_SIZE); data/stress-ng-0.11.24/stress-memcpy.c:126: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(str_shared, aligned_buf, STR_SHARED_SIZE / 2); data/stress-ng-0.11.24/stress-memcpy.c:128: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(b_str, b, STR_SHARED_SIZE); data/stress-ng-0.11.24/stress-memcpy.c:130: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(b, b_str, STR_SHARED_SIZE); data/stress-ng-0.11.24/stress-memfd.c:125:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-memhotplug.c:63: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-memhotplug.c:64: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]; data/stress-ng-0.11.24/stress-memhotplug.c:92: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-memhotplug.c:108: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, O_RDWR | O_NONBLOCK); data/stress-ng-0.11.24/stress-memhotplug.c:130: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-memhotplug.c:136: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, O_RDWR | O_NONBLOCK); data/stress-ng-0.11.24/stress-mincore.c:82: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. unsigned char vec[1]; data/stress-ng-0.11.24/stress-mknod.c:63: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-mknod.c:92: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-mknod.c:101:10: [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(dev, &statbuf.st_dev, sizeof(*dev)); data/stress-ng-0.11.24/stress-mknod.c:152: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 tmp[PATH_MAX], *filename; data/stress-ng-0.11.24/stress-mknod.c:180: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-mknod.c:205: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 pathname[PATH_MAX]; data/stress-ng-0.11.24/stress-mknod.c:224: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). dirfd = open(pathname, O_DIRECTORY | O_RDONLY); data/stress-ng-0.11.24/stress-mknod.c:236:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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/stress-ng-0.11.24/stress-mmap.c:470: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-mmap.c:548: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). context.fd = open(filename, file_flags, S_IRUSR | S_IWUSR); data/stress-ng-0.11.24/stress-mmapaddr.c:48: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 vec[1]; data/stress-ng-0.11.24/stress-mmapaddr.c:87: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 vec[1]; data/stress-ng-0.11.24/stress-mmapfork.c:249: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 buffer[1024]; data/stress-ng-0.11.24/stress-mq.c:83: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 mq_name[64]; data/stress-ng-0.11.24/stress-mq.c:103: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("/proc/sys/fs/mqueue/msg_default", "r"); data/stress-ng-0.11.24/stress-mq.c:191: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 buffer[1024]; data/stress-ng-0.11.24/stress-msg.c:111: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("/proc/sysvipc/msg", O_RDONLY); data/stress-ng-0.11.24/stress-msg.c:118: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 buffer[1024]; data/stress-ng-0.11.24/stress-msync.c:107: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-msync.c:142: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(filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR)) < 0) { data/stress-ng-0.11.24/stress-netlink-proc.c:65: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 __attribute__ ((aligned(NLMSG_ALIGNTO)))buf[4096]; data/stress-ng-0.11.24/stress-netlink-proc.c:140: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 newname[128]; data/stress-ng-0.11.24/stress-netlink-task.c:52: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 data[1024]; data/stress-ng-0.11.24/stress-netlink-task.c:102: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(NLA_DATA(na), nla_data, nla_len); data/stress-ng-0.11.24/stress-ng.c:1023: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 munged_name[len]; data/stress-ng-0.11.24/stress-ng.c:1189: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 buffer[80]; data/stress-ng-0.11.24/stress-ng.c:1262: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 opt_s[10] = ""; data/stress-ng-0.11.24/stress-ng.c:1724:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[64]; data/stress-ng-0.11.24/stress-ng.c:1900: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 buffer[64]; data/stress-ng-0.11.24/stress-ng.c:2708:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). i16 = atoi(optarg); data/stress-ng-0.11.24/stress-ng.c:3255: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). yaml = fopen(yaml_filename, "w"); data/stress-ng-0.11.24/stress-ng.h:2375: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. MACRO(memcpy) \ data/stress-ng-0.11.24/stress-ng.h:2404: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). MACRO(open) \ data/stress-ng-0.11.24/stress-ng.h:2503:8: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. MACRO(vfork) \ data/stress-ng-0.11.24/stress-ng.h:4171: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 f_fname[6]; data/stress-ng-0.11.24/stress-ng.h:4172: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 f_fpack[6]; data/stress-ng-0.11.24/stress-ng.h:4184: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 data[128]; data/stress-ng-0.11.24/stress-null.c:40: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 buffer[4096]; data/stress-ng-0.11.24/stress-null.c:42: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/null", O_RDWR)) < 0) { data/stress-ng-0.11.24/stress-numa.c:109: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 buffer[8192], *str = NULL, *ptr; data/stress-ng-0.11.24/stress-numa.c:112: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("/proc/self/status", "r"); data/stress-ng-0.11.24/stress-oom-pipe.c:52: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 buffer[page_size]; data/stress-ng-0.11.24/stress-opcode.c:210: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(ops_begin, text_start + offset, ops_len); data/stress-ng-0.11.24/stress-open.c:54: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(pathname, flags); data/stress-ng-0.11.24/stress-open.c:63: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(pathname, flags, mode); data/stress-ng-0.11.24/stress-open.c:183: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-open.c:202: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-open.c:276:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[PATH_MAX]; data/stress-ng-0.11.24/stress-open.c:280: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(name, O_RDONLY); data/stress-ng-0.11.24/stress-open.c:295: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-physpage.c:122: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 data[16]; data/stress-ng-0.11.24/stress-physpage.c:150: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_pm = open("/proc/self/pagemap", O_RDONLY); data/stress-ng-0.11.24/stress-physpage.c:160: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_pc = open("/proc/kpagecount", O_RDONLY); data/stress-ng-0.11.24/stress-physpage.c:171: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). fd_mem = open("/dev/mem", O_RDONLY); data/stress-ng-0.11.24/stress-pidfd.c:51: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 buffer[1024]; data/stress-ng-0.11.24/stress-pidfd.c:59: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). fd = open(buffer, o_flags); data/stress-ng-0.11.24/stress-pipe.c:198:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[pipe_data_size]; data/stress-ng-0.11.24/stress-pipe.c:224: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[pipe_data_size]; data/stress-ng-0.11.24/stress-pipe.c:250: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(buf, PIPE_STOP, sizeof(PIPE_STOP)); data/stress-ng-0.11.24/stress-poll.c:46: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[POLL_BUF]; data/stress-ng-0.11.24/stress-poll.c:118:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[POLL_BUF]; data/stress-ng-0.11.24/stress-prctl.c:396: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 name[17]; data/stress-ng-0.11.24/stress-procfs.c:65: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 proc_path[PATH_MAX]; data/stress-ng-0.11.24/stress-procfs.c:149: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 buffer[PROC_BUF_SZ]; data/stress-ng-0.11.24/stress-procfs.c:150: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-procfs.c:180: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 ((fd = open(path, O_RDONLY | O_NONBLOCK)) < 0) data/stress-ng-0.11.24/stress-procfs.c:252: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 ((fd = open(path, O_RDONLY | O_NONBLOCK)) < 0) data/stress-ng-0.11.24/stress-procfs.c:273: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 ((fd = open(path, O_RDONLY | O_NONBLOCK)) < 0) data/stress-ng-0.11.24/stress-procfs.c:403: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). if ((fd = open(path, O_WRONLY | O_NONBLOCK)) < 0) data/stress-ng-0.11.24/stress-procfs.c:431: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_NONBLOCK); data/stress-ng-0.11.24/stress-procfs.c:484: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 tmp[PATH_MAX]; data/stress-ng-0.11.24/stress-procfs.c:556: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-procfs.c:655:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 procfspath[PATH_MAX]; data/stress-ng-0.11.24/stress-pthread.c:286: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). fd = open("/proc/self/ns/uts", O_RDONLY); data/stress-ng-0.11.24/stress-pty.c:93: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). ptys[n].leader = open("/dev/ptmx", O_RDWR); data/stress-ng-0.11.24/stress-pty.c:120:24: [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). ptys[n].follower = open(ptys[n].followername, O_RDWR); data/stress-ng-0.11.24/stress-quota.c:139: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 buffer[1024]; data/stress-ng-0.11.24/stress-quota.c:263: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 *mnts[MAX_DEVS]; data/stress-ng-0.11.24/stress-quota.c:289: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-radixsort.c:88: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 revtable[256]; data/stress-ng-0.11.24/stress-ramfs.c:138: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 filename[PATH_MAX + 5]; data/stress-ng-0.11.24/stress-ramfs.c:139: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 symlinkname[PATH_MAX + 5]; data/stress-ng-0.11.24/stress-ramfs.c:146: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(filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); data/stress-ng-0.11.24/stress-ramfs.c:206: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 pathname[PATH_MAX], realpathname[PATH_MAX]; data/stress-ng-0.11.24/stress-ramfs.c:244: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 opt[32]; data/stress-ng-0.11.24/stress-rawdev.c:119: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[blksz << 1]; data/stress-ng-0.11.24/stress-rawdev.c:155: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[blksz << 1]; data/stress-ng-0.11.24/stress-rawdev.c:186: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[blksz << 1]; data/stress-ng-0.11.24/stress-rawdev.c:222: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[blksz << 1]; data/stress-ng-0.11.24/stress-rawdev.c:249: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[blksz << 1]; data/stress-ng-0.11.24/stress-rawdev.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 path[PATH_MAX], devpath[PATH_MAX]; data/stress-ng-0.11.24/stress-rawdev.c:368: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, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); data/stress-ng-0.11.24/stress-rawdev.c:393: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(devpath, O_RDONLY | O_NONBLOCK); data/stress-ng-0.11.24/stress-rawdev.c:420: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(devpath, O_RDONLY | O_DIRECT); data/stress-ng-0.11.24/stress-rawpkt.c:210: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[PACKET_SIZE]; data/stress-ng-0.11.24/stress-rawpkt.c:224: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(eth->h_source, hwaddr->ifr_addr.sa_data, sizeof(eth->h_dest)); data/stress-ng-0.11.24/stress-rawpkt.c:242: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(&sadr.sll_addr, eth->h_dest, sizeof(eth->h_dest)); data/stress-ng-0.11.24/stress-rawpkt.c:294: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[PACKET_SIZE]; data/stress-ng-0.11.24/stress-rawudp.c:88: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[PACKET_SIZE]; data/stress-ng-0.11.24/stress-rawudp.c:167: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[PACKET_SIZE]; data/stress-ng-0.11.24/stress-readahead.c:86: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-readahead.c:116: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(filename, flags, S_IRUSR | S_IWUSR)) < 0) { data/stress-ng-0.11.24/stress-rename.c:67: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). file_fd = open(old_name, O_RDONLY); data/stress-ng-0.11.24/stress-rename.c:167: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). file_fd = open(old_name, O_RDONLY); data/stress-ng-0.11.24/stress-rename.c:191: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 name1[PATH_MAX], name2[PATH_MAX]; data/stress-ng-0.11.24/stress-rename.c:212: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(oldname, "w+")) == NULL) { data/stress-ng-0.11.24/stress-rename.c:261: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). oldfd = open(".", O_RDONLY | O_DIRECTORY); data/stress-ng-0.11.24/stress-rename.c:300: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). oldfd = open(".", O_RDONLY | O_DIRECTORY); data/stress-ng-0.11.24/stress-resources.c:95: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 mq_name[64]; data/stress-ng-0.11.24/stress-resources.c:173: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 tmpfilename[64]; data/stress-ng-0.11.24/stress-resources.c:175: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 name[32]; data/stress-ng-0.11.24/stress-resources.c:244: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(tmpfilename, O_RDONLY); data/stress-ng-0.11.24/stress-resources.c:292: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). info[i].fd_open = open("/dev/null", O_RDONLY | flag); data/stress-ng-0.11.24/stress-resources.c:324: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). info[i].fd_tmp = open("/tmp", O_TMPFILE | O_RDWR | flag, data/stress-ng-0.11.24/stress-resources.c:399:24: [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). info[i].pty_master = open("/dev/ptmx", O_RDWR | flag); data/stress-ng-0.11.24/stress-resources.c:405: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). info[i].pty_slave = open(slavename, O_RDWR | flag); data/stress-ng-0.11.24/stress-revio.c:296: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-revio.c:374: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 ((fd = open(filename, flags, S_IRUSR | S_IWUSR)) < 0) { data/stress-ng-0.11.24/stress-rlimit.c:150: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 unsigned char stack[MINSIGSTKSZ]; data/stress-ng-0.11.24/stress-rlimit.c:244: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). fds[i] = open("/dev/null", O_RDONLY); data/stress-ng-0.11.24/stress-rlimit.c:272: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-rmap.c:103:12: [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(mappings[i], mappings[i + 1], sz); data/stress-ng-0.11.24/stress-rmap.c:132: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-rmap.c:159: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(filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR)) < 0) { data/stress-ng-0.11.24/stress-rtc.c:66: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/rtc", O_RDONLY)) < 0) { data/stress-ng-0.11.24/stress-rtc.c:195: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-rtc.c:196: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[4096]; data/stress-ng-0.11.24/stress-rtc.c:225: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[4096]; data/stress-ng-0.11.24/stress-sctp.c:157: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[SOCKET_BUF]; data/stress-ng-0.11.24/stress-sctp.c:243: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[SOCKET_BUF]; data/stress-ng-0.11.24/stress-seal.c:70: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-seal.c:75: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[page_size]; data/stress-ng-0.11.24/stress-seccomp.c:67: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). ALLOW_SYSCALL(open), data/stress-ng-0.11.24/stress-seccomp.c:90: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). ALLOW_SYSCALL(open), data/stress-ng-0.11.24/stress-seccomp.c:337: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). if ((fd = open("/dev/null", O_WRONLY)) < 0) { data/stress-ng-0.11.24/stress-seek.c:74: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-seek.c:99: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(filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR)) < 0) { data/stress-ng-0.11.24/stress-sem-sysv.c:121: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("/proc/sysvipc/sem", O_RDONLY); data/stress-ng-0.11.24/stress-sem-sysv.c:128: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 buffer[1024]; data/stress-ng-0.11.24/stress-sendfile.c:58: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-sendfile.c:78: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). if ((fdin = open(filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR)) < 0) { data/stress-ng-0.11.24/stress-sendfile.c:95: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 ((fdout = open("/dev/null", O_WRONLY)) < 0) { data/stress-ng-0.11.24/stress-set.c:107: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 hostname[STRESS_HOST_NAME_LEN]; data/stress-ng-0.11.24/stress-set.c:313:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[128]; data/stress-ng-0.11.24/stress-shm-sysv.c:378: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("/proc/sysvipc/shm", O_RDONLY); data/stress-ng-0.11.24/stress-shm-sysv.c:385: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 buffer[1024]; data/stress-ng-0.11.24/stress-shm-sysv.c:405: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-shm-sysv.c:416: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, O_RDONLY); data/stress-ng-0.11.24/stress-shm-sysv.c:418: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 pathlink[PATH_MAX]; data/stress-ng-0.11.24/stress-shm.c:31: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 shm_name[SHM_NAME_LEN]; data/stress-ng-0.11.24/stress-sigio.c:53: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 buffer[BUFFER_SIZE]; data/stress-ng-0.11.24/stress-sigio.c:133: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 buffer[BUFFER_SIZE >> 4]; data/stress-ng-0.11.24/stress-sigpipe.c:84: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. static char stack[CLONE_STACK_SIZE]; data/stress-ng-0.11.24/stress-sigpipe.c:145: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[args->page_size * 2]; data/stress-ng-0.11.24/stress-sock.c:182: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[4096], *ptr, *ctrl; data/stress-ng-0.11.24/stress-sock.c:334: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[SOCKET_BUF]; data/stress-ng-0.11.24/stress-sock.c:380: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/stress-ng-0.11.24/stress-sock.c:669: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[SOCKET_BUF]; data/stress-ng-0.11.24/stress-sockabuse.c:86: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 list[4096]; data/stress-ng-0.11.24/stress-sockabuse.c:143: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[SOCKET_BUF]; data/stress-ng-0.11.24/stress-sockabuse.c:204: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[SOCKET_BUF]; data/stress-ng-0.11.24/stress-sockfd.c:68: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 ctrl[CMSG_SPACE(sizeof(int))]; data/stress-ng-0.11.24/stress-sockfd.c:69: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 msg_data[1] = { MSG_ID }; data/stress-ng-0.11.24/stress-sockfd.c:101: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 msg_data[1]; data/stress-ng-0.11.24/stress-sockfd.c:102: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 ctrl[CMSG_SPACE(sizeof(int))]; data/stress-ng-0.11.24/stress-sockfd.c:312: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). new_fd = open("/dev/zero", O_RDWR); data/stress-ng-0.11.24/stress-sockmany.c:82:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[SOCKET_MANY_BUF]; data/stress-ng-0.11.24/stress-sockmany.c:160: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[SOCKET_MANY_BUF]; data/stress-ng-0.11.24/stress-spawn.c:60: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 path[PATH_MAX + 1]; data/stress-ng-0.11.24/stress-splice.c:72: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_in = open("/dev/zero", O_RDONLY)) < 0) { data/stress-ng-0.11.24/stress-splice.c:93: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_out = open("/dev/null", O_WRONLY)) < 0) { data/stress-ng-0.11.24/stress-stackmmap.c:126: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-stackmmap.c:138: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(filename, O_SYNC | O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); data/stress-ng-0.11.24/stress-str.c:219: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[len1 + len2 + 1]; data/stress-ng-0.11.24/stress-str.c:246: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[len1 + len2 + 1]; data/stress-ng-0.11.24/stress-str.c:273: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[len1 + len2 + 1]; data/stress-ng-0.11.24/stress-str.c:309: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[len1 + len2 + 1]; data/stress-ng-0.11.24/stress-str.c:341: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[len1 + len2 + 1]; data/stress-ng-0.11.24/stress-str.c:552: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[len1 + len2]; data/stress-ng-0.11.24/stress-str.c:662: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 ALIGN64 str1[256], ALIGN64 str2[128]; data/stress-ng-0.11.24/stress-swap.c:153: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-swap.c:173: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(filename, O_CREAT | O_RDWR, S_IRUSR); data/stress-ng-0.11.24/stress-switch.c:110: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[buf_size]; data/stress-ng-0.11.24/stress-switch.c:137: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[buf_size]; data/stress-ng-0.11.24/stress-sync-file.c:111: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-sync-file.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(filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR)) < 0) { data/stress-ng-0.11.24/stress-sysbadaddr.c:529: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((char *)addr, O_RDONLY); data/stress-ng-0.11.24/stress-sysbadaddr.c:545: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("/dev/zero", O_RDONLY); data/stress-ng-0.11.24/stress-sysbadaddr.c:573: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("/dev/null", O_WRONLY); data/stress-ng-0.11.24/stress-sysbadaddr.c:585: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("/dev/zero", O_RDONLY); data/stress-ng-0.11.24/stress-sysbadaddr.c:602: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("/dev/zero", O_RDONLY); data/stress-ng-0.11.24/stress-sysbadaddr.c:629: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("/dev/zero", O_RDONLY); data/stress-ng-0.11.24/stress-sysbadaddr.c:747: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("/dev/null", O_WRONLY); data/stress-ng-0.11.24/stress-sysbadaddr.c:759: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("/dev/zero", O_RDONLY); data/stress-ng-0.11.24/stress-sysfs.c:41: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 sysfs_path[PATH_MAX]; data/stress-ng-0.11.24/stress-sysfs.c:95: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 buffer[1024]; data/stress-ng-0.11.24/stress-sysfs.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 buffer[SYS_BUF_SZ]; data/stress-ng-0.11.24/stress-sysfs.c:128: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-sysfs.c:157: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 ((fd = open(path, O_RDONLY | O_NONBLOCK)) < 0) { data/stress-ng-0.11.24/stress-sysfs.c:203: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 ((fd = open(path, O_RDONLY | O_NONBLOCK)) < 0) data/stress-ng-0.11.24/stress-sysfs.c:326: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). if ((fd = open(path, O_WRONLY | O_NONBLOCK)) < 0) data/stress-ng-0.11.24/stress-sysfs.c:343: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_RDWR | O_NONBLOCK)) < 0) data/stress-ng-0.11.24/stress-sysfs.c:479: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 tmp[PATH_MAX]; data/stress-ng-0.11.24/stress-sysfs.c:546: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 tmp[PATH_MAX]; data/stress-ng-0.11.24/stress-sysfs.c:616: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). ctxt.kmsgfd = open("/dev/kmsg", O_RDONLY | O_NONBLOCK); data/stress-ng-0.11.24/stress-sysfs.c:642:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 sysfspath[PATH_MAX]; data/stress-ng-0.11.24/stress-sysinfo.c:44: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 *mnts[128]; data/stress-ng-0.11.24/stress-sysinfo.c:112: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(mnts[i], O_RDONLY | O_DIRECTORY); data/stress-ng-0.11.24/stress-sysinfo.c:117: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 label[FSLABEL_MAX]; data/stress-ng-0.11.24/stress-sysinval.c:996: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 DEFSYS(open) data/stress-ng-0.11.24/stress-sysinval.c:997: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). { SYS(open), 3, { ARG_EMPTY_FILENAME, ARG_FLAG, ARG_MODE, 0, 0, 0 } }, data/stress-ng-0.11.24/stress-sysinval.c:1789: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 filler[4096]; data/stress-ng-0.11.24/stress-sysinval.c:2293: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-sysinval.c:2315: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). fds[0] = open(filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); data/stress-ng-0.11.24/stress-tee.c:85: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 buffer[TEE_IO_SIZE]; data/stress-ng-0.11.24/stress-tee.c:108: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 buffer[TEE_IO_SIZE]; data/stress-ng-0.11.24/stress-tee.c:189: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("/dev/null", O_WRONLY); data/stress-ng-0.11.24/stress-timerfd.c:110: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 file_fd_name[PATH_MAX]; data/stress-ng-0.11.24/stress-timerfd.c:149: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). file_fd = open(file_fd_name, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); data/stress-ng-0.11.24/stress-tlb-shootdown.c:113: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 buffer[page_size]; data/stress-ng-0.11.24/stress-tlb-shootdown.c:129:12: [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(buffer, ptr, page_size); data/stress-ng-0.11.24/stress-tmpfs.c:100: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-tmpfs.c:101: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 *mnts[MAX_MOUNTS]; data/stress-ng-0.11.24/stress-tmpfs.c:133: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). fd = open(path, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); data/stress-ng-0.11.24/stress-tmpfs.c:217:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[1]; data/stress-ng-0.11.24/stress-tmpfs.c:228:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[1]; data/stress-ng-0.11.24/stress-tun.c:60: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(tun_dev, O_RDWR); data/stress-ng-0.11.24/stress-tun.c:88: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 ip_addr[32]; data/stress-ng-0.11.24/stress-tun.c:100: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). fd = open(tun_dev, O_RDWR); data/stress-ng-0.11.24/stress-tun.c:170:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 buffer[4]; data/stress-ng-0.11.24/stress-udp-flood.c:70: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 data[64] = data/stress-ng-0.11.24/stress-udp-flood.c:91: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[sz]; data/stress-ng-0.11.24/stress-udp.c:132:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[UDP_BUF]; data/stress-ng-0.11.24/stress-udp.c:274: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[UDP_BUF]; data/stress-ng-0.11.24/stress-uprobe.c:65: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, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); data/stress-ng-0.11.24/stress-uprobe.c:83: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 path[PATH_MAX], perm[5], buf[1024]; data/stress-ng-0.11.24/stress-uprobe.c:89: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(path, "r"); data/stress-ng-0.11.24/stress-uprobe.c:121: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 + 256], libc_path[PATH_MAX]; data/stress-ng-0.11.24/stress-uprobe.c:123: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 event[128]; data/stress-ng-0.11.24/stress-uprobe.c:172: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("/sys/kernel/debug/tracing/trace_pipe", O_RDONLY); data/stress-ng-0.11.24/stress-uprobe.c:194:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[4096]; data/stress-ng-0.11.24/stress-urandom.c:60: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). fd_urnd = open("/dev/urandom", O_RDONLY); data/stress-ng-0.11.24/stress-urandom.c:71: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). fd_rnd = open("/dev/random", O_RDONLY | O_NONBLOCK); data/stress-ng-0.11.24/stress-urandom.c:83: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). fd_rnd_blk = open("/dev/random", O_RDONLY); data/stress-ng-0.11.24/stress-urandom.c:96: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). fd_rnd_wr = open("/dev/random", O_WRONLY | O_NONBLOCK); data/stress-ng-0.11.24/stress-urandom.c:110: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 buffer[8192]; data/stress-ng-0.11.24/stress-utime.c:51: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 path[PATH_MAX]; data/stress-ng-0.11.24/stress-utime.c:54: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-utime.c:68: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). dir_fd = open(path, O_DIRECTORY | O_PATH); data/stress-ng-0.11.24/stress-utime.c:73: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(filename, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR)) < 0) { data/stress-ng-0.11.24/stress-verity.c:56: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-verity.c:74: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 digest_buf[256]; data/stress-ng-0.11.24/stress-verity.c:76: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 block[512]; data/stress-ng-0.11.24/stress-verity.c:79: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). fd = open(filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); data/stress-ng-0.11.24/stress-verity.c:103: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). fd = open(filename, O_RDONLY); data/stress-ng-0.11.24/stress-verity.c:183: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). fd = open(filename, O_RDONLY); data/stress-ng-0.11.24/stress-vforkmany.c:43:9: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. return vfork(); data/stress-ng-0.11.24/stress-vm-splice.c:93: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/null", O_WRONLY)) < 0) { data/stress-ng-0.11.24/stress-watchdog.c:145: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). fd = open(dev_watchdog, O_RDWR); data/stress-ng-0.11.24/stress-wcstr.c:193:2: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t buf[len1 + len2 + 1]; data/stress-ng-0.11.24/stress-wcstr.c:219:2: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t buf[len1 + len2 + 1]; data/stress-ng-0.11.24/stress-wcstr.c:244:2: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t buf[len1 + len2 + 1]; data/stress-ng-0.11.24/stress-wcstr.c:279:2: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t buf[len1 + len2 + 1]; data/stress-ng-0.11.24/stress-wcstr.c:312:2: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t buf[len1 + len2 + 1]; data/stress-ng-0.11.24/stress-wcstr.c:538:2: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t buf[len1 + len2]; data/stress-ng-0.11.24/stress-wcstr.c:660:2: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t ALIGN64 str1[STR1LEN], ALIGN64 str2[STR2LEN]; data/stress-ng-0.11.24/stress-xattr.c:53: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 filename[PATH_MAX]; data/stress-ng-0.11.24/stress-xattr.c:60: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(filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR)) < 0) { data/stress-ng-0.11.24/stress-xattr.c:69: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 attrname[32]; data/stress-ng-0.11.24/stress-xattr.c:70: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 value[32]; data/stress-ng-0.11.24/stress-xattr.c:71: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 tmp[sizeof(value)]; data/stress-ng-0.11.24/stress-xattr.c:72: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 small_tmp[1]; data/stress-ng-0.11.24/stress-xattr.c:75: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 bad_attrname[32]; data/stress-ng-0.11.24/stress-zero.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 wr_buffer[page_size]; data/stress-ng-0.11.24/stress-zero.c:96: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", flags)) < 0) { data/stress-ng-0.11.24/stress-zlib.c:466: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(ptr, &s, sizeof(double)); data/stress-ng-0.11.24/stress-zlib.c:749: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 *morse_table[256]; data/stress-ng-0.11.24/stress-zlib.c:1058: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 buf[1024]; data/stress-ng-0.11.24/stress-zlib.c:1107: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 unsigned char in[DATA_SIZE]; data/stress-ng-0.11.24/stress-zlib.c:1108: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 unsigned char out[DATA_SIZE]; data/stress-ng-0.11.24/stress-zlib.c:1301:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 in[DATA_SIZE]; data/stress-ng-0.11.24/stress-zlib.c:1330:21: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 out[DATA_SIZE]; data/stress-ng-0.11.24/stress-zlib.c:1576: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 value[21]; data/stress-ng-0.11.24/test/test-builtin-prefetch.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 data[256]; data/stress-ng-0.11.24/test/test-dup3.c:38: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). fd1 = open("/dev/zero", O_RDONLY); data/stress-ng-0.11.24/test/test-dup3.c:42: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). fd2 = open("/dev/null", O_WRONLY); data/stress-ng-0.11.24/test/test-fdatasync.c:36: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(filename, O_RDWR | O_CREAT, 0666); data/stress-ng-0.11.24/test/test-flistxattr.c:33: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 list[1024]; data/stress-ng-0.11.24/test/test-fsync.c:36: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(filename, O_RDWR | O_CREAT, 0666); data/stress-ng-0.11.24/test/test-futimens.c:44: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(filename, O_RDWR | O_CREAT, 0666); data/stress-ng-0.11.24/test/test-futimes.c:37: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(filename, O_RDWR | O_CREAT, 0666); data/stress-ng-0.11.24/test/test-getdomainname.c:30: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 name[128]; data/stress-ng-0.11.24/test/test-gethostname.c:30: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 name[128]; data/stress-ng-0.11.24/test/test-inotify.c:91: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 buffer[1024]; data/stress-ng-0.11.24/test/test-listxattr.c:32: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 list[1024]; data/stress-ng-0.11.24/test/test-llistxattr.c:32: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 list[1024]; data/stress-ng-0.11.24/test/test-lockf.c:35: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(filename, O_RDWR | O_CREAT, 0666); data/stress-ng-0.11.24/test/test-lookup-dcookie.c:36: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[4096]; data/stress-ng-0.11.24/test/test-madvise.c:27: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 buffer[8192]; data/stress-ng-0.11.24/test/test-mincore.c:30: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 buffer[8192]; data/stress-ng-0.11.24/test/test-mincore.c:38: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 vec[1]; data/stress-ng-0.11.24/test/test-mlock.c:29: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 buffer[8192]; data/stress-ng-0.11.24/test/test-mlock2.c:33: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 buffer[8192]; data/stress-ng-0.11.24/test/test-mprotect.c:29: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 buffer[8192]; data/stress-ng-0.11.24/test/test-mq-posix.c:57: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 mq_name[64]; data/stress-ng-0.11.24/test/test-mq-sysv.c:44: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 msg[MAX_SIZE]; data/stress-ng-0.11.24/test/test-mq-sysv.c:67:8: [2] (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). Risk is low because the source is a constant string. (void)strcpy(msg.msg, "TESTMSG"); data/stress-ng-0.11.24/test/test-msync.c:39: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 buffer[8192]; data/stress-ng-0.11.24/test/test-msync.c:47: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(filename, O_RDWR | O_CREAT, 0666); data/stress-ng-0.11.24/test/test-munlock.c:29: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 buffer[8192]; data/stress-ng-0.11.24/test/test-posix-fadvise.c:40: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(filename, O_RDWR | O_CREAT, 0666); data/stress-ng-0.11.24/test/test-posix-fallocate.c:34: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(filename, O_RDWR | O_CREAT, 0666); data/stress-ng-0.11.24/test/test-posix-madvise.c:27: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 buffer[8192]; data/stress-ng-0.11.24/test/test-preadv.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 data[IO_LEN]; data/stress-ng-0.11.24/test/test-preadv.c:41: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("/dev/zero", O_RDONLY); data/stress-ng-0.11.24/test/test-preadv2.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 data[IO_LEN]; data/stress-ng-0.11.24/test/test-preadv2.c:41: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("/dev/zero", O_RDONLY); data/stress-ng-0.11.24/test/test-pthread-attr-setstack.c:33: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 unsigned char stack[65536]; data/stress-ng-0.11.24/test/test-pwritev.c:39: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("/dev/zero", O_WRONLY); data/stress-ng-0.11.24/test/test-pwritev2.c:39: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("/dev/zero", O_WRONLY); data/stress-ng-0.11.24/test/test-readlinkat.c:32: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[4096]; data/stress-ng-0.11.24/test/test-setdomainname.c:31: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 name[128]; data/stress-ng-0.11.24/test/test-setns.c:38: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("/proc/self/ns/uts", O_RDONLY); data/stress-ng-0.11.24/test/test-sigaltstack.c:34: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 stack[SZ]; data/stress-ng-0.11.24/test/test-swapcontext.c:35: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 unsigned char stack[63336]; data/stress-ng-0.11.24/test/test-syncfs.c:41: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(filename, O_RDWR | O_CREAT, 0666); data/stress-ng-0.11.24/core-cache.c:172: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). const size_t index_posn = index_path ? strlen(index_path) : 0; data/stress-ng-0.11.24/core-cache.c:319: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). const size_t cpu_path_len = cpu_path ? strlen(cpu_path) : 0; data/stress-ng-0.11.24/core-cache.c:320: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). char path[cpu_path_len + strlen(SYS_CPU_CACHE_DIR) + 2]; data/stress-ng-0.11.24/core-cache.c:368: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). char fullpath[strlen(path) + strlen(name) + 2]; data/stress-ng-0.11.24/core-cache.c:368: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). char fullpath[strlen(path) + strlen(name) + 2]; data/stress-ng-0.11.24/core-cache.c:425: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 size_t fullpath_len = strlen(SYS_CPU_PREFIX) + strlen(name) + 2; data/stress-ng-0.11.24/core-cache.c:425:56: [1] (buffer) strlen: Does not handle 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 fullpath_len = strlen(SYS_CPU_PREFIX) + strlen(name) + 2; data/stress-ng-0.11.24/core-ftrace.c:270:3: [1] (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). Risk is low because the source is a constant character. strcpy(buffer, " "); data/stress-ng-0.11.24/core-ftrace.c:274: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). ret = write(fd, buffer, strlen(buffer)); data/stress-ng-0.11.24/core-hash.c:196: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) + 1; data/stress-ng-0.11.24/core-helper.c:526: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). if (write(fd, str, strlen(str)) < 0) data/stress-ng-0.11.24/core-helper.c:614: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). const size_t str_len = strlen(str); data/stress-ng-0.11.24/core-helper.c:1063:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buf, buf_len); data/stress-ng-0.11.24/core-helper.c:1981:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, (buffer) + rbytes, size - rbytes); data/stress-ng-0.11.24/core-ignite-cpu.c:76: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). ret1 = system_write(path, buffer, strlen(buffer)); data/stress-ng-0.11.24/core-ignite-cpu.c:83: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). ret2 = system_write(path, governor, strlen(governor)); data/stress-ng-0.11.24/core-ignite-cpu.c:168: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/stress-ng-0.11.24/core-ignite-cpu.c:173:4: [1] (buffer) strlen: Does not handle 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(settings[i].default_setting); data/stress-ng-0.11.24/core-job.c:183: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). const size_t len = strlen(new_argv[1]) + 3; data/stress-ng-0.11.24/core-log.c:172:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ts, empty_ts, sizeof(ts)); data/stress-ng-0.11.24/core-log.c:183:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ts, empty_ts, sizeof(ts)); data/stress-ng-0.11.24/core-out-of-memory.c:53:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buf, sizeof(buf) - 1); data/stress-ng-0.11.24/core-out-of-memory.c:87: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(str); data/stress-ng-0.11.24/core-parse-opts.c:207: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(str); data/stress-ng-0.11.24/core-parse-opts.c:267: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(str); data/stress-ng-0.11.24/core-perf.c:522:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, &data, sizeof(data)); data/stress-ng-0.11.24/core-shim.c:630:7: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. if (usleep(usec) < 0) { data/stress-ng-0.11.24/core-shim.c:676:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. return usleep((useconds_t)usec); data/stress-ng-0.11.24/core-shim.c:1064: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). return strlen(s) + tmplen; data/stress-ng-0.11.24/core-thrash.c:78:7: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (sscanf(buffer, "%" SCNx64 "-%" SCNx64 data/stress-ng-0.11.24/core-thrash.c:102:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sz = read(fdmem, &data, sizeof(data)); data/stress-ng-0.11.24/stress-access.c:112:8: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (void)umask(0700); data/stress-ng-0.11.24/stress-af-alg.c:127: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). const char *end = ptr + strlen(buffer); data/stress-ng-0.11.24/stress-af-alg.c:136: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). const size_t n = strlen(crypto_type_info[i].name); data/stress-ng-0.11.24/stress-af-alg.c:481:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, output, DATA_LEN) != DATA_LEN) { data/stress-ng-0.11.24/stress-af-alg.c:529:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, output, DATA_LEN) != DATA_LEN) { data/stress-ng-0.11.24/stress-af-alg.c:604:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, output, output_size) != output_size) { data/stress-ng-0.11.24/stress-apparmor.c:143:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buffer, sz); data/stress-ng-0.11.24/stress-bad-ioctl.c:262: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(d->d_name); data/stress-ng-0.11.24/stress-cyclic.c:361:8: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. ret = usleep(usecs); data/stress-ng-0.11.24/stress-cyclic.c:690:10: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. (void)usleep(50000); data/stress-ng-0.11.24/stress-daemon.c:100:10: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (void)umask(0); data/stress-ng-0.11.24/stress-daemon.c:171:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(fds[0], buf, sizeof(buf)); data/stress-ng-0.11.24/stress-dentry.c:182:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buf, sizeof(buf)); data/stress-ng-0.11.24/stress-dev.c:1140:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buffer, page_size); data/stress-ng-0.11.24/stress-dev.c:2301:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, data, sizeof(data)); data/stress-ng-0.11.24/stress-dev.c:2862: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(d->d_name); data/stress-ng-0.11.24/stress-dirdeep.c:348: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). path_len = strlen(rootpath); data/stress-ng-0.11.24/stress-dnotify.c:242:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (keep_stressing_flag() && (read(fd, buffer, 1) < 0)) { data/stress-ng-0.11.24/stress-efivar.c:129:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(fd, data, sizeof(data)); data/stress-ng-0.11.24/stress-efivar.c:165:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(fd, buf, buf_len); data/stress-ng-0.11.24/stress-efivar.c:260:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(fd, data, sizeof(data)); data/stress-ng-0.11.24/stress-eventfd.c:120:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd1, re, sizeof(re)); data/stress-ng-0.11.24/stress-eventfd.c:126:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd1, &val, sizeof(val)); data/stress-ng-0.11.24/stress-eventfd.c:223:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd2, &val, sizeof(val)); data/stress-ng-0.11.24/stress-fanotify.c:452:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(fd, buffer, sizeof(buffer)); data/stress-ng-0.11.24/stress-fanotify.c:518:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((len = read(fan_fd, (void *)buffer, BUFFER_SIZE)) > 0) { data/stress-ng-0.11.24/stress-fifo.c:128:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sz = read(fd, &val, sizeof(val)); data/stress-ng-0.11.24/stress-filename.c:302: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). ptr = filename + strlen(pathname); data/stress-ng-0.11.24/stress-filename.c:327: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). chars_allowed = strlen(allowed); data/stress-ng-0.11.24/stress-fstat.c:93: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). if (!strncmp(filename, blocklist[i], strlen(blocklist[i]))) data/stress-ng-0.11.24/stress-full.c:95:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buffer, sizeof(buffer)); data/stress-ng-0.11.24/stress-hdd.c:283:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(fd, buf, count); data/stress-ng-0.11.24/stress-idle-page.c:105:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, &bitmap_get, BITMAP_BYTES); data/stress-ng-0.11.24/stress-inotify.c:275:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(fd, buffer, sizeof(buffer)); data/stress-ng-0.11.24/stress-inotify.c:469:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (keep_stressing_flag() && (read(fd, buffer, 1) < 0)) { data/stress-ng-0.11.24/stress-iomix.c:214:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fd, buffer, len); data/stress-ng-0.11.24/stress-iomix.c:262:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fd, buffer, len); data/stress-ng-0.11.24/stress-iomix.c:304:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fd, buffer, len); data/stress-ng-0.11.24/stress-iomix.c:493:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fd, buffer, sizeof(buffer)); data/stress-ng-0.11.24/stress-ioport.c:175:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(fd, &val, sizeof(val)); data/stress-ng-0.11.24/stress-key.c:116: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). payload, strlen(payload), data/stress-ng-0.11.24/stress-key.c:175: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). payload, strlen(payload)) < 0) { data/stress-ng-0.11.24/stress-link.c:87: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). oldpathlen = strlen(oldpath); data/stress-ng-0.11.24/stress-mmap.c:358:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, mappings[n], page_size); data/stress-ng-0.11.24/stress-mmapfork.c:64: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). const size_t ln = strlen(src); data/stress-ng-0.11.24/stress-mq.c:208:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(mq, buffer, sizeof(buffer)); data/stress-ng-0.11.24/stress-msg.c:120:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buffer, sizeof(buffer)); data/stress-ng-0.11.24/stress-msync.c:204:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, data, sizeof(data)); data/stress-ng-0.11.24/stress-msync.c:232:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, data, sizeof(data)); data/stress-ng-0.11.24/stress-ng.c:1022: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(tmp) + 1; data/stress-ng-0.11.24/stress-ng.c:1093: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). const size_t len = strlen(token); data/stress-ng-0.11.24/stress-ng.c:1777:11: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (void)umask(0077); data/stress-ng-0.11.24/stress-ng.c:2132: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). arglen[i] = strlen(argv[i]); data/stress-ng-0.11.24/stress-numa.c:127: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). ptr = buffer + strlen(buffer) - 2; data/stress-ng-0.11.24/stress-oom-pipe.c:54:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buffer, sizeof(buffer)); data/stress-ng-0.11.24/stress-physpage.c:71:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(fd_pm, &pageinfo, sizeof(pageinfo)); data/stress-ng-0.11.24/stress-physpage.c:100:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd_pc, &page_count, sizeof(page_count)) != sizeof(page_count)) { data/stress-ng-0.11.24/stress-physpage.c:124:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rdret = read(fd_mem, data, sizeof(data)); data/stress-ng-0.11.24/stress-pipe.c:201:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(pipefds[0], buf, pipe_data_size); data/stress-ng-0.11.24/stress-pipeherd.c:59:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sz = read(fd[0], &counter, sizeof(counter)); data/stress-ng-0.11.24/stress-pipeherd.c:137:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sz = read(fd[0], &counter, sizeof(counter)); data/stress-ng-0.11.24/stress-poll.c:48:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buf, sizeof(buf)); data/stress-ng-0.11.24/stress-procfs.c:236:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buffer, sz); data/stress-ng-0.11.24/stress-procfs.c:262:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buffer, 1); data/stress-ng-0.11.24/stress-procfs.c:283:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buffer, 0); data/stress-ng-0.11.24/stress-procfs.c:301:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buffer, sizeof(buffer)); data/stress-ng-0.11.24/stress-procfs.c:315:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buffer, sizeof(buffer)); data/stress-ng-0.11.24/stress-procfs.c:390:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buffer, 1); data/stress-ng-0.11.24/stress-procfs.c:414: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(path); data/stress-ng-0.11.24/stress-resources.c:239: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). posn = strlen(tmpfilename); data/stress-ng-0.11.24/stress-seek.c:161:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rwret = read(fd, tmp, sizeof(tmp)); data/stress-ng-0.11.24/stress-sem-sysv.c:130:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buffer, sizeof(buffer)); data/stress-ng-0.11.24/stress-session.c:211:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(fds[0], &error, sizeof(error)); data/stress-ng-0.11.24/stress-set.c:317: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). ret = setdomainname(name, strlen(name)); data/stress-ng-0.11.24/stress-shm-sysv.c:387:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buffer, sizeof(buffer)); data/stress-ng-0.11.24/stress-shm-sysv.c:839:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(pipefds[0], &msg, sizeof(msg)); data/stress-ng-0.11.24/stress-shm.c:404:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(pipefds[0], &msg, sizeof(msg)); data/stress-ng-0.11.24/stress-sigfd.c:124:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(sfd, &fdsi, sizeof(fdsi)); data/stress-ng-0.11.24/stress-sigio.c:70:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(rd_fd, buffer, sizeof(buffer)); data/stress-ng-0.11.24/stress-sock.c:383: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). len = (socklen_t)strlen(ctrls[idx]); data/stress-ng-0.11.24/stress-sockfd.c:210:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fds[n], &data, sizeof(data)); data/stress-ng-0.11.24/stress-sockpair.c:158:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(socket_pair_fds[i][0], buf, sizeof(buf)); data/stress-ng-0.11.24/stress-softlockup.c:199:10: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. (void)usleep(50000); data/stress-ng-0.11.24/stress-str.c:221: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 size_t str_len1 = strlen(str1); data/stress-ng-0.11.24/stress-str.c:222: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 size_t str_len2 = strlen(str2); data/stress-ng-0.11.24/stress-str.c:275: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 size_t str_len1 = strlen(str1); data/stress-ng-0.11.24/stress-str.c:276: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 size_t str_len2 = strlen(str2); data/stress-ng-0.11.24/stress-str.c:617: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). { "strlen", stress_strlen, strlen }, data/stress-ng-0.11.24/stress-str.c:621:33: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. { "strncat", stress_strncat, strncat }, data/stress-ng-0.11.24/stress-switch.c:121:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(pipefds[0], buf, sizeof(buf)); data/stress-ng-0.11.24/stress-sysbadaddr.c:587:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, (void *)addr, 1024); data/stress-ng-0.11.24/stress-sysfs.c:97:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buffer, sizeof(buffer)); data/stress-ng-0.11.24/stress-sysfs.c:173:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buffer, sz); data/stress-ng-0.11.24/stress-sysfs.c:208:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buffer, 0); data/stress-ng-0.11.24/stress-sysfs.c:355:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buffer, sizeof(buffer)); data/stress-ng-0.11.24/stress-sysinval.c:1140:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #if DEFSYS(read) data/stress-ng-0.11.24/stress-sysinval.c:1141:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { SYS(read), 3, { ARG_FD, ARG_PTR, ARG_LEN, 0, 0, 0 } }, data/stress-ng-0.11.24/stress-sysinval.c:1142:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { SYS(read), 3, { ARG_FD, ARG_PTR_WR, ARG_LEN, 0, 0, 0 } }, data/stress-ng-0.11.24/stress-sysinval.c:1684:12: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). #if DEFSYS(umask) data/stress-ng-0.11.24/stress-sysinval.c:1685:8: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). { SYS(umask), 1, { ARG_UINT, 0, 0, 0, 0, 0 } }, data/stress-ng-0.11.24/stress-tee.c:115:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fds[0], buffer, sizeof(buffer)); data/stress-ng-0.11.24/stress-timerfd.c:225:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(timerfd[i], &expval, sizeof expval); data/stress-ng-0.11.24/stress-tmpfs.c:220:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rd = read(fd, data, sizeof(data)); data/stress-ng-0.11.24/stress-uprobe.c:69: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). if (write(fd, str, strlen(str)) < 0) data/stress-ng-0.11.24/stress-uprobe.c:96:7: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. n = sscanf(buf, "%" SCNx64 "-%" SCNx64 "%4s %" SCNx64 " %" SCNx64 data/stress-ng-0.11.24/stress-uprobe.c:208:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(fd, data, sizeof(data)); data/stress-ng-0.11.24/stress-urandom.c:116:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd_urnd, buffer, sizeof(buffer)); data/stress-ng-0.11.24/stress-urandom.c:141:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd_rnd, buffer, 1); data/stress-ng-0.11.24/stress-urandom.c:220:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd_rnd, buffer, 1); data/stress-ng-0.11.24/stress-userfaultfd.c:351:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((ret = read(fd, &msg, sizeof(msg))) < 0) { data/stress-ng-0.11.24/stress-vdso.c:304: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(vdso_sym->name) + 2); data/stress-ng-0.11.24/stress-vdso.c:313:10: [1] (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 character. (void)strcat(tmp, " "); data/stress-ng-0.11.24/stress-verity.c:197:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = (int)read(fd, block, sizeof(block)); data/stress-ng-0.11.24/stress-vm-rw.c:122:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rwret = read(ctxt->pipe_rd[0], &msg_rd, sizeof(msg_rd)); data/stress-ng-0.11.24/stress-vm-rw.c:203:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(ctxt->pipe_wr[0], &msg_rd, sizeof(msg_rd)); data/stress-ng-0.11.24/stress-wcstr.c:195:26: [1] (buffer) wcslen: Does not handle 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 str1_len = wcslen(str1); data/stress-ng-0.11.24/stress-wcstr.c:196:26: [1] (buffer) wcslen: Does not handle 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 str2_len = wcslen(str2); data/stress-ng-0.11.24/stress-wcstr.c:246:26: [1] (buffer) wcslen: Does not handle 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 str1_len = wcslen(str1); data/stress-ng-0.11.24/stress-wcstr.c:247:26: [1] (buffer) wcslen: Does not handle 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 str2_len = wcslen(str2); data/stress-ng-0.11.24/stress-wcstr.c:603:31: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). { "wcslen", stress_wcslen, wcslen }, data/stress-ng-0.11.24/stress-wcstr.c:609:33: [1] (buffer) wcsncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, or automatically resizing strings. { "wcsncat", stress_wcsncat, wcsncat }, data/stress-ng-0.11.24/stress-x86syscall.c:233: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(x86syscalls[i].name) + 2); data/stress-ng-0.11.24/stress-x86syscall.c:242:11: [1] (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 character. (void)strcat(tmp, " "); data/stress-ng-0.11.24/stress-xattr.c:81:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ret = shim_fsetxattr(fd, attrname, value, strlen(value), XATTR_CREATE); data/stress-ng-0.11.24/stress-xattr.c:104: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). ret = shim_fsetxattr(bad_fd, attrname, value, strlen(value), XATTR_CREATE); data/stress-ng-0.11.24/stress-xattr.c:110:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ret = shim_fsetxattr(fd, attrname, value, strlen(value), ~0); data/stress-ng-0.11.24/stress-xattr.c:118: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). ret = shim_lsetxattr(filename, attrname, value, strlen(value), ~0); data/stress-ng-0.11.24/stress-xattr.c:125: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). ret = shim_setxattr(filename, attrname, value, strlen(value), ~0); data/stress-ng-0.11.24/stress-xattr.c:136:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ret = shim_fsetxattr(fd, attrname, value, strlen(value), data/stress-ng-0.11.24/stress-xattr.c:147: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). ret = shim_lsetxattr(filename, attrname, value, strlen(value), data/stress-ng-0.11.24/stress-xattr.c:157: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). ret = shim_setxattr(filename, attrname, value, strlen(value), data/stress-ng-0.11.24/stress-xattr.c:211:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ret = shim_fsetxattr(fd, attrname, value, strlen(value), data/stress-ng-0.11.24/stress-xattr.c:222: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). ret = shim_lsetxattr(filename, attrname, value, strlen(value), data/stress-ng-0.11.24/stress-xattr.c:232: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). ret = shim_setxattr(filename, attrname, value, strlen(value), data/stress-ng-0.11.24/stress-xattr.c:246:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ret = shim_fsetxattr(fd, attrname, value, strlen(value), data/stress-ng-0.11.24/stress-xattr.c:257: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). ret = shim_setxattr(filename, attrname, value, strlen(value), data/stress-ng-0.11.24/stress-xattr.c:269:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ret = shim_lsetxattr(filename, attrname, value, strlen(value), data/stress-ng-0.11.24/stress-zero.c:112:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, rd_buffer, sizeof(rd_buffer)); data/stress-ng-0.11.24/test/test-fanotify.c:98:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(fan_fd, (void *)buffer, BUFFER_SIZE); data/stress-ng-0.11.24/test/test-inotify.c:99:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(fd, buffer, sizeof(buffer)); data/stress-ng-0.11.24/test/test-setdomainname.c:36: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). ret = setdomainname(name, strlen(name)); ANALYSIS SUMMARY: Hits = 1009 Lines analyzed = 122124 in approximately 2.91 seconds (41903 lines/second) Physical Source Lines of Code (SLOC) = 84459 Hits@level = [0] 320 [1] 172 [2] 726 [3] 12 [4] 78 [5] 21 Hits@level+ = [0+] 1329 [1+] 1009 [2+] 837 [3+] 111 [4+] 99 [5+] 21 Hits/KSLOC@level+ = [0+] 15.7354 [1+] 11.9466 [2+] 9.91013 [3+] 1.31425 [4+] 1.17217 [5+] 0.248641 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.