commit | d9be3a38a3d85885a88fc619d3bd814e074e63d8 | [log] [tgz] |
---|---|---|
author | Faraaz Sareshwala <faraazs@pigweed.infra.roller.gmail.com> | Thu Dec 19 16:10:23 2024 -0800 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Dec 19 16:10:23 2024 -0800 |
tree | d7e4c7066ab8628be0e019f1f1c33340af33fa2f | |
parent | 50ba6f7ff3a27a890fb746cc679d446d6b7a6c7a [diff] |
roll: pigweed pw_bluetooth_sapphire: Fix buffer overflow in advertising data This change fixes a buffer overflow found by asan. When running tests, I received the following output: ``` [ RUN ] AdvertisingDataTest.CopyLeavesNoRemnants ================================================================= ==54572==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x00016f089508 at pc 0x00010163231c bp 0x00016f088ff0 sp 0x00016f088788 READ of size 16 at 0x00016f089508 thread T0 #0 0x000101632318 in MemcmpInterceptorCommon(void*, int (*)(void const*, void const*, unsigned long), void const*, void const*, unsigned long)+0x688 (libclang_rt.asan_osx_dynamic.dylib:arm64+0x1a318) #1 0x0001016325dc in memcmp+0x54 (libclang_rt.asan_osx_dynamic.dylib:arm64+0x1a5dc) #2 0x000100f36284 in bt::(anonymous namespace)::EncodeUri(std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char>> const&)+0x17c (common_test:arm64+0x1001c2284) #3 0x000100f33bc8 in bt::AdvertisingData::AddUri(std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char>> const&)+0x30 (common_test:arm64+0x1001bfbc8) #4 0x000100d78628 in bt::(anonymous namespace)::AdvertisingDataTest_CopyLeavesNoRemnants_Test::TestBody()+0x44c (common_test:arm64+0x100004628) ... ``` Original-Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/255813 Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> Original-Revision: cf93680d3cb6eb136748cf7460013419d9692493 Rolled-Repo: https://pigweed.googlesource.com/pigweed/pigweed Rolled-Commits: 9e9628d8e81fab..cf93680d3cb6eb Roll-Count: 1 Roller-URL: https://cr-buildbucket.appspot.com/build/8728078377897682225 GitWatcher: ignore CQ-Do-Not-Cancel-Tryjobs: true Change-Id: I9c2c8b7b69c91ec963eac1b124fa2a8664b5f8d5 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/showcase/sense/+/255956 Bot-Commit: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com> Commit-Queue: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com> Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
git clone https://pigweed.googlesource.com/pigweed/showcase/sense
Welcome to Pigweed Sense, a tour of key Pigweed components experienced through an imagined air quality product.
Please visit Sense: An interactive tour through Pigweed to get started.