fedora 24
integer weakness #18


Weakness Breakdown


An integer overflow occurs when the answer to an arithmetic operation exceeds the maximum size of the integer type used to store it. The resulting value will appear to have wrapped around the maximum value and started again at the minimum value. This would look like a clock that represents 13:00 by pointing at 1:00. An attacker can use an integer overflow during a buffer length calculation, which results in the allocated buffer being too small to hold the data copied into it, thus causing a buffer overflow.

Warning code(s):

Unless checked, the resulting number can exceed the expected range.

File Name:



The highlighted line of code below is the trigger point of this particular Fedora 24 integer weakness.

 				     << endl
				     << _("	-h          show this usage message") << endl
				     << _("	-v          show version information") << endl
				     << _("	-x          run in headless mode (without GUI)") << endl
				     << endl
				     << _("	-b <file>   use <file> as the bank to store presets") << endl
				     << _("	-t <file>   use <file> as a tuning file") << endl
				     << endl
				     << _("	-a <string> set the sound output driver to use [alsa/oss/auto(default)]") << endl
				     << _("	-r <int>    set the sampling rate to use") << endl
				     << _("	-m <string> set the MIDI driver to use [alsa/oss/auto(default)]") << endl
				     << _("	-c <int>    set the MIDI channel to respond to (default=all)") << endl
				     << _("	-p <int>    set the polyphony (maximum active voices)") << endl
				     << endl
				     << _("	-n <name>   specify the JACK client name to use") << endl
				     << _("	--jack_autoconnect[=<true|false>]") << endl
				     << _("	            automatically connect jack audio ports to hardware I/O ports. (Default: true)") << endl
				     << endl;

				return 0;
			case 'z':
				return 0;
			case 'P':
				initial_preset_no = atoi(optarg);
			case 'x':
				no_gui = true;
			case 'm':
				config.midi_driver = optarg;
			case 'b':
				config.current_bank_file = optarg;
			case 'c':
				config.midi_channel = atoi( optarg );
			case 'a':
				config.audio_driver = optarg;
			case 'r':
				config.sample_rate = atoi( optarg );
			case 'p':
				config.polyphony = atoi( optarg );
			case 't':
				config.current_tuning_file = optarg;

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.