-
Notifications
You must be signed in to change notification settings - Fork 17
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
network(), syslog()
: Fixed a potential crash for TLS destinations during reload
#418
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Tamás Kosztyu <tamas.kosztyu@axoflow.com>
fe77161
to
876423b
Compare
Signed-off-by: Tamás Kosztyu <tamas.kosztyu@axoflow.com>
876423b
to
d6e22e8
Compare
Signed-off-by: Tamás Kosztyu <tamas.kosztyu@axoflow.com>
d6e22e8
to
223da2c
Compare
Signed-off-by: Tamás Kosztyu <tamas.kosztyu@axoflow.com>
223da2c
to
0dea14b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the Light feature update and a new testcase.
I have added some review notes.
...t/functional_tests/destination_drivers/network_destination/test_tls_verifier_reload_crash.py
Outdated
Show resolved
Hide resolved
...t/functional_tests/destination_drivers/network_destination/test_tls_verifier_reload_crash.py
Outdated
Show resolved
Hide resolved
Signed-off-by: Tamás Kosztyu <tamas.kosztyu@axoflow.com>
0dea14b
to
24567d0
Compare
Signed-off-by: Tamás Kosztyu <tamas.kosztyu@axoflow.com>
24567d0
to
4f3d2fb
Compare
Signed-off-by: László Várady <laszlo.varady@axoflow.com>
Signed-off-by: Tamás Kosztyu <tamas.kosztyu@axoflow.com> Signed-off-by: László Várady <laszlo.varady@axoflow.com>
Signed-off-by: Tamás Kosztyu <tamas.kosztyu@axoflow.com>
Signed-off-by: Tamás Kosztyu <tamas.kosztyu@axoflow.com>
Signed-off-by: Tamás Kosztyu <tamas.kosztyu@axoflow.com>
Signed-off-by: Tamás Kosztyu <tamas.kosztyu@axoflow.com>
Signed-off-by: Tamás Kosztyu <tamas.kosztyu@axoflow.com>
It is possible to keep TLS connections alive during reload. In that case the LogWriter instance is persisted in cfg persist. This LogWriter's signal slot connector wasn't updated based on the new configuration, which could cause a crash. The signal slot connector is updated, so the newly configured verifier is used, instead of the old one. Signed-off-by: Tamás Kosztyu <tamas.kosztyu@axoflow.com>
Signed-off-by: Tamás Kosztyu <tamas.kosztyu@axoflow.com>
4f3d2fb
to
fec4647
Compare
@@ -237,6 +237,14 @@ log_transport_tls_write_method(LogTransport *s, const gpointer buf, gsize buflen | |||
return -1; | |||
} | |||
|
|||
TLSSession * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add the very least add an assertion to check if this is indeed a logtransporttls instance
Fixes syslog-ng/syslog-ng#5018
It is possible to keep TLS connections alive during reload.
In that case the LogWriter instance is persisted in cfg persist.
This LogWriter's signal slot connector wasn't updated based on the new configuration, which could cause a crash.
The signal slot connector is updated, so the newly configured verifier is used, instead of the old one.
Note that the fix in syslog-ng/syslog-ng#5087 has a security issue, as in that PR, the connector's lifetime is extended, but the verifier plugins are deregistered during reload, which silently disables all TLS verifiers without the user knowing.