alpine 3.6
access weakness #293

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:

mmh/src/mmh-0.3/uip/mhshowsbr.c

Context:

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

 			continue;
		}
		if (cts[1]) {
			if (ctp != cts) {
				printf("\n\n");
			}
			printf(">>> Message %s\n\n", ct->c_file);
		}
		show_single_message(ct, formsw);
	}
}


/*
** Entry point to show/display a single message
*/

static void
show_single_message(CT ct, char *form)
{
	/*
	** Allow user executable bit so that temporary directories created by
	** the viewer (e.g., lynx) are going to be accessible
	*/
	umask(ct->c_umask & ~(0100));

	/*
	** If you have a format file, then display
	** the message headers.
	*/
	if (form)
		DisplayMsgHeader(ct, form);

	/* Show the body of the message */
	show_switch(ct, 0);

	if (ct->c_fp) {
		fclose(ct->c_fp);
		ct->c_fp = NULL;
	}
	if (ct->c_ceclosefnx)
		(*ct->c_ceclosefnx) (ct);

	flush_errors();
}


/*
** Use mhl to show the header fields
*/ 

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.