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

Fixed bug: packetfilter configuration did not include AUTH tag when AEAD is on #2880

Merged
merged 2 commits into from
Feb 16, 2024

Conversation

ethouris
Copy link
Collaborator

Fixes #2876

The problem: To FEC for recording the EXOR from the data packet included is the whole packet as the sending unit, that is, including the auth tag, if AEAD is enabled. This was not regarded in the packet filter configuration and hence if AEAD was on the FEC facility has allocated too small buffer and caused this way a memory override.

Some more logs around FEC were added to show this case, they better stay there.

@ethouris ethouris added Priority: High Type: Bug Indicates an unexpected problem or unintended behavior [core] Area: Changes in SRT library core labels Feb 15, 2024
@maxsharabayko maxsharabayko added this to the v1.5.4 milestone Feb 15, 2024
@maxsharabayko
Copy link
Collaborator

To be included in this PR

[ 16%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/core.cpp.o
/Users/runner/work/srt/srt/srtcore/core.cpp:5654:9: error: no viable conversion from 'const UniquePtr<srt::CCryptoControl>' to 'bool'
    if (m_pCryptoControl && m_pCryptoControl->getCryptoMode() == CSrtConfig::CIPHER_MODE_AES_GCM)
        ^~~~~~~~~~~~~~~~
/Users/runner/work/srt/srt/srtcore/utilities.h:685:5: note: candidate function not viable: 'this' argument has type 'const UniquePtr<srt::CCryptoControl>', but method is not marked const
    operator bool () { return 0!= get(); }
    ^
/Applications/Xcode_14.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk/usr/include/c++/v1/__memory/auto_ptr.h:69:51: note: candidate template ignored: could not match 'auto_ptr_ref<type-parameter-0-0>' against 'bool'
    template<class _Up> _LIBCPP_INLINE_VISIBILITY operator auto_ptr_ref<_Up>() _NOEXCEPT
                                                  ^
/Applications/Xcode_14.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk/usr/include/c++/v1/__memory/auto_ptr.h:71:51: note: candidate template ignored: could not match 'auto_ptr<type-parameter-0-0>' against 'bool'
    template<class _Up> _LIBCPP_INLINE_VISIBILITY operator auto_ptr<_Up>() _NOEXCEPT
                                                  ^
/Users/runner/work/srt/srt/srtcore/core.cpp:5654:26: error: invalid operands to binary expression ('const UniquePtr<srt::CCryptoControl>' and 'bool')
    if (m_pCryptoControl && m_pCryptoControl->getCryptoMode() == CSrtConfig::CIPHER_MODE_AES_GCM)
        ~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

@maxsharabayko maxsharabayko merged commit 52fe11c into Haivision:master Feb 16, 2024
9 of 10 checks passed
maxsharabayko pushed a commit to maxsharabayko/srt that referenced this pull request Apr 26, 2024
…H tag (Haivision#2880).

* Fixed build break due to const use of UniquePtr.
maxsharabayko pushed a commit to maxsharabayko/srt that referenced this pull request Apr 26, 2024
…H tag (Haivision#2880).

* Fixed build break due to const use of UniquePtr.
maxsharabayko pushed a commit that referenced this pull request Apr 29, 2024
…H tag (#2880).

* Fixed build break due to const use of UniquePtr.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core Priority: High Type: Bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] AES-GCM with FEC crash
2 participants