Skip to content

Prevent segmentation fault - when invalid headers point to bad memory address#2918

Open
bundasmanu wants to merge 3 commits intosignalwire:masterfrom
bundasmanu:prevent_seg_fault_on_event_dup_when_headers_are_out_of_bounds
Open

Prevent segmentation fault - when invalid headers point to bad memory address#2918
bundasmanu wants to merge 3 commits intosignalwire:masterfrom
bundasmanu:prevent_seg_fault_on_event_dup_when_headers_are_out_of_bounds

Conversation

@bundasmanu
Copy link

@bundasmanu bundasmanu commented Sep 17, 2025

In the meanwhile, my company has been having some segmentation faults.

We cant reproduce it.

After, we check the generated core-dumps, we saw that somehow a channel header points to a bad addr, and when FS tries to create the Event, crash, as the code does not have safety checks, if headers are "invalid".

Example:
image

This is the backtrace:
backtrace.log

simple bt output:
image

This PR, acts only as a precaution, and bypassing the "bad headers". The Event will not be created with these "bad headers", if they exist, other than that, seems safety, the proposed logic.

Used Freeeswitch version: v1.10.9
Distro: CentOS 7.9

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.

1 participant