centos 7
format weakness #2

4

Weakness Breakdown


Definition:

A format string exploit occurs when the data of an input string is evaluated as a command by the program. This class of attacks is very similar to buffer overflows since an attacker could execute code, read the stack or cause new behaviors that compromise security. Learn more about format string attacks on OWASP attack index.

Warning code(s):

If format strings can be influenced by an attacker, they can be exploited.

File Name:

at-spi-1.32.0/test/at.c

Context:

The highlighted line of code below is the trigger point of this particular Centos 7 format weakness.

  * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#include <stdio.h>
#include <stdlib.h>
#include <libbonobo.h>
#include <libspi/Accessibility.h>
#include <libspi/accessible.h>
#include <libspi/listener.h>

void
check_ev (CORBA_Environment *ev, char *desc)
{
        if (ev->_major != CORBA_NO_EXCEPTION) {
                fprintf(stderr,
                ("Accessibility app error: exception during CORBA call %s (%s)\n"),
                        CORBA_exception_id(ev), desc);
                CORBA_exception_free(ev);
                exit(-1);
        }
}

int
main(int argc, char **argv)
{
        CORBA_Environment ev;
        CORBA_Object oclient;
        char *obj_id;
        CORBA_long i;
        CORBA_short n_desktops;
        CORBA_long j;
        CORBA_long n_apps;
	CORBA_string s;
        Accessibility_Desktop desktop;
        Accessibility_Application app;
        Accessibility_Registry registry;
        SpiListener *listener;

        CORBA_exception_init(&ev);
 

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.