gthumb[15566]: segfault at 5126c60f eip b7f7bfe6 esp bf9bab08 error 4

Bug #316017 reported by Martin West
10
Affects Status Importance Assigned to Milestone
gthumb (Ubuntu)
Fix Released
Undecided
Unassigned
Hardy
Won't Fix
Undecided
Unassigned

Bug Description

Binary package hint: gthumb

When I select a certain image gthumb evaporates and the subject error appears in the log, Ill attach the offending image.

Environment is ubuntu 8.04 update to date.

gthumb 3:2.10.8-0ubuntu1

SRU justification:
* Fixes program crash. No other dependencies.
* Safe, minimal patch, applied upstream, no risk of regressions.

TEST CASE:
* Start gthumb (on the command line to see all messages) and open the attachments in comment 1 and comment 8.
* The program will crash with a segfault

Revision history for this message
Martin West (martin-objectgizmos) wrote :
Revision history for this message
Tormod Volden (tormodvolden) wrote :

Your file is not a valid JPEG image. It is a bug that gthumb crashes when it tries to open it. However, from testing with Jaunty I can see that this has been fixed in gthumb 3:2.10.10-0ubuntu2.

I am not sure this will be important enough to be fixed in Ubuntu 8.04, but it will help if you can provide more information. Please try to obtain a backtrace following the instructions at http://wiki.ubuntu.com/DebuggingProgramCrash and upload the backtrace (as an attachment) to the bug report. This will greatly help us in tracking down your problem.

Changed in gthumb:
status: New → Fix Released
Revision history for this message
Martin West (martin-objectgizmos) wrote :

Thanks for the super-fast reponse.

debug output attached ...

No problem on the fix urgency.

Just for information, It was produced using convert (ImageMagick) from a scan .png image using xsane but I dont think I want to go down that route :-)

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Thanks. You'll need to run the command "backtrace full" inside gdb (actually all the commands from point (4) on https://wiki.ubuntu.com/Backtrace).

Maybe you can attach the .png as well, if it's reproducable it would be a separate bug, in imagemagick or xsane.

Revision history for this message
Martin West (martin-objectgizmos) wrote :

just for correctness url without the trailing bracket

https://wiki.ubuntu.com/Backtrace

If at first ....

its sometime ago since I did the conversion, Ill see if it stilla round

Revision history for this message
Martin West (martin-objectgizmos) wrote :

Actually it was a .pnm file produced by xsane.

Thanks

Revision history for this message
Tormod Volden (tormodvolden) wrote :

I tested more on Hardy with your gthumb version. Funny enough I could not reproduce with your jpeg, but when I converted your pnm to a jpeg, gthumb crashed with this new jpeg. I could see from your gdb log what could go wrong, but I needed to make an unoptimized build to verify it.

BTW, it is known that this old imagemagick version does bad things to the exif tags, see for instance bug 178575.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

This is the jpeg I got with convert, which makes gthumb crash.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

I think application crashes warrants an SRU, so I made a debdiff that fixes the crash.

Revision history for this message
mjc (mjc-avtechpulse) wrote :

Tormod, your patch adds this bound-checking code:

if (i<tiff || i>readsize) return PATCH_EXIF_NO_TIFF;

Comments:

1) I don't think it is possible for (i < tiff) to ever occur in the code. Is it?

2) I think "i>readsize" should actually be "i>=readsize". Right?

- Mike

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Mike, thanks for your feedback!

> 1) I don't think it is possible for (i < tiff) to ever occur in the code. Is it?

I was thinking "offset" could even be negative, but I didn't really check the signedness and types of the functions and variables involved. I don't remember any longer if I got a negative in my own gdb testing.

> 2) I think "i>readsize" should actually be "i>=readsize". Right?

Yes, that would be consistent with the while(i<readsize) in the code above. And I guess to be really precise, a real tag sequence would need a certain size so it would already be useless if i>(readsize-certainsize). But given the randomness of "offset" these would be corner cases.

Revision history for this message
Tormod Volden (tormodvolden) wrote :
Revision history for this message
mjc (mjc-avtechpulse) wrote :

Patch applied upstream:

http://svn.gnome.org/viewvc/gthumb?view=revision&revision=2497

Thanks, Tormod!

- Mike

description: updated
Revision history for this message
Martin Pitt (pitti) wrote :

I don't consider this an urgent thing to fix in Hardy, but the patch is simple and obvious, so go for it.

Changed in gthumb:
status: New → Confirmed
Revision history for this message
Benjamin Drung (bdrung) wrote :

uploaded

Revision history for this message
Jonathan Riddell (jr) wrote : Please test proposed package

Accepted into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Changed in gthumb (Ubuntu Hardy):
status: Confirmed → Fix Committed
Revision history for this message
Jonathan Riddell (jr) wrote :

s/lucid-proposed/hardy-proposed/

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

SRU Verification Hardy:

The version of gthumb 3:2.10.8-0ubuntu1.1 in hardy-proposed doesn't fix the segfault. The exact same error occurs, a backtrace is attached.

I'm marking this report as verification-failed

tags: added: verification-failed
removed: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote :

I removed the hardy-proposed version again.

Changed in gthumb (Ubuntu Hardy):
status: Fix Committed → Confirmed
tags: removed: verification-failed
Revision history for this message
Rolf Leggewie (r0lf) wrote :

Hardy has seen the end of its life and is no longer receiving any updates. Marking the Hardy task for this ticket as "Won't Fix".

Changed in gthumb (Ubuntu Hardy):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.