Skip to content

network(),syslog(): Fixed a potential crash for TLS destinations during reload#5303

Merged
HofiOne merged 13 commits intosyslog-ng:developfrom
HofiOne:tls-destination-crash
Apr 23, 2025
Merged

network(),syslog(): Fixed a potential crash for TLS destinations during reload#5303
HofiOne merged 13 commits intosyslog-ng:developfrom
HofiOne:tls-destination-crash

Conversation

@HofiOne
Copy link
Collaborator

@HofiOne HofiOne commented Mar 28, 2025

Fixes #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 #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.

Backport of 418 by @sodomelle

Depends on #5322

@HofiOne HofiOne force-pushed the tls-destination-crash branch from b7231fe to f5d45f1 Compare March 28, 2025 12:06
@kira-syslogng
Copy link
Contributor

Build FAILURE

@HofiOne HofiOne changed the title Tls destination crash network(), syslog(): Fixed a potential crash for TLS destinations during reload Mar 28, 2025
@HofiOne HofiOne changed the title network(), syslog(): Fixed a potential crash for TLS destinations during reload network(), syslog(): Fixed a potential crash for TLS destinations during reload Mar 28, 2025
@HofiOne HofiOne changed the title network(), syslog(): Fixed a potential crash for TLS destinations during reload network(), syslog(): Fixed a potential crash for TLS destinations during reload Mar 28, 2025
@HofiOne HofiOne force-pushed the tls-destination-crash branch from f5d45f1 to e2da318 Compare March 28, 2025 12:27
@kira-syslogng
Copy link
Contributor

Build FAILURE

@HofiOne
Copy link
Collaborator Author

HofiOne commented Mar 28, 2025

@kira-syslogng test this please;

@kira-syslogng
Copy link
Contributor

Build FAILURE

@HofiOne HofiOne force-pushed the tls-destination-crash branch 2 times, most recently from 3b2c445 to 4f11052 Compare March 28, 2025 14:13
@kira-syslogng
Copy link
Contributor

Build FAILURE

@HofiOne HofiOne force-pushed the tls-destination-crash branch 2 times, most recently from 2b5512b to c0fb725 Compare March 28, 2025 16:25
@kira-syslogng
Copy link
Contributor

Build FAILURE

1 similar comment
@kira-syslogng
Copy link
Contributor

Build FAILURE

@HofiOne HofiOne force-pushed the tls-destination-crash branch 2 times, most recently from cd28906 to 9544146 Compare April 4, 2025 10:09
@HofiOne HofiOne changed the title network(), syslog(): Fixed a potential crash for TLS destinations during reload network(),syslog(): Fixed a potential crash for TLS destinations during reload Apr 4, 2025
@HofiOne HofiOne force-pushed the tls-destination-crash branch from 9544146 to e29323d Compare April 4, 2025 10:51
@kira-syslogng
Copy link
Contributor

Build FAILURE

1 similar comment
@kira-syslogng
Copy link
Contributor

Build FAILURE

@HofiOne HofiOne marked this pull request as ready for review April 11, 2025 10:07
@folti
Copy link
Contributor

folti commented Apr 12, 2025

@kira-syslogng retest this please

@kira-syslogng
Copy link
Contributor

Build FAILURE

@HofiOne HofiOne force-pushed the tls-destination-crash branch from e29323d to 983e24a Compare April 17, 2025 13:27
@kira-syslogng
Copy link
Contributor

Build FAILURE

@syslog-ng syslog-ng deleted a comment from github-actions bot Apr 22, 2025
Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Hofi <[email protected]>
MrAnno and others added 12 commits April 22, 2025 14:45
Signed-off-by: László Várady <[email protected]>
Signed-off-by: Hofi <[email protected]>
Signed-off-by: Tamás Kosztyu <[email protected]>
Signed-off-by: Hofi <[email protected]>
Signed-off-by: Tamás Kosztyu <[email protected]>
Signed-off-by: Hofi <[email protected]>
Signed-off-by: Tamás Kosztyu <[email protected]>
Signed-off-by: László Várady <[email protected]>
Signed-off-by: Hofi <[email protected]>
Signed-off-by: Tamás Kosztyu <[email protected]>
Signed-off-by: Hofi <[email protected]>
Signed-off-by: László Várady <[email protected]>
Signed-off-by: Tamás Kosztyu <[email protected]>
Signed-off-by: Hofi <[email protected]>
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 <[email protected]>
Signed-off-by: Hofi <[email protected]>
Signed-off-by: Tamás Kosztyu <[email protected]>
Signed-off-by: Hofi <[email protected]>
@HofiOne HofiOne force-pushed the tls-destination-crash branch from 983e24a to 9f93d98 Compare April 22, 2025 12:45
@kira-syslogng
Copy link
Contributor

Build FAILURE

@HofiOne HofiOne merged commit cf22552 into syslog-ng:develop Apr 23, 2025
29 of 30 checks passed
@HofiOne HofiOne deleted the tls-destination-crash branch April 23, 2025 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Syslog-ng Service crashes in g_hash_table_lookup function after syslog-ng-ctl reload

7 participants