SRU: sin(0)/sin(0) crash the the calculator

Bug #1622379 reported by Cledersonbc
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNOME Calculator
Fix Released
Medium
gnome-calculator (Ubuntu)
Fix Released
High
Unassigned
Xenial
Fix Released
High
Martin Wimpress 

Bug Description

[Impact]

It is possible to cause gnome-calcualtor segfault when elements of division to zero have null assigned tokens. For example, the following calculation will trigger a segfault:

sin(0)/sin(0)

[Test Case]

Open a terminal with CTRL+ALT+t and launch 'gnome-calculator'. Type the following into the equation entry area 'sin(0)/sin(0)' and press enter, gnome-calculator will segfault.

When the patched 'gnome-calculator' package is installed performing the same calculation described above will not cause 'gnome-calculator' to crash and instead the following will be displayed: Division by zero is undefined

A debdiff for Xenial is attached in comment #2:

  * https://bugs.launchpad.net/ubuntu/+source/gnome-calculator/+bug/1622379/comments/2

[Regression Potential]

None expected. The applied patch is taken directly from the following upstream commit:

  * https://git.gnome.org/browse/gnome-calculator/commit/?id=647eb687821fd74764a55767bf1e34f68f5df940

gnome-calculator packages have been built in a PPA and tested.

[Other Info]

dw3@linux:~$ gnome-calculator

(gnome-calculator:29011): GLib-CRITICAL **: g_str_has_prefix: assertion 'str != NULL' failed

(gnome-calculator:29011): GLib-CRITICAL **: g_str_has_prefix: assertion 'str != NULL' failed
Segmentation fault (core dumped)
dw3@linux:~$

sin(0)/sin(0) = NaN, but it crash the calculator

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, it looks like https://bugzilla.gnome.org/show_bug.cgi?id=769364 which was fixed upstream with that commit
https://git.gnome.org/browse/gnome-calculator/commit/?id=647eb687821fd74764a55767bf1e34f68f5df940

it's probably worth a SRU to xenial as well if somebody wants to do that

Changed in gnome-calculator (Ubuntu):
importance: Undecided → High
status: New → Fix Committed
tags: added: rls-x-incoming
Changed in gnome-calculator:
importance: Unknown → Medium
status: Unknown → Fix Released
Changed in gnome-calculator (Ubuntu Xenial):
assignee: nobody → Martin Wimpress (flexiondotorg)
status: New → In Progress
Revision history for this message
Martin Wimpress  (flexiondotorg) wrote :

Attached is a debdiff for gnome-calculator (Xenial) that prevents a segfault when elements of division to zero have null assigned tokens.

Revision history for this message
Martin Wimpress  (flexiondotorg) wrote :

This issue was fixed in Yakkety with the upload of gnome-calculator (1:3.22.0-1ubuntu1).

gnome-calculator (1:3.22.0-1ubuntu1) yakkety; urgency=medium

  * Merge with Debian. Remaining changes:
    - Add epoch
    - debian/patches/git_no_headerbars_in_unity.patch:
      + Don't use HeaderBars in Unity

gnome-calculator (3.22.0-1) unstable; urgency=medium

description: updated
Changed in gnome-calculator (Ubuntu):
status: Fix Committed → Fix Released
summary: - sin(0)/sin(0) crash the the calculator
+ SRU: sin(0)/sin(0) crash the the calculator
Changed in gnome-calculator (Ubuntu Xenial):
importance: Undecided → High
description: updated
Revision history for this message
Iain Lane (laney) wrote :

I uploaded - thanks!

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Cledersonbc, or anyone else affected,

Accepted gnome-calculator into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnome-calculator/1:3.18.3-0ubuntu1.16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in gnome-calculator (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Confirmed fixed in xenial.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-calculator - 1:3.18.3-0ubuntu1.16.04.1

---------------
gnome-calculator (1:3.18.3-0ubuntu1.16.04.1) xenial; urgency=medium

  * debian/patches/lp1622379-prevent-segfault.patch. (LP: #1622379)
    - Prevents segfault when elements of division to zero have null
      assigned tokens.

 -- Martin Wimpress <email address hidden> Fri, 30 Sep 2016 15:10:10 +0100

Changed in gnome-calculator (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for gnome-calculator has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.