Skip to content

Fix server crash when read a malformed replication segment#9055

Merged
dyemanov merged 3 commits into
FirebirdSQL:masterfrom
XaBbl4:fix_crash_when_read_repl_segment
Jun 19, 2026
Merged

Fix server crash when read a malformed replication segment#9055
dyemanov merged 3 commits into
FirebirdSQL:masterfrom
XaBbl4:fix_crash_when_read_repl_segment

Conversation

@XaBbl4

@XaBbl4 XaBbl4 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

If a segment has some damage and it falls on the length of a string or the position of an atom, then the server crash with SIGSEGV, instead of output an correct error

Comment thread src/jrd/replication/Applier.cpp Outdated
… was.

Also add a length check to the defineAtom function.
Comment thread src/jrd/replication/Applier.cpp Outdated
Comment thread src/jrd/replication/Applier.cpp Outdated
Comment thread src/jrd/replication/Applier.cpp Outdated
Comment thread src/jrd/replication/Applier.cpp Outdated
@XaBbl4 XaBbl4 requested a review from dyemanov June 19, 2026 06:46
@dyemanov dyemanov merged commit 87fc95f into FirebirdSQL:master Jun 19, 2026
23 checks passed
dyemanov pushed a commit that referenced this pull request Jun 19, 2026
* Fix server crash when read a malformed replication segment

* Revert the length definition in the getString function back to how it was.

Also add a length check to the defineAtom function.

* Сorrection after Dmitry Yemanov review
@XaBbl4 XaBbl4 deleted the fix_crash_when_read_repl_segment branch June 19, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants