alpine 3.6
access weakness #453

1

Weakness Breakdown


Definition:

An access weakness occurs when software does not properly implement permissions that could have unintended consequences if exploited by malicious actors. An example of this weakness is when a default username and password are set by the developer but do not get changed by the system administrator.

Warning code(s):

Ensure that umask is given most restrictive possible setting.

File Name:

execline/src/execline-2.3.0.1/src/execline/umask.c

Context:

The highlighted line of code below is the trigger point of this particular Alpine 3.6 access weakness.

 /* ISC license. */

#include <sys/stat.h>
#include <skalibs/types.h>
#include <skalibs/strerr2.h>
#include <skalibs/djbunix.h>

#define USAGE "umask value prog..."

int main (int argc, char const *const *argv, char const *const *envp)
{
  unsigned int m ;
  PROG = "umask" ;
  if (argc < 3) strerr_dieusage(100, USAGE) ;
  if (!uint_oscan(argv[1], &m)) strerr_dieusage(100, USAGE) ;
  umask(m) ;
  xpathexec_run(argv[2], argv+2, envp) ;
} 

The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark on a world­wide basis.