Bug 1144090 - [abrt] geeqie: saturation(): geeqie killed by SIGFPE
Summary: [abrt] geeqie: saturation(): geeqie killed by SIGFPE
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: xcf-pixbuf-loader
Version: 24
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Yaakov Selkowitz
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:60e55c77b69c848c4d001cae82b...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-18 15:42 UTC by aten
Modified: 2017-08-08 11:48 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-08 11:48:31 UTC
Type: ---
Embargoed:
atenrok: needinfo-


Attachments (Terms of Use)
File: backtrace (26.12 KB, text/plain)
2014-09-18 15:42 UTC, aten
no flags Details
File: cgroup (180 bytes, text/plain)
2014-09-18 15:42 UTC, aten
no flags Details
File: core_backtrace (11.80 KB, text/plain)
2014-09-18 15:42 UTC, aten
no flags Details
File: dso_list (8.01 KB, text/plain)
2014-09-18 15:42 UTC, aten
no flags Details
File: environ (1.74 KB, text/plain)
2014-09-18 15:42 UTC, aten
no flags Details
File: limits (1.29 KB, text/plain)
2014-09-18 15:42 UTC, aten
no flags Details
File: maps (44.24 KB, text/plain)
2014-09-18 15:42 UTC, aten
no flags Details
File: open_fds (1.04 KB, text/plain)
2014-09-18 15:42 UTC, aten
no flags Details
File: proc_pid_status (943 bytes, text/plain)
2014-09-18 15:42 UTC, aten
no flags Details
File: var_log_messages (191 bytes, text/plain)
2014-09-18 15:42 UTC, aten
no flags Details

Description aten 2014-09-18 15:42:09 UTC
Description of problem:
opened .jpg file. Completely reproducible 

Version-Release number of selected component:
geeqie-1.1-21.fc20

Additional info:
reporter:       libreport-2.2.3
backtrace_rating: 4
cmdline:        geeqie --blank
crash_function: saturation
executable:     /usr/bin/geeqie
kernel:         3.15.8-200.fc20.x86_64
runlevel:       N 5
type:           CCpp
uid:            1001

Truncated backtrace:
Thread no. 1 (9 frames)
 #0 saturation at io-xcf.c:493
 #1 composite at io-xcf.c:766
 #2 xcf_image_load_real at io-xcf.c:1173
 #3 xcf_image_stop_load at io-xcf.c:1459
 #4 gdk_pixbuf_loader_close at gdk-pixbuf-loader.c:834
 #5 image_loader_stop_loader at image-load.c:528
 #6 image_loader_begin at image-load.c:663
 #8 image_loader_thread_run at image-load.c:911
 #10 g_thread_proxy at gthread.c:798

Comment 1 aten 2014-09-18 15:42:13 UTC
Created attachment 938953 [details]
File: backtrace

Comment 2 aten 2014-09-18 15:42:14 UTC
Created attachment 938954 [details]
File: cgroup

Comment 3 aten 2014-09-18 15:42:15 UTC
Created attachment 938955 [details]
File: core_backtrace

Comment 4 aten 2014-09-18 15:42:17 UTC
Created attachment 938956 [details]
File: dso_list

Comment 5 aten 2014-09-18 15:42:18 UTC
Created attachment 938957 [details]
File: environ

Comment 6 aten 2014-09-18 15:42:19 UTC
Created attachment 938958 [details]
File: limits

Comment 7 aten 2014-09-18 15:42:22 UTC
Created attachment 938959 [details]
File: maps

Comment 8 aten 2014-09-18 15:42:23 UTC
Created attachment 938960 [details]
File: open_fds

Comment 9 aten 2014-09-18 15:42:25 UTC
Created attachment 938961 [details]
File: proc_pid_status

Comment 10 aten 2014-09-18 15:42:26 UTC
Created attachment 938962 [details]
File: var_log_messages

Comment 11 Michael Schwendt 2014-09-18 16:33:32 UTC
> opened .jpg file. Completely reproducible 

Then please attach that .jpg file.

> #0 saturation at io-xcf.c:493
> #1 composite at io-xcf.c:766
> #2 xcf_image_load_real at io-xcf.c:1173
> #3 xcf_image_stop_load at io-xcf.c:1459

That's not within Geeqie, so I do need a test-case. Thousands of JPG images load fine here. And XCF isn't JPG either.

Comment 12 aten 2014-09-18 16:59:31 UTC
(In reply to Michael Schwendt from comment #11)
> > opened .jpg file. Completely reproducible 
> 
> Then please attach that .jpg file.
> 
> > #0 saturation at io-xcf.c:493
> > #1 composite at io-xcf.c:766
> > #2 xcf_image_load_real at io-xcf.c:1173
> > #3 xcf_image_stop_load at io-xcf.c:1459
> 
> That's not within Geeqie, so I do need a test-case. Thousands of JPG images
> load fine here. And XCF isn't JPG either.

You are right Michael, this must be not the jpg file I thought initially, but an .xcf from the same directory. It is just that every time I launched Geeqie by doublick on a particular .jpg and it would consistently crash. It must have been scanning all the files in that directory and crashed when it stumble upon .xcf. The .xcf file in question is ~60 MB, so I'm not sure how to attach it, in addition it is actually a photo of a particular person for official documents so I'd rather not make it public. Please advise.

Comment 13 Michael Schwendt 2014-09-19 08:37:44 UTC
Well, xcf-pixbuf-loader ran into an arithmetic exception while calculating

   max0 * (min1 - max1) / (max0*(min1-max1) - min1*max0 + max1*min0)

which looks like a divide-by-zero error as a result of not applying a plausibility check on the input data. Some programmers rely on certain assumptions about the sanity of input data, especially when rapidly developing something experimental.

Though, this is sloppy programming style, because it opens an attack vector on the program to crash it by feeding it with deliberately damaged/corrupted input data.

As xcf-pixbuf-loader is a plugin for gdk-pixbuf2 ( /usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders ) the same file would also crash programs other than Geeqie, provided that they use gdk-pixbuf2.

This reminds me of bug 1060497 - also reported by you about a very similar type of bug in that loader.

I will forward this ticket to the upstream developer, too.

Comment 14 Michael Schwendt 2014-09-19 10:33:27 UTC
Upstream says he hasn't touched the project for years and really has no time to fix that.

Bastien, any comment on this one and bug 1060497?

Btw, it's a short void function that already handles some corner-cases. Clearly there could be a sanity-check to avoid div-by-zero.

   473  void
   474  saturation (guchar *rgb0, guchar *rgb1)
   475  {
   476          //hue and value of rgb0, saturation of rgb1
   477          guchar min0 = MIN (MIN (rgb0[0], rgb0[1]), rgb0[2]);
   478          guchar max0 = MAX (MAX (rgb0[0], rgb0[1]), rgb0[2]);
   479          guchar min1 = MIN (MIN (rgb1[0], rgb1[1]), rgb1[2]);
   480          guchar max1 = MAX (MAX (rgb1[0], rgb1[1]), rgb1[2]);
   481          if (max0 == 0) {
   482                  rgb1[0] = 0x00;
   483                  rgb1[1] = 0x00;
   484                  rgb1[2] = 0x00;
   485                  return;
   486          }
   487          if (max0 == min0) {
   488                  rgb1[0] = max0;
   489                  rgb1[1] = min1*max0 / max0;
   490                  rgb1[2] = rgb1[1];
   491                  return;
   492          }
   493          double p = max0 * (min1 - max1) / (max0*(min1-max1) - min1*max0 + max1*min0);
   494          double q = - max0 * (min1*max0 - max1*min0) / (max0*(min1-max1) - min1*max0 + max1*min0);
   495          rgb1[0] = (guchar)(rgb0[0] * p + q);
   496          rgb1[1] = (guchar)(rgb0[1] * p + q);
   497          rgb1[2] = (guchar)(rgb0[2] * p + q);
   498  
   499  }

Comment 15 Fedora End Of Life 2015-05-29 12:54:58 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 16 Fedora End Of Life 2015-06-29 22:36:38 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 17 Matthew Miller 2015-07-21 15:03:22 UTC
Since upstream maintenance seems stalled, I'm considering simply blacklisting xcf support in Geeqie. Any strong opinions on that?

Comment 18 aten 2015-08-25 03:33:30 UTC
we'll miss it, but in it's current state this is probably optimal solution

Comment 19 Jan Kurik 2016-02-24 13:16:20 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 20 Fedora Admin XMLRPC Client 2016-09-15 15:31:12 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 21 Fedora Admin XMLRPC Client 2016-09-19 20:56:10 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 22 Yaakov Selkowitz 2016-09-19 23:24:28 UTC
Just adopted this package.  Given the age of this bug, could anyone who saw this before please try again with the following:

https://bodhi.fedoraproject.org/updates/FEDORA-2016-2eef90d329

Comment 23 Fedora End Of Life 2017-07-25 18:42:40 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 24 Fedora End Of Life 2017-08-08 11:48:31 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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