View Issue Details

IDProjectCategoryView StatusLast Update
0005607unrealircdpublic2020-06-26 15:20
Reporterk4be Assigned Tosyzop  
PrioritynormalSeveritymajorReproducibilityunable to reproduce
Status resolvedResolutionfixed 
Product Version5.0.1 
Fixed in Version5.0.6 
Summary0005607: Autoconnect links fail to reconnect: "called a function you should not call"
DescriptionThe problem happens intermittently after a link disconnects (i am unable to reproduce it on purpose). It first appeared in version 4.2.x after enabling spkifp authorization.

09:06 !legowisko.pirc.pl *** Connection to hub1.pirc.pl[(hidden)] activated.
09:06 !legowisko.pirc.pl Lost connection to hub1.pirc.pl[(hidden)]: SSL_connect(): Internal OpenSSL error or protocol error: ssl_undefined_function: called a function you should not call. Please verify that listen::options::ssl is enabled on port (hidden) in hub1.pirc.pl's configuration file.

This issue (temporarily) resolves itself after a /rehash on outgoing side.
TagsNo tags attached.
3rd party modules

Activities

syzop

2020-03-31 18:43

administrator   ~0021391

You reported this before in 4.x but you were the only person. Seems that this is still the case.

You don't run with 3rd party modules that use threads anymore, right ? Just checking.

What OpenSSL version? And any major mismatch in version used for headers vs libs ?

k4be

2020-03-31 18:55

developer   ~0021392

Two servers that had this problem recently are reporting versions "OpenSSL 1.1.1d 10 Sep 2019" (set up specifically for Unreal so there is no version mismatch) and "OpenSSL 1.1.0l 10 Sep 2019" (i'm unable to tell more about this system).
No modules are using threads now (and the only one which once did was loaded on only one server anyway).
The issue was never noticed before enabling spkifp. Its frequency seems to have decreased after 5.x upgrade (or are there just fewer splits?).

syzop

2020-04-12 17:18

administrator   ~0021453

Do the 3rd party modules that you have loaded on that server call any SSL functions?
A quick grep in the unrealircd-contrib dir only reveals the 'chansno' module, but you may also be running unpublished mods :)

k4be

2020-04-13 10:29

developer   ~0021466

No, there are no such modules installed.

Le_Coyote

2020-06-26 14:40

reporter   ~0021646

This problem also affects us, with 5.0.4 running on Debian 9.12 and OpenSSL 1.1.0l 10 Sep 2019. No threading nor SSL-using modules either.

syzop

2020-06-26 14:57

administrator   ~0021648

I spot a bug in REHASH -ssl but this only happens if... see next....

Do both of you use tls-options / ssl-options in a link { } block? So link::outgoing::tls-options / link::outgoing::ssl-options ?

syzop

2020-06-26 15:20

administrator   ~0021649

Thanks k4be for confirming that, I expect Le_Coyote to be using it as well then.
Fixed: https://github.com/unrealircd/unrealircd/commit/ca6630a2fb622ce59b8b59a20ea6f5fdb69c337b

commit ca6630a2fb622ce59b8b59a20ea6f5fdb69c337b (HEAD -> unreal50)
Author: Bram Matthys <[email protected]>
Date: Fri Jun 26 15:11:01 2020 +0200

    Fix "called a function you should not call" server linking error that
    happens if all of the following are true:
    1) You use link::outgoing::tls-options (or ssl-options)
    2) You do a REHASH -tls (or REHASH -ssl)
    3) You do NOT do a regular REHASH
    4) You try to link to the server in such a link block (outgoing!)
    
    In other words: the problem may happen if you try to link after
    a Let's Encrypt cert renewal, unless there has been a regular
    REHASH between that and the outgoing linking attempt.
    
    Reported by k4be and Le_Coyote in https://bugs.unrealircd.org/view.php?id=5607

Issue History

Date Modified Username Field Change
2020-03-31 10:33 k4be New Issue
2020-03-31 18:43 syzop Note Added: 0021391
2020-03-31 18:43 syzop Assigned To => syzop
2020-03-31 18:43 syzop Status new => feedback
2020-03-31 18:55 k4be Note Added: 0021392
2020-04-12 17:18 syzop Note Added: 0021453
2020-04-13 10:29 k4be Note Added: 0021466
2020-06-26 14:40 Le_Coyote Note Added: 0021646
2020-06-26 14:57 syzop Note Added: 0021648
2020-06-26 15:20 syzop Status feedback => resolved
2020-06-26 15:20 syzop Resolution open => fixed
2020-06-26 15:20 syzop Fixed in Version => 5.0.6
2020-06-26 15:20 syzop Note Added: 0021649