bugGKSu - Bugs: bug #19563, Format string bug in gksu.c


bug #19563: Format string bug in gksu.c

Submitted by:  None
Submitted on:  Mon 09 Apr 2007 10:43:21 PM UTC  
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Mon 09 Apr 2007 10:43:21 PM UTC, original submission:

There is a format string bug in the function gk_dialog, in gksu.c :

149 diag_win = gtk_message_dialog_new_with_markup (NULL, GTK_DIALOG_MODAL,
151 msg);

Indeed, the 5th parameter of the call to gtk_message_dialog_new_with_markup is not sanitizied, so a buggy msg can crash gksu.
This bug can be easilly reproduced :
% gksu '%s'
[...] give 3 wrong passwords [...]
zsh: segmentation fault (core dumped)

Here is a trivial patch :
--- gksu.c 2006-09-15 04:45:04.000000000 +0200
+++ gksu.c-patched 2007-04-10 00:40:44.000000000 +0200
@@ -148,7 +148,7 @@

diag_win = gtk_message_dialog_new_with_markup (NULL, GTK_DIALOG_MODAL,
- msg);
+ '%s', msg);

gtk_signal_connect_object (GTK_OBJECT(diag_win), "delete_event",



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty


Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.


Please enter the title of George Orwell's famous dystopian book (it's a date):



No changes have been made to this item

Back to the top

Powered by Savane 3.3