After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 733259 - lua-factory: Fix use after free
lua-factory: Fix use after free
Status: RESOLVED FIXED
Product: grilo
Classification: Other
Component: plugins
unspecified
Other All
: Normal normal
: ---
Assigned To: grilo-maint
grilo-maint
Depends on:
Blocks:
 
 
Reported: 2014-07-16 15:05 UTC by Bastien Nocera
Modified: 2014-07-21 20:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
lua-factory: Fix use after free (2.12 KB, patch)
2014-07-16 15:05 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2014-07-16 15:05:05 UTC
.
Comment 1 Bastien Nocera 2014-07-16 15:05:15 UTC
Created attachment 280849 [details] [review]
lua-factory: Fix use after free

==21842== Invalid read of size 4
==21842==    at 0x2CE855B7: grl_lua_library_set_current_operation (grl-lua-library.c:1258)
==21842==    by 0x6706D16: resolve_idle (grl-source.c:2401)
==21842==    by 0x7146872: g_main_context_dispatch (gmain.c:3067)
==21842==    by 0x7146C77: g_main_context_iterate.isra.29 (gmain.c:3747)
==21842==    by 0x7146F91: g_main_loop_run (gmain.c:3941)
==21842==    by 0x50323C4: gtk_main (gtkmain.c:1206)
==21842==    by 0x40C159: main (main.c:2395)
==21842==  Address 0x2a655ecc is 76 bytes inside a block of size 88 free'd
==21842==    at 0x4C2CCE9: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==21842==    by 0x714C3BE: g_free (gmem.c:190)
==21842==    by 0x7163053: g_slice_free1 (gslice.c:1112)
==21842==    by 0x2CE846B7: grl_l_callback (grl-lua-library.c:947)
==21842==    by 0x2D09B7CC: ??? (in /usr/lib64/liblua-5.2.so)
==21842==    by 0x2D0AD78C: ??? (in /usr/lib64/liblua-5.2.so)
==21842==    by 0x2D09BAC7: ??? (in /usr/lib64/liblua-5.2.so)
==21842==    by 0x2D09B13E: ??? (in /usr/lib64/liblua-5.2.so)
==21842==    by 0x2D09BD10: ??? (in /usr/lib64/liblua-5.2.so)
==21842==    by 0x2D0932D5: lua_pcallk (in /usr/lib64/liblua-5.2.so)
==21842==    by 0x2CE82C10: grl_lua_factory_source_resolve (grl-lua-factory.c:1119)
==21842==    by 0x6706D16: resolve_idle (grl-source.c:2401)
Comment 2 Victor Toso 2014-07-17 04:15:11 UTC
Review of attachment 280849 [details] [review]:

You are using the set_current_operation to clean the reference on LUA_ENV_TABLE.

Looks good.
Comment 3 Juan A. Suarez Romero 2014-07-21 20:58:03 UTC
Attachment 280849 [details] pushed as 194b7ea - lua-factory: Fix use after free