alpine 3.9
misc weakness #424


Weakness Breakdown


The software specifies permissions for a security-critical resource in a way that allows the resource to be read or modified by unintended actors.

Warning code(s):

This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data.

File Name:



The highlighted line of code below is the trigger point of this particular Alpine 3.9 misc weakness.

 char *
telnet_getenv (char *val)
  return ((char *) env_getvalue (val));

char *
telnet_gets (char *prompt, char *result, int length, int echo)
  extern char *getpass ();
# endif
  extern int globalmode;
  int om = globalmode;
  char *res;

  TerminalNewMode (-1);
  if (echo)
      printf ("%s", prompt);
      res = fgets (result, length, stdin);
      res = getpass (prompt);
      if (res)
	  strncpy (result, res, length);
	  memset (res, 0, strlen (res));
	  res = result;
  TerminalNewMode (om);
  return (res);
#endif /* defined(AUTHENTICATION) || defined(ENCRYPTION) */ 

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.