Skip to content
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

SctpAssociation: fix memory violation #943

Merged
merged 5 commits into from
Nov 4, 2022
Merged

Conversation

jmillan
Copy link
Member

@jmillan jmillan commented Nov 4, 2022

...when sctp debug tag is set, for SCTP_ASSOC_CHANGE notification.

Closes #904

We were taking the 'sn_assoc_change.sac_info' length wrongly, unlike for the other notifications we are logging.

...when sctp debug tag is set, for SCTP_ASSOC_CHANGE notification.

Closes #904

We were taking the 'sn_assoc_change.sac_info' length wrongly, unlike
for the other notifications we are logging.

- usrsctp code where the notification is created:
https://github.com/sctplab/usrsctp/blob/master/usrsctplib/netinet/sctputil.c#L3296

- Example code where this length is retrieved correctly:
https://github.com/sctplab/usrsctp/blob/master/programs/rtcweb.c#L871
@jmillan jmillan requested a review from ibc November 4, 2022 11:32
@jmillan jmillan mentioned this pull request Nov 4, 2022
@ibc
Copy link
Member

ibc commented Nov 4, 2022

Please, changes in CHANGELOG

@ibc
Copy link
Member

ibc commented Nov 4, 2022

Conflicts :)

@jmillan jmillan merged commit d439cbb into v3 Nov 4, 2022
@jmillan jmillan deleted the sctpassociation-mem-violation branch November 4, 2022 16:36
piranna pushed a commit to dyte-in/mediasoup that referenced this pull request Feb 9, 2023
* SctpAssociation: fix memory violation

...when sctp debug tag is set, for SCTP_ASSOC_CHANGE notification.

Closes versatica#904

We were taking the 'sn_assoc_change.sac_info' length wrongly, unlike
for the other notifications we are logging.

- usrsctp code where the notification is created:
https://github.com/sctplab/usrsctp/blob/master/usrsctplib/netinet/sctputil.c#L3296

- Example code where this length is retrieved correctly:
https://github.com/sctplab/usrsctp/blob/master/programs/rtcweb.c#L871

* Update CHANGELOG

* normalize CHANGELOG

* be consistent with struct size retrieval
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants