fedora 25
shell weakness #10

4

Weakness Breakdown


Definition:

A shell weakness occurs when a program enables an attacker to execute unexpected commands on the operating system.

Warning code(s):

This causes a new program to execute and is difficult to use safely.

File Name:

inventor/apps/demos/textomatic/textomatic.c++

Context:

The highlighted line of code below is the trigger point of this particular Fedora 25 shell weakness.

     profileCoords->point.setValues(0, n, newV);
    profileCoords->point.deleteValues(n);  // Get rid of any extra
    profile->index.deleteValues(n);

    delete[] newV;
}
//
// Callback for 'About...' button
//
void
showAboutDialog(Widget, XtPointer, XtPointer)
{
    if (access(IVDEMOBINDIR"/textomatic.about", R_OK) != 0)
    {
	system("xmessage 'Sorry, could not find "
	       IVDEMOBINDIR"/textomatic.about' > /dev/null");
	return;
    }

    char command[100];
    sprintf(command, "which " PDFVIEWER " > /dev/null");

    int err = system(command);
    if (err) {
	system("xmessage 'You must install " PDFVIEWER
	       " for this function to work' > /dev/null");
	return;
    }

    sprintf(command, PDFVIEWER " " IVDEMOBINDIR"/textomatic.about &");
    system(command);
}	

//
// Called by the quit button
//
static void
quitCallback(Widget, XtPointer, XtPointer)
{
    iconv_close( global_iconvCodeL2 );
    iconv_close( global_iconvCode28 );
    exit(0);
}

//
// These two are used to turn off/on render caching as the cursor
// enters/leaves the profile window.  Caching while editing the
// profile is stupid, since the cache is always wrong (the geometry
// changes).
// 

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.