pw_bluetooth_sapphire: Fix overflow on parameter_total_size AdvertisingPacketFilter::BuildSetlocalNameCommand now validates the packet size before constructing the CommandPacket to prevent an attacker from taking control over the command queue. I also added a PW_CHECK to be defensive against this type of attack, such that we get a Bluetooth crash instead of a RCE bug if a similar vulnerability manifests somewhere else. Fixed: b/512561779 Fixed: b/535173940 Change-Id: I80bcc780ca82a695c9b9987fd227c9406a6a6964 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/482639
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/.