Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2165c2a6 authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

Ensure not only Packet is valid, but also it's Parents are valid

This bug was found by fuzzer, that used *View::FromBytes(...) method on
packet to create instance of WriteCurrentIacLapView which content was
longer than what it's parent packet,  Command can contain.

Generated IsValid() method on WriteCurrentIacLapView was not calling
parent packet IsValid() method to check if size is proper.

IsValid() method in Builders doesn't have that issue, therefore when
View was converted to Builder, crash on assert occured.

This patch adds the missing call to parent IsValid() method.

This never occured in production code, because we always construct
partents, check theri validity, and then construct child views.

Test: run bluetooth_gd_fuzz_test
Bug: 177047996
Change-Id: Ife65b865acd745d67048c6d571ad555216098935
parent fd4d8632
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment