-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patch unsafe strlen in TLVWriter (#37065)
* Patch unsafe strlen in TLVWriter This is a vulnerability from Weave that was recently fixed. Apply the patch to Matter TLVWriter as well. This avoids reading bad pointers beyond stack-allocated memory. > One of the PutString function overloads makes a call to strlen > without safeguards. This has caused faults on several products when > passing in uninitialized memory. While these call sites have been > fixed with explicit initialization, we can also make the core > library more secure. Use the container to determine a maximum length > and avoid buffer overflow. * Fix comment and apply clang-format * Fixes for clang-tidy
- Loading branch information
1 parent
91673ab
commit 2357657
Showing
2 changed files
with
34 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters