-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
piaware crashes with itcl3 3.4.4 #94
Comments
The error I get from a similar Debian system supports this being a spelling error too. Thanks for the quick workaround @llamaonaskateboard
|
I do wonder if there is a security implication to this. Since this is the code that validates that the TLS certificate is for a flightaware domain, would there be a way to craft a malicious CN that passes this check? I didn't see a way the incorrect evaluation of ![info exist subject(CN)] would affect the resulting logic, but I'm also not a TCL expert, so don't know if this is considered undefined behavior when evaluated. |
This seems like a build problem or some underlying bug in the main tcl package (none of this is (Here's the source of the abort, which is an internal assertion failure within the tcl interpreter in a code path that only executes if an abbreviated option name is used: https://github.com/tcltk/tcl/blob/72f03c2e7847dc62c23391a60c990d562e7ed369/generic/tclEnsemble.c#L2181) There's no security implication beyond a possible DoS (but if you can intercept outbound connections then it's trivial to prevent piaware from connecting anyway) |
itcl3 was the only package updated and manually downgrading it back to 3.4.3-3.1 also fixes the issue. I managed to write a minimal repro using itcl and it certainly appears itcl3 3.4.4 and SpellFix don't work together:
@busterb Grabbing the 3.4.3-3.1 .deb from current stable and downgrading is probably a better fix than modifying piaware. EDIT: Building itcl3 3.4.4 from source also has the same issue... |
Aha, okay, I guess it is indeed an interaction with itcl then. itcl does interact quite deeply with the core interpreter so it wouldn't entirely surprise me. I couldn't find good source code control / release notes for 3.4.4 but a brute-force diff shows that there are indeed ensemble-related changes where it looks like itcl is messing directly with the ensemble rewrite table (and, presumably, getting it wrong). (The ensemble rewrite table is what "spellfix" is messing with)
|
Fossil was a bit of a pain to navigate but I found the commit for those changes at https://core.tcl-lang.org/itcl/info/a036f93dad15f1d4 I've reported this issues upstream at https://core.tcl-lang.org/itcl/tktview?name=171b58b82b |
Thanks for doing the work to report this upstream! I'll avoid the abbreviation in piaware for this specific case, but getting it fixed upstream is the right thing here - who knows how many other bits of code are affected.. |
I am running PiAware for around 20-30 minutes now under bookworm and haven't seen some crashes like this. Debian currently ships a version called 3.4.4-2, the changelog states the following:
From what I understood from the issue which was mentioned by @llamaonaskateboard and also from my experiences, am I correct that this problem is solved now? |
Debian testing has updated itcl3 from 3.4.3-3.1 to 3.4.4-1 and piaware now crashes on startup as follows:
I added some extra logger lines to try and narrow down the issue and the issue appears to be with this line in validate_certificate_status in fa_adept_client.tcl:
if {![info exist subject(CN)] || ($subject(CN) != "*.flightaware.com" && $subject(CN) != "piaware.flightaware.com" && $subject(CN) != "adept.flightaware.com" && $subject(CN) != "eyes.flightaware.com")} {
I don't know much about tcl but changing
info exist subject(CN)
toinfo exists subject(CN)
appears to fix it.The text was updated successfully, but these errors were encountered: