! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
tic-tac-toe Easter egg crashes the panel
Status:
RESOLVED: FIXED
Product:
Xfce4-panel

Comments

Description Olivier Fourdan editbugs 2019-06-28 14:33:10 CEST
Description:

Activating the tic-tac-toe hidden functionality crashes the panel

Steps to reproduce:

1. Right click on the panel
2. Select “Panel”
3. Select About
4. In the about panel, click “Credits”
5. In the list, select the “Tic-tac-Toe” entry

Actual result:

Panel crashes

Expected result:

Err... no crash?
Comment 1 Theo Linkspfeifer editbugs 2019-06-29 12:08:39 CEST
I tried to reproduce this bug, but the panel did not crash.
Comment 2 Andre Miranda editbugs 2019-06-30 03:30:38 CEST
I'm using panel from current git master, it doesn't crash to me either.
Comment 3 Olivier Fourdan editbugs 2019-06-30 22:09:55 CEST
Created attachment 8710 
BAcktrace

Backtrace of the crash
Comment 4 Olivier Fourdan editbugs 2019-07-01 14:18:31 CEST
Please check the code, this is simple case of a “use-after-free” with a possible “double free”.

When clicking the “tic-tac-toe” window, the dialog is destroyed in `panel_dialogs_show_about_email_hook()` and reused again in `panel_dialogs_show_about()` (`if (GTK_IS_WIDGET (about_dialog)) gtk_widget_destroy (about_dialog);`)
Comment 5 Olivier Fourdan editbugs 2019-07-01 14:55:56 CEST
Created attachment 8711 
[PATCH] Avoid use-after-free/double-free with tic-tac-toe

Clicking on the easter egg “tic-tac-toe” would crash the panel.
    
Avoid the use-after-free/double-free by not destroying the dialog in the email hook.
Comment 6 Git Bot editbugs 2019-07-03 23:07:11 CEST
Olivier Fourdan referenced this bugreport in commit d04a412c072ee94a29fa14894cf46cfada2c60a2

tic-tac-toe: Avoid use-after-free/double-free (Bug #15649)

https://git.xfce.org/xfce/xfce4-panel/commit?id=d04a412c072ee94a29fa14894cf46cfada2c60a2
Comment 7 Simon Steinbeiss editbugs 2019-07-03 23:08:35 CEST
I still remember in what shape I found tic-tac-toe when picking up the Gtk+3 port of the panel, so I'm happy this is the only bug you found (so far) ;)

Thanks a lot for the patch! I hope you don't mind that I adjusted the commit message to fit the panel changelog style.
Comment 8 Olivier Fourdan editbugs 2019-07-10 21:47:19 CEST
Created attachment 8752 
Updated patch
Comment 9 Olivier Fourdan editbugs 2019-07-10 21:47:40 CEST
Oops

Bug #15649

Reported by:
Olivier Fourdan
Reported on: 2019-06-28
Last modified on: 2019-07-10

People

Assignee:
Xfce Bug Triage
CC List:
2 users

Version

Version:
4.13.5

Attachments

BAcktrace (5.36 KB, text/plain)
2019-06-30 22:09 CEST , Olivier Fourdan
no flags
[PATCH] Avoid use-after-free/double-free with tic-tac-toe (1.16 KB, patch)
2019-07-01 14:55 CEST , Olivier Fourdan
no flags
Updated patch (1.21 KB, patch)
2019-07-10 21:47 CEST , Olivier Fourdan
no flags

Additional information