GNOME Bugzilla – Bug 312974
[PATCH] gdmlogin crashes due to use-after-free bug
Last modified: 2005-08-12 16:59:59 UTC
Steps to reproduce: 1. Start gdm with malloc debugging enabled on FreeBSD 2. 3. Stack trace: #0 0x0000000803db64be in IA__g_strdup ( str=0x59a140 '\uffff' <repeats 200 times>...) at gstrfuncs.c:90 #1 0x0000000801538dfd in IA__gtk_tooltips_set_tip (tooltips=0x56d580, widget=0x593600, tip_text=0x59a140 '\uffff' <repeats 200 times>..., tip_private=0x0) at gtktooltips.c:355 #2 0x000000000040d86d in gdm_login_session_init (menu=0x582200) at gdmlogin.c:1448 #3 0x00000000004104d2 in gdm_login_gui_init () at gdmlogin.c:2789 #4 0x0000000000412ea5 in main (argc=1, argv=0x7fffffffead0) at gdmlogin.c:3746 Other information: The problem is that each dynamic session in the sessions list are initialized with pointers that are subsequently free'd. The attached patch corrects the problem by making sure the pointers are copied before they are free'd.
Created attachment 50440 [details] [review] Fix use-after-free problem in gdmlogin
Note: this bug was found courtesy of "Start Dancing".
Confirming because of the patch. Does this also apply to the latest stable/development version?
Absolutely. The patch is against 2.8.0.2, but the stack trace is from 2.8.0.1.
This patch also applies to HEAD.
Fixed in CVS head and 2.8.0.2 branch.
*** Bug 313330 has been marked as a duplicate of this bug. ***