Opened 10 years ago
Closed 9 years ago
#46528 closed defect (fixed)
dirmngr: prevent crash
Reported by: | RJVB (René Bertin) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | haspatch | Cc: | kurthindenburg (Kurt Hindenburg) |
Port: | dirmngr |
Description
I've been seeing regular dirmngr crashes when I open a signed message in kmail.
It seems this was due to calling a function from port:pth without proper initialisation (which appears to be done implicitly). Pth allows for multiple calls to pth_init, so a call to that function before the code leading to the crash seems to have solved the issue.
Attachments (1)
Change History (7)
Changed 10 years ago by RJVB (René Bertin)
Attachment: | ensure_pth_initialisation.patch added |
---|
comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Priority: | Not set → Normal |
---|---|
Summary: | prevent crash in dirmngr → dirmngr: prevent crash |
comment:2 Changed 10 years ago by RJVB (René Bertin)
No, and checking just now I see that this particular issue isn't patched by Debian/Ubuntu either.
Really, my patch is probably just a workaround for an underlying issue I'm not really interested to hunt down. If you look at dirmngr.c:667,
/* Libgcrypt requires us to register the threading model first. Note that this will also do the pth_init. */ /* Init Libgcrypt. */ rc = gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pth);
that would suggest that gcry_control doesn't call pth_init() properly. Or some other later call undoes that, for whatever reason. An extra pth_init() that is redundant (does nothing) in the cases where the crash did not occur protects against such events.
As I said, I'm not interested in hunting this down properly if this workaround is enough to prevent a crash report window from popping up for certain messages. I thought initially that that crash might be OS X specific, but it seems I don't get them on my Linux rig because kmail doesn't attempt certificate verification (despite being configured to do so).
comment:3 Changed 10 years ago by tanner@…
this is an old upstream bug https://bugs.g10code.com/gnupg/issue1590 (patch included) but upstream seems to have forgotten to release a new version.
comment:4 Changed 10 years ago by RJVB (René Bertin)
So, should we use that patch, or just use mine (which in essence does the same thing) and wait for an upstream new version?
comment:6 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)
Resolution: | → fixed |
---|---|
Status: | new → closed |
thanks I used the bug report patch r147633
Is this problem already known to the developers of dirmngr? i.e. can you give us the bug report URL?