Seahorse fails to import OpenPGP keys

Bug #215729 reported by Mackenzie Morgan
18
Affects Status Importance Assigned to Milestone
seahorse
Fix Released
Medium
seahorse (Ubuntu)
Fix Released
Medium
Mackenzie Morgan
Hardy
Fix Released
Medium
Mackenzie Morgan

Bug Description

Binary package hint: seahorse

Steps to reproduce:
1. Open Seahorse (Applications -> Accessories -> Passwords and Encryption Keys)
2. Click "Find Remote Keys"
3. Search for someone....even someone random
4. Pick a key from the list returned
5. Hit either the big "Import" button or go to Key -> Import

What happens:
Nothing

What should happen:
Public key should be downloaded and added to keyring

Related branches

Revision history for this message
Mackenzie Morgan (maco.m) wrote :

I have a diff for the broken file

Changed in seahorse:
assignee: nobody → maco.m
status: New → In Progress
Revision history for this message
Mackenzie Morgan (maco.m) wrote :
Revision history for this message
Mackenzie Morgan (maco.m) wrote :

forgot to free a pointer. oops. here's the correct patch.

LaserJock (laserjock)
Changed in seahorse:
importance: Undecided → Medium
milestone: none → ubuntu-8.04
Revision history for this message
Mackenzie Morgan (maco.m) wrote :
Revision history for this message
Mackenzie Morgan (maco.m) wrote :

g_malloc, strncpy, an strncat because the release manager said so

Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

Thanks for the patch. I have test and can confirm that this resolves the issue. Attached is a debdiff adding this patch.

Revision history for this message
Steve Langasek (vorlon) wrote :

The proposed patch has a memory leak. Attached is a revised patch that fixes the memory management issues; can someone test that it also fixes the problem?

Revision history for this message
Mackenzie Morgan (maco.m) wrote : Re: [Bug 215729] Re: Seahorse fails to import keys
  • unnamed Edit (189 bytes, application/pgp-signature; name=signature.asc)

Where's the memory leak? The first version that was attached didn't
have hexfpr being freed, but all subsequent ones did.

On Wed, 2008-04-16 at 02:50 +0000, Steve Langasek wrote:
> The proposed patch has a memory leak. Attached is a revised patch that
> fixes the memory management issues; can someone test that it also fixes
> the problem?
>
> ** Attachment added: "updated debdiff"
> http://launchpadlibrarian.net/13480676/seahorse-hex-key-import.debdiff
>
--
Mackenzie Morgan
http://ubuntulinuxtipstricks.blogspot.com
apt-get moo

Revision history for this message
Steve Langasek (vorlon) wrote :

On Wed, Apr 16, 2008 at 03:06:56AM -0000, Mackenzie Morgan wrote:
> Where's the memory leak? The first version that was attached didn't
> have hexfpr being freed, but all subsequent ones did.

The previous patch showed hexfpr being freed once at the end of the
function - but being re-malloc()ed repeatedly inside a loop, overwriting the
pointer to the previously-malloc()ed memory each time.

A static buffer is much simpler here, given that the amount of data we need
to pass is small and constant.

Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote : Re: Seahorse fails to import keys

I don't know enough about C to comment on the memory leak, but I have tested the updated debdiff and I can confirm that it also resolves the issue.

Thanks all for your work...

Revision history for this message
Steve Langasek (vorlon) wrote :

Ok, this fix has been uploaded and is now sitting in the queue pending approval from another member of the release team.

Thanks, all!

Changed in seahorse:
status: In Progress → Fix Committed
Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

Just want to note that I have forwarded this upstream, and the Ubuntu patch has been committed to trunk.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package seahorse - 2.22.1-0ubuntu2

---------------
seahorse (2.22.1-0ubuntu2) hardy; urgency=low

  * debian/patches/12_import_key.patch: fix importing of remote keys to
    prepend "0x" to key ids when constructing URIs. Thanks to Mackenzie
    Morgan for the preliminary patch. LP: #215729

 -- Steve Langasek <email address hidden> Tue, 15 Apr 2008 19:44:59 -0700

Changed in seahorse:
status: Fix Committed → Fix Released
Changed in seahorse:
status: Unknown → Fix Released
Changed in seahorse:
importance: Unknown → Medium
Revision history for this message
Phill (phill.l) wrote :

This is back in Ubuntu 16.04, exactly the same method to reproduce.

Revision history for this message
Phill (phill.l) wrote :

For clarification, I experienced the problem finding and importing the remote keys for <email address hidden>.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

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