This is a bug introduced in TQSL 2.6.
Patch to correct this attached. This will go out as part of TQSL 2.6.4.
73,
-Rick
On Sat, May 28, 2022 at 4:09 PM tony mancill <[email protected]> wrote:
> Package: trustedqsl
> Version: 2.6.2-1
> Severity: normal
>
> Hi, creating this for visibility. Since I'm experiencing the issue, I
> will try to resolve it. Also (not related to this bug), I have an
> update to upstream 2.6.3 ready to upload. I am planning to wait until the
> auto-openssl transition completes before uploading it.
>
> When starting tqsl, I am prompted to renew my station certificate. If I
> select "yes," the application encounters the following segmentation
> fault. I'm not sure if this is an upstream bug or due to our packaging.
> It appears that the code on apps/certtree.cpp line 215 fails to return a
> valid tQSL_Cert. (Perhaps only in some circumstances?)
>
>
> Thread 1 "tqsl" received signal SIGSEGV, Segmentation fault.
> 0x00005555556d023d in CertTree::SelectCert (this=0x55555682c7f0,
> cert=<optimized out>) at ./apps/certtree.cpp:217
> 217 ./apps/certtree.cpp: No such file or directory.
> (gdb) bt
> #0 0x00005555556d023d in CertTree::SelectCert(void*)
> (this=0x55555682c7f0, cert=<optimized out>) at ./apps/certtree.cpp:217
> #1 0x00005555556641a5 in MyFrame::OnExpiredCertFound(wxCommandEvent&)
> (this=0x5555562bd8a0, event=<optimized out>) at ./apps/tqsl.cpp:3731
> #2 0x00007ffff77ee15e in
> wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&,
> wxEvtHandler*, wxEvent&) ()
> at /lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #3 0x00007ffff77ee253 in wxEventHashTable::HandleEvent(wxEvent&,
> wxEvtHandler*) () at /lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #4 0x00007ffff77ee58c in wxEvtHandler::TryHereOnly(wxEvent&) () at
> /lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #5 0x00007ffff77ee61b in wxEvtHandler::ProcessEventLocally(wxEvent&) ()
> at /lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #6 0x00007ffff77ee6f1 in wxEvtHandler::ProcessEvent(wxEvent&) () at
> /lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #7 0x00007ffff77ef1e5 in wxEvtHandler::ProcessPendingEvents() () at
> /lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #8 0x00007ffff7699f27 in wxAppConsoleBase::ProcessPendingEvents() () at
> /lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #9 0x00007ffff7b428da in wxGUIEventLoop::YieldFor(long) () at
> /lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
> #10 0x00007ffff769a8ed in wxAppConsoleBase::Yield(bool) () at
> /lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #11 0x000055555562a395 in MyFrame::DoUpdateCheck(bool, bool)
> (this=0x5555562bd8a0, silent=<optimized out>, noGUI=<optimized out>)
> at /usr/include/wx-3.0/wx/app.h:439
> #12 0x00005555556616df in MyFrame::FirstTime() (this=0x5555562bd8a0) at
> ./apps/tqsl.cpp:6093
> #13 0x0000555555671895 in QSLApp::GUIinit(bool, bool)
> (this=0x555555804c20, checkUpdates=<optimized out>, quiet=<optimized out>)
> at ./apps/tqsl.cpp:5243
> #14 0x0000555555672f9a in QSLApp::OnInit() (this=0x555555804c20) at
> ./apps/tqsl.cpp:5460
> #15 0x00007ffff7714a72 in wxEntry(int&, wchar_t**) () at
> /lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #16 0x000055555561cd1e in main(int, char**) (argc=<optimized out>,
> argv=<optimized out>) at ./apps/tqsl.cpp:234
>
>
> -- System Information:
> Debian Release: bookworm/sid
> APT prefers unstable
> APT policy: (500, 'unstable')
> Architecture: amd64 (x86_64)
>
> Kernel: Linux 5.17.0-3-amd64 (SMP w/8 CPU threads; PREEMPT)
> Kernel taint flags: TAINT_WARN
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE
> not set
> Shell: /bin/sh linked to /usr/bin/dash
> Init: systemd (via /run/systemd/system)
> LSM: AppArmor: enabled
>
> Versions of packages trustedqsl depends on:
> ii libc6 2.33-7
> ii libcurl4 7.83.1-1+b1
> ii libexpat1 2.4.8-1
> ii libgcc-s1 12.1.0-2
> ii liblmdb0 0.9.24-1
> ii libssl3 3.0.3-5
> ii libstdc++6 12.1.0-2
> ii libwxbase3.0-0v5 3.0.5.1+dfsg-4
> ii libwxgtk3.0-gtk3-0v5 3.0.5.1+dfsg-4
> ii zlib1g 1:1.2.11.dfsg-4
>
> trustedqsl recommends no packages.
>
> trustedqsl suggests no packages.
>
> -- no debconf information
>
>
--
Rick Murphy, D.Sc., CISSP-ISSAP, K1MU/4, Annandale VA USA
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt
index e43836f..45fd660 100644
--- a/apps/ChangeLog.txt
+++ b/apps/ChangeLog.txt
@@ -1,5 +1,11 @@
TQSL changes
============
+2.6.4
+----------
+Correct a crash when TQSL detects a callsign certificate that's about to
+expire during startup and the user selects "Yes" to renew that callsign
+certificate.
+
2.6.3
----------
Handle the case where there's both a valid and an invalid callsign certificate
diff --git a/apps/certtree.cpp b/apps/certtree.cpp
index 272e642..55f83f5 100644
--- a/apps/certtree.cpp
+++ b/apps/certtree.cpp
@@ -202,6 +202,7 @@ CertTree::SelectCert(tQSL_Cert cert) {
// Iterate the tree, looking for a matching certificate
wxTreeItemId root = GetRootItem();
wxTreeItemIdValue issCookie;
+ wxTreeItemIdValue listsCookie;
wxTreeItemIdValue certCookie;
wxTreeItemId top;
if (_nissuers > 1) {
@@ -210,16 +211,20 @@ CertTree::SelectCert(tQSL_Cert cert) {
top = root;
}
while (top.IsOk()) {
- wxTreeItemId item = GetFirstChild(top, certCookie);
+ wxTreeItemId item = GetFirstChild(top, listsCookie);
while (item.IsOk()) {
- tQSL_Cert cert = GetItemData(item)->getCert();
- long s;
- tqsl_getCertificateSerial(cert, &s);
- if (s == serial) { // found it
- SelectItem(item);
- return;
+ wxTreeItemId subitem = GetFirstChild(item, certCookie);
+ while (subitem.IsOk()) {
+ tQSL_Cert cert =
GetItemData(subitem)->getCert();
+ long s;
+ tqsl_getCertificateSerial(cert, &s);
+ if (s == serial) { // found it
+ SelectItem(subitem);
+ return;
+ }
+ subitem = GetNextChild(item, certCookie);
}
- item = GetNextChild(top, certCookie);
+ item = GetNextChild(top, listsCookie);
}
if (_nissuers > 1) {
top = GetNextChild(root, issCookie);