newest gurlchecker segfaults on Karmic

Bug #400839 reported by Imre Gergely
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gurlchecker (Ubuntu)
Fix Released
High
Unassigned
Karmic
Fix Released
High
Unassigned

Bug Description

Binary package hint: gurlchecker

Just installed gurlchecker version 0.11-2 on Karmic and with the default configuration, anything I try to scan, gurlchecker just segfaults.

Steps to reproduce:

- apt-get install gurlchecker
- remove the ~/.gurlchecker directory
- start gurlchecker in a terminal, go straight to Project -> New Project -> Web site (or press F1)
- add a site URL (I tried with http://www.google.com, http://www.yahoo.com and http://www.eicar.org/anti_virus_test_file.htm)
- press OK and see the 'Segmentation fault' in the terminal

I do have a bit of a special setup. I'm running gurlchecker on a remote X server with:

# DISPLAY=1.1.1.1:0 gurlchecker

But I did test a couple of versions of gurlchecker on a number of releases and they are worked just fine, so I don't think the segfault is coming from this setup.

If anybody could confirm this, it would be great, as I don't have a local Karmic installation at the moment.

Revision history for this message
Arthur Lutz (arthur-lutz) wrote :

I have the same bug with no special remote X server...

the last "readable" thing strace says before crashing is :

   access("/home/arthur/.gurlchecker/projects.xml", F_OK) = -1 ENOENT (No such file or directory)

which is weird because there is a /home/user/.gurlchecker/projects directory...

Changed in gurlchecker (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Revision history for this message
hyperqbe (hyperqbe) wrote :

Working on a patch now.

A simple workaround is to open the Authentication part of the dialog, type a letter and backspace it in both the Login and Password fields. Then connecting to a URL won't crash.

Changed in gurlchecker (Ubuntu):
assignee: nobody → hyperqbe (hyperqbe)
status: Confirmed → In Progress
Revision history for this message
hyperqbe (hyperqbe) wrote :

Attaching debdiff patch.

Changed in gurlchecker (Ubuntu):
assignee: hyperqbe (hyperqbe) → nobody
status: In Progress → Confirmed
Revision history for this message
hyperqbe (hyperqbe) wrote :

Perhaps I should explain the patch. The problem was that g_strstrip() was being called on the result of gtk_entry_get_text() for the username and password fields. Normally this might not be a problem, but when a GtkEntry has not been modified, gtk_entry_get_text() will return "". That is, the *constant* string "". g_strstrip("") segfaults.

There are many possible solutions to this. One could check for the special case of an empty string, but that felt like a bit of a difficult to explain hack. The option I took was to call g_strdup() on the two strings. This requires the caller of the uc_utils_get_auth_fields() function to g_free these strings. However, uc_utils_get_auth_fields() already requires the caller to g_free one of the three strings it returns. Requiring the caller to g_free the other two makes the interface more consistent.

So the patch adds the calls to g_strdup(), and whereever uc_utils_get_auth_fields() is called (twice), we add g_free() calls to free the new strings.

Revision history for this message
Imre Gergely (cemc) wrote :

I've checked with upstream and he sent me his patch for this problem. Attached.

I've also built a package with this patch, it's in the clamav PPA (https://launchpad.net/~ubuntu-clamav/+archive/ppa), please test it and give some feedback here.

Please see this wiki page on how to install packages from a PPA: https://help.launchpad.net/Packaging/PPA#Activating a PPA

Thanks.

Revision history for this message
Imre Gergely (cemc) wrote :

I've tested it and it seems to work ok. Also, thanks hyperqbe for your work on this, I just thought I better notify upstream too about this problem, and he quickly sent me a patch which he also applied in stable and CVS branches, so I included this here.
Attached debdiff for Lucid.

Revision history for this message
John Dong (jdong) wrote :

Consider this a preliminary ACK from MOTU-SRU for a karmic-proposed backport of the patch above.

Changed in gurlchecker (Ubuntu Karmic):
milestone: none → karmic-updates
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gurlchecker - 0.11-2ubuntu1

---------------
gurlchecker (0.11-2ubuntu1) lucid; urgency=low

  * debian/patches/03_gtk_segfault.diff: Added. (LP: #400839)
    - got patch from upstream
 -- Imre Gergely <email address hidden> Sat, 07 Nov 2009 19:07:10 +0200

Changed in gurlchecker (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote : Please test proposed package

Accepted into karmic-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!

Changed in gurlchecker (Ubuntu Karmic):
status: New → Fix Committed
tags: added: verification-needed
Changed in gurlchecker (Ubuntu Karmic):
importance: Undecided → Medium
importance: Medium → High
Revision history for this message
Morten Kjeldgaard (mok0) wrote :

The application has mixed language menus. "File" is "Fichier" and "Help" is "Aide". Tried to put in an URL, which made the application crash. That's it as far as I'm concerned, doesn't seem to run properly under karmic on amd64.

Revision history for this message
Morten Kjeldgaard (mok0) wrote :

Ah. My bad, I thought I had -proposed activated, but apparently it wasn't. So, the buggy behaviour of the default karmic version was verified :-)

The "proposed" version of gurlchecker still has the partly french menu titles, but the application seems to accept an URL and it runs the checks it's supposed to. (This is the first time I use this app so this testing is very rudimentary.)

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

This bug was fixed in the package gurlchecker - 0.11-2ubuntu0.1

---------------
gurlchecker (0.11-2ubuntu0.1) karmic-proposed; urgency=low

  * debian/patches/03_gtk_segfault.diff: Added. (LP: #400839)
    - got patch from upstream
 -- Imre Gergely <email address hidden> Sat, 07 Nov 2009 19:07:10 +0200

Changed in gurlchecker (Ubuntu Karmic):
status: Fix Committed → Fix Released
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.