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: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich 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,
150 type, GTK_BUTTONS_CLOSE,
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,
type, GTK_BUTTONS_CLOSE,
- msg);
+ '%s', msg);

gtk_signal_connect_object (GTK_OBJECT(diag_win), "delete_event",
GTK_SIGNAL_FUNC(gtk_main_quit),

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

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 click here to 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.1-cleanup