Bug 17731 - eom, gnome-photos, eog, gambas3, thunar, pinpoint, gtk+2.0 new integer overflow security issue (CVE-2013-7447)
Summary: eom, gnome-photos, eog, gambas3, thunar, pinpoint, gtk+2.0 new integer overfl...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Security (show other bugs)
Version: 5
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact: Sec team
URL: http://lwn.net/Vulnerabilities/675834/
Whiteboard:
Keywords:
Depends on: 17738 17739 17741 17745 17746 17747 17748
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-10 21:05 CET by David Walser
Modified: 2016-02-17 20:37 CET (History)
5 users (show)

See Also:
Source RPM: eom, gnome-photos, eog, gambas3, thunar, pinpoint, gtk+2.0
CVE:
Status comment:


Attachments
gtk+2-2.24.9-avoid_integer_overflow.patch (1.03 KB, patch)
2016-02-11 13:49 CET, Atilla ÖNTAŞ
Details | Diff

Description David Walser 2016-02-10 21:05:18 CET
A CVE was requested for an integer overflow that affects gtk+ and several apps:
http://openwall.com/lists/oss-security/2016/02/10/2

A commit upstream in gtk+ to fix it is linked in the message above.

Reproducible: 

Steps to Reproduce:
David Walser 2016-02-10 21:06:31 CET

CC: (none) => cvargas, jani.valimaa, matteo.pasotti, olav, tarakbumba
Whiteboard: (none) => MGA5TOO

Comment 1 Atilla ÖNTAŞ 2016-02-11 13:49:08 CET
Created attachment 7448 [details]
gtk+2-2.24.9-avoid_integer_overflow.patch

I added a patch which i converted from debdiff for gtk+2-224.9 (Cauldron). If i find a spare time i'll prepare a patch for Mageia 5 one (gtk+2-2.24.26) too tonight.

Also i' ll patch eom tonight. For both Cauldron and Mageia 5. Should i open seperate bug reports per package for updates?
Comment 2 Atilla ÖNTAŞ 2016-02-11 13:49:53 CET
Patch comes from: https://launchpadlibrarian.net/236011849/gtk2-gdk-xenial-debdiff
Comment 3 David Walser 2016-02-11 15:12:02 CET
(In reply to Atilla ÃNTAÅ from comment #1)
> Also i' ll patch eom tonight. For both Cauldron and Mageia 5. Should i open
> seperate bug reports per package for updates?

Unless we can get everything patched in a timely manner, then yes we could use this bug as a tracker and put the updates in separate bugs that block this one.
Comment 4 Atilla ÖNTAŞ 2016-02-11 15:26:11 CET
David, as i understand from the bug reports and oss-security mailing list this cve isn' t applicable for current gtk+3 versions. It has already included fix since June 2013 (See: https://git.gnome.org/browse/gtk+/commit?id=894b1ae76a32720f4bb3d39cf460402e3ce331d6). Am i right or missed something? If i'm right, then would you mind to remove gtk+3 from bug summary?
Comment 5 David Walser 2016-02-11 16:29:50 CET
Indeed, the affected code appears to no longer be present in gtk+3.0.

Summary: eom, gnome-photos, eog, gambas3, thunar, pinpoint, gtk+2.0, gtk+3.0 new integer overflow security issue => eom, gnome-photos, eog, gambas3, thunar, pinpoint, gtk+2.0 new integer overflow security issue
Source RPM: eom, gnome-photos, eog, gambas3, thunar, pinpoint, gtk+2.0, gtk+3.0 => eom, gnome-photos, eog, gambas3, thunar, pinpoint, gtk+2.0

Comment 6 David Walser 2016-02-11 16:31:12 CET
CVE-2013-7447 assigned:
http://openwall.com/lists/oss-security/2016/02/10/6

Summary: eom, gnome-photos, eog, gambas3, thunar, pinpoint, gtk+2.0 new integer overflow security issue => eom, gnome-photos, eog, gambas3, thunar, pinpoint, gtk+2.0 new integer overflow security issue (CVE-2013-7447)

Atilla ÖNTAŞ 2016-02-11 23:05:40 CET

Depends on: (none) => 17739

Atilla ÖNTAŞ 2016-02-11 23:06:24 CET

Depends on: (none) => 17738

Comment 7 Atilla ÖNTAŞ 2016-02-11 23:10:01 CET
gtk+2.0 and eom packages both patched and submitted for both Cauldron and Mageia 5. See mga #17738 gtk+2.0 update and mga # 17739 for eom update.

Hardware: i586 => All

Jani Välimaa 2016-02-12 17:13:21 CET

Depends on: (none) => 17741

Comment 8 Jani Välimaa 2016-02-12 17:22:38 CET
Thunar fixed in Cauldron and in mga5 (bug 17741).
David Walser 2016-02-12 17:34:34 CET

Severity: normal => major

Comment 9 David Walser 2016-02-12 17:48:09 CET
Patches checked into SVN for pinpoint and eog.

I'm concerned about gnome-photos and gambas3, because they also have this exact same code, which can be easily patched as the others have been, but they also have many instances of similar g_malloc calls, and I'm wondering if those need to be changed too.
David Walser 2016-02-12 20:18:54 CET

Depends on: (none) => 17745

David Walser 2016-02-12 20:21:42 CET

Depends on: (none) => 17746

Comment 10 David Walser 2016-02-12 20:22:43 CET
gambas3-3.8.4/gb.gtk/src/gtools.cpp:      *buf=(char*)g_malloc(sizeof(char)*(len+1));
gambas3-3.8.4/gb.gtk/src/gtools.cpp:      *buf=(char*)g_malloc(sizeof(char)*(len+1));
gambas3-3.8.4/gb.gtk/src/gtools.cpp:      *buf=(char*)g_malloc(sizeof(char)*(len+1));
gambas3-3.8.4/gb.gtk/src/gtools.cpp:      cairo_pixels = (uchar *)g_malloc (height * cairo_stride);
gambas3-3.8.4/gb.gtk/src/gmessage.cpp:                    DIALOG_path=(char*)g_malloc( sizeof(char)*(strlen(buf)+1) );
gambas3-3.8.4/gb.gtk/src/gmessage.cpp:            DIALOG_paths=(char**)g_malloc(sizeof(char*)*(g_slist_length(names)+1) );
gambas3-3.8.4/gb.gtk/src/gmessage.cpp:                    DIALOG_paths[b]=(char*)g_malloc( sizeof(char)*(strlen(buf)+1) );
gambas3-3.8.4/gb.gtk/src/gmessage.cpp:    DIALOG_path=(char*)g_malloc( sizeof(char)*(strlen(vl)+1) );
gambas3-3.8.4/gb.gtk/src/gfont.cpp:              buf2=(char*)g_malloc(sizeof(char)*(strlen(buf1)+1));

gnome-photos-3.19.4/src/photos-print-preview.c:  cairo_pixels = g_malloc (height * cairo_stride);
gnome-photos-3.19.4/src/photos-base-item.c:  buf = g_malloc0 (stride * roi.height);
gnome-photos-3.19.4/src/photos-operation-png-guess-sizes.c:  pixels = g_malloc0 (width * bpp);
gnome-photos-3.19.4/src/gegl-gtk-view-helper.c:    buf = g_malloc0(stride * roi.height);
gnome-photos-3.19.4/src/photos-operation-jpg-guess-sizes.c:  row_pointer[0] = g_malloc (width * bpp);
Comment 11 David Walser 2016-02-12 21:42:01 CET
After talking to Seth, the original reporter, I've patched just the cairo_pixels one in gambas3, but I have patched all of them in gnome-photos.
David Walser 2016-02-12 21:54:07 CET

Depends on: (none) => 17747

David Walser 2016-02-12 22:01:27 CET

Depends on: (none) => 17748

David Walser 2016-02-16 20:24:37 CET

URL: (none) => http://lwn.net/Vulnerabilities/675834/
Version: Cauldron => 5
Whiteboard: MGA5TOO => (none)

Comment 12 David Walser 2016-02-17 20:37:35 CET
All updates pushed :o)

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.