commit | 65ab9e4fde35275ad7a045e0da6e3342ef524cfc | [log] [tgz] |
---|---|---|
author | Taylor Cramer <cramertj@google.com> | Wed Oct 25 16:55:06 2023 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Oct 25 16:55:06 2023 +0000 |
tree | 0bcce98c1d552f7d5709bd24df8df83924c8b521 | |
parent | 96de268be9cd48f1c1036c2a3ba9c84b828d6ab2 [diff] |
pw_multibuf: Fix TrackingAllocatorWithMemory UAF Prior to this commit, TrackingAllocatorWithMemory had a use-after-free due to destroying the `mem_` field prior to the destruction of the parent class allocators which referenced `mem_` and which read from `mem_` in their destructors. This change resolves this issue by making the allocator that references `mem_` a field of TrackingAllocatorWithMemory that will be destroyed prior to `mem_`. Fixed: b/307733567 Change-Id: Ibd04d8bb802e1c89080dde9eb41adbb84c009599 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/177694 Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com> Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> Pigweed-Auto-Submit: Taylor Cramer <cramertj@google.com> Reviewed-by: Aaron Green <aarongreen@google.com>
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/.