centos 7
format weakness #10

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:

libbonoboui-2.24.5/bonobo/bonobo-ui-private.h

Context:

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

 GList *bonobo_ui_internal_toolbar_get_children (GtkWidget *toolbar);

#ifdef G_OS_WIN32
const char *_bonobo_ui_get_localedir      (void);
const char *_bonobo_ui_get_datadir	  (void);
const char *_bonobo_ui_get_uidir	  (void);

#undef BONOBO_LOCALEDIR
#define BONOBO_LOCALEDIR _bonobo_ui_get_localedir()
#undef BONOBO_DATADIR
#define BONOBO_DATADIR _bonobo_ui_get_datadir()
#undef BONOBO_UIDIR
#define BONOBO_UIDIR _bonobo_ui_get_uidir()

#endif

#ifndef   DEBUG_UI

static inline void dbgprintf (const char *format, ...) { }

#else  /* DEBUG_UI */

#include <stdio.h>

#define dbgprintf(format...) fprintf(stderr, format)

#endif /* DEBUG_UI */

G_END_DECLS

#endif /* _BONOBO_UI_PRIVATE_H_ */
 

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.