Skip to content
Memory corruption Advisory Advanced CVE-2024-2883

Use after free in ANGLE (CVE-2024-2883)

A use-after-free in ANGLE's Vulkan backend (SwiftShader) occurs when a buffer is freed while still referenced by a vertex input binding. An attacker could trigger a crash by visiting a crafted page, potentially leading to memory corruption.

Cassidy Kim Follow

Originally disclosed on Chrome VRP

Bounty$10,000 Critical View original
  • Fix shipped in 24 days

tested os: ubuntu 22.04 tested chrome version: Chromium 124.0.6315.2 repro steps: chrome --incognito --user-data-dir=/tmp/xxx http://localhost:8000/crash.html --disable-gpu

==210209==ERROR: AddressSanitizer: heap-use-after-free on address 0x50700011b748 at pc 0x7f61b285445b bp 0x7f6197280f40 sp 0x7f6197280f38 READ of size 8 at 0x50700011b748 thread T18 #0 0x7f61b285445a in vk::Buffer::getOffsetPointer(unsigned long) const ./../../third_party/swiftshader/src/Vulkan/VkBuffer.cpp:151:37 #1 0x7f61b29542af in vk::Inputs::bindVertexInputs(int) ./../../third_party/swiftshader/src/Device/Context.cpp:382:61 #2 0x7f61b286230d in (anonymous namespace)::CmdDrawBase::draw(vk::CommandBuffer::ExecutionState&, bool, unsigned int, unsigned int, unsigned int, int, unsigned int) ./../../third_party/swiftshader/src/Vulkan/VkCommandBuffer.cpp:976:10 #3 0x7f61b2862121 in (anonymous namespace)::CmdDraw::execute(vk::CommandBuffer::ExecutionState&) ./../../third_party/swiftshader/src/Vulkan/VkCommandBuffer.cpp:1028:3 #4 0x7f61b285aa02 in vk::CommandBuffer::submit(vk::CommandBuffer::ExecutionState&) ./../../third_party/swiftshader/src/Vulkan/VkCommandBuffer.cpp:2383:12 #5 0x7f61b28b4acf in vk::Queue::submitQueue(vk::Queue::Task const&) ./../../third_party/swiftshader/src/Vulkan/VkQueue.cpp:104:42 #6 0x7f61b28b3c60 in vk::Queue::taskLoop(marl::Scheduler*) ./../../third_party/swiftshader/src/Vulkan/VkQueue.cpp:156:4 #7 0x7f61b28b7605 in __invoke<void (vk::Queue::)(marl::Scheduler ), vk::Queue , marl::Scheduler , void> ./../../third_party/libc++/src/include/__type_traits/invoke.h:312:25 #8 0x7f61b28b7605 in __thread_execute<std::__Cr::unique_ptr<std::__Cr::__thread_struct, std::__Cr::default_deletestd::__Cr::__thread_struct >, void (vk::Queue::)(marl::Scheduler ), vk::Queue , marl::Scheduler , 2UL, 3UL> ./../../third_party/libc++/src/include/__thread/thread.h:193:3 #9 0x7f61b28b7605 in void std::__Cr::__thread_proxy<std::__Cr::tuple<std::__Cr::unique_ptr<std::__Cr::__thread_struct, std::__Cr::default_deletestd::__Cr::__thread_struct>, void (vk::Queue::)(marl::Scheduler), vk::Queue, marl::Scheduler>>(void) ./../../third_party/libc++/src/include/__thread/thread.h:202:3 #10 0x560728f0c6a8 in asan_thread_start(void*) asan_rtl:28

0x50700011b748 is located 8 bytes inside of 80-byte region [0x50700011b740,0x50700011b790) freed by thread T0 (chrome) here: #0 0x560728f0e876 in __interceptor_free asan_rtl:3 #1 0x7f61bdf21c77 in destroy ./../../third_party/angle/src/libANGLE/renderer/vulkan/vk_wrapper.h:1660:9 #2 0x7f61bdf21c77 in rx::vk::BufferSuballocationGarbage::destroyIfComplete(rx::RendererVk*) ./../../third_party/angle/src/libANGLE/renderer/vulkan/Suballocation.cpp:190:17 #3 0x7f61be0ce5cd in rx::vk::SharedGarbageListrx::vk::BufferSuballocationGarbage::add(rx::RendererVk*, rx::vk::BufferSuballocationGarbage&&) ./../../third_party/angle/src/libANGLE/renderer/vulkan/ResourceVk.h:195:21 #4 0x7f61be08b06b in rx::RendererVk::collectSuballocationGarbage(rx::vk::ResourceUse const&, rx::vk::BufferSuballocation&&, rx::vk::Buffer&&) ./../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.h:325:35 #5 0x7f61be08b428 in release ./../../third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp:5085:19 #6 0x7f61be08b428 in rx::vk::BufferHelper::releaseBufferAndDescriptorSetCache(rx::RendererVk*) ./../../third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp:5110:5 #7 0x7f61bde41979 in rx::ContextVk::releaseBufferAllocation(rx::vk::BufferHelper*) ./../../third_party/angle/src/libANGLE/renderer/vulkan/ContextVk.cpp:7318:19 #8 0x7f61bddd7cc4 in rx::BufferVk::release(rx::ContextVk*) ./../../third_party/angle/src/libANGLE/renderer/vulkan/BufferVk.cpp:339:9 #9 0x7f61be3847b3 in release ./../../third_party/angle/src/libANGLE/RefCountObject.h:45:13 #10 0x7f61be3847b3 in DeleteObject ./../../third_party/angle/src/libANGLE/ResourceManager.cpp:122:13 #11 0x7f61be3847b3 in gl::TypedResourceManager<gl::Buffer, gl::BufferManager, gl::BufferID>::deleteObject(gl::Context const*, gl::BufferID) ./../../third_party/angle/src/libANGLE/ResourceManager.cpp:96:9 #12 0x7f61be232302 in deleteBuffer ./../../third_party/angle/src/libANGLE/Context.cpp:1128:28 #13 0x7f61be232302 in gl::Context::deleteBuffers(int, gl::BufferID const*) ./../../third_party/angle/src/libANGLE/Context.cpp:6738:9 #14 0x5607425c6bc3 in gpu::gles2::GLES2DecoderPassthroughImpl::DoDeleteBuffers(int, unsigned int const volatile*) ./../../gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc:1020:10 #15 0x56074257404d in gpu::error::Error gpu::gles2::GLES2DecoderPassthroughImpl::DoCommandsImpl<false>(unsigned int, void const volatile*, int, int*) ./../../gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc:737:20 #16 0x560742a8b41b in gpu::CommandBufferService::Flush(int, gpu::AsyncAPIInterface*) ./../../gpu/command_buffer/service/command_buffer_service.cc:232:35 #17 0x560742a7a8a3 in gpu::CommandBufferStub::OnAsyncFlush(int, unsigned int, std::__Cr::vector<gpu::SyncToken, std::__Cr::allocatorgpu::SyncToken> const&) ./../../gpu/ipc/service/command_buffer_stub.cc:507:22 #18 0x560742a79d79 in gpu::CommandBufferStub::ExecuteDeferredRequest(gpu::mojom::DeferredCommandBufferRequestParams&) ./../../gpu/ipc/service/command_buffer_stub.cc:155:7 #19 0x560742a96731 in gpu::GpuChannel::ExecuteDeferredRequest(mojo::StructPtrgpu::mojom::DeferredRequestParams) ./../../gpu/ipc/service/gpu_channel.cc:874:13 #20 0x560742aa5e56 in void base::internal::DecayedFunctorTraits<void (gpu::GpuChannel::)(mojo::StructPtrgpu::mojom::DeferredRequestParams), base::WeakPtrgpu::GpuChannel&&, mojo::StructPtrgpu::mojom::DeferredRequestParams&&>::Invoke<void (gpu::GpuChannel::)(mojo::StructPtrgpu::mojom::DeferredRequestParams), base::WeakPtrgpu::GpuChannel const&, mojo::StructPtrgpu::mojom::DeferredRequestParams>(void (gpu::GpuChannel::)(mojo::StructPtrgpu::mojom::DeferredRequestParams), base::WeakPtrgpu::GpuChannel const&, mojo::StructPtrgpu::mojom::DeferredRequestParams&&) ./../../base/functional/bind_internal.h:737:12 #21 0x560742aa5c3c in MakeItSo<void (gpu::GpuChannel::)(mojo::StructPtrgpu::mojom::DeferredRequestParams), std::__Cr::tuple<base::WeakPtrgpu::GpuChannel, mojo::StructPtrgpu::mojom::DeferredRequestParams > > ./../../base/functional/bind_internal.h:953:5 #22 0x560742aa5c3c in RunImpl<void (gpu::GpuChannel::)(mojo::StructPtrgpu::mojom::DeferredRequestParams), std::__Cr::tuple<base::WeakPtrgpu::GpuChannel, mojo::StructPtrgpu::mojom::DeferredRequestParams >, 0UL, 1UL> ./../../base/functional/bind_internal.h:1066:14 #23 0x560742aa5c3c in base::internal::Invoker<base::internal::FunctorTraits<void (gpu::GpuChannel::&&)(mojo::StructPtrgpu::mojom::DeferredRequestParams), base::WeakPtrgpu::GpuChannel&&, mojo::StructPtrgpu::mojom::DeferredRequestParams&&>, base::internal::BindState<true, true, false, void (gpu::GpuChannel::)(mojo::StructPtrgpu::mojom::DeferredRequestParams), base::WeakPtrgpu::GpuChannel, mojo::StructPtrgpu::mojom::DeferredRequestParams>, void ()>::RunOnce(base::internal::BindStateBase) ./../../base/functional/bind_internal.h:979:12 #24 0x56073f89708d in Run ./../../base/functional/callback.h:156:12 #25 0x56073f89708d in gpu::SchedulerDfs::ExecuteSequence(base::IdType<gpu::SyncPointOrderData, unsigned int, 0u, 1u>) ./../../gpu/command_buffer/service/scheduler_dfs.cc:740:24 #26 0x56073f894fa2 in gpu::SchedulerDfs::RunNextTask() ./../../gpu/command_buffer/service/scheduler_dfs.cc:665:3 #27 0x56073f898b93 in Invoke<void (gpu::SchedulerDfs::)(), gpu::SchedulerDfs > ./../../base/functional/bind_internal.h:737:12 #28 0x56073f898b93 in MakeItSo<void (gpu::SchedulerDfs::)(), std::__Cr::tuple<base::internal::UnretainedWrapper<gpu::SchedulerDfs, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0> > > ./../../base/functional/bind_internal.h:929:12 #29 0x56073f898b93 in RunImpl<void (gpu::SchedulerDfs::)(), std::__Cr::tuple<base::internal::UnretainedWrapper<gpu::SchedulerDfs, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0> >, 0UL> ./../../base/functional/bind_internal.h:1066:14 #30 0x56073f898b93 in base::internal::Invoker<base::internal::FunctorTraits<void (gpu::SchedulerDfs::&&)(), gpu::SchedulerDfs>, base::internal::BindState<true, true, false, void (gpu::SchedulerDfs::)(), base::internal::UnretainedWrapper<gpu::SchedulerDfs, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>>, void ()>::RunOnce(base::internal::BindStateBase) ./../../base/functional/bind_internal.h:979:12 #31 0x56073a91e224 in Run ./../../base/functional/callback.h:156:12 #32 0x56073a91e224 in base::TaskAnnotator::RunTaskImpl(base::PendingTask&) ./../../base/task/common/task_annotator.cc:202:34 #33 0x56073a97fb0f in RunTask<(lambda at ../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:475:11)> ./../../base/task/common/task_annotator.h:89:5 #34 0x56073a97fb0f in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow*) ./../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:473:23 #35 0x56073a97eaf9 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() ./../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:338:40 #36 0x56073a9808ca in non-virtual thunk to base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() ./../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:0:0 #37 0x56073aae7cf2 in base::MessagePumpGlib::HandleDispatch() ./../../base/message_loop/message_pump_glib.cc:646:46 #38 0x56073aaeabb8 in base::(anonymous namespace)::WorkSourceDispatch(_GSource*, int ()(void), void*) ./../../base/message_loop/message_pump_glib.cc:274:43 #39 0x7f61c76ffd3a in g_main_context_dispatch ??:0:0

previously allocated by thread T0 (chrome) here: #0 0x560728f0eb0f in __interceptor_malloc asan_rtl:3 #1 0x7f61b2d4f10d in allocate ./../../third_party/swiftshader/src/System/Memory.cpp:81:42 #2 0x7f61b2d4f10d in sw::allocateZeroOrPoison(unsigned long, unsigned long) ./../../third_party/swiftshader/src/System/Memory.cpp:110:9 #3 0x7f61b28d36df in Create<vk::Buffer, VkNonDispatchableHandle<VkBuffer_T >, VkBufferCreateInfo> ./../../third_party/swiftshader/src/Vulkan/VkObject.hpp:58:23 #4 0x7f61b28d36df in VkResult vk::ObjectBase<vk::Buffer, VkNonDispatchableHandle<VkBuffer_T>>::Create<VkBufferCreateInfo>(VkAllocationCallbacks const*, VkBufferCreateInfo const*, VkNonDispatchableHandle<VkBuffer_T*>) ./../../third_party/swiftshader/src/Vulkan/VkObject.hpp:92:10 #5 0x7f61b28d35cd in vkCreateBuffer ./../../third_party/swiftshader/src/Vulkan/libVulkan.cpp:1958:9 #6 0x7f61be08a78a in init ./../../third_party/angle/src/libANGLE/renderer/vulkan/vk_wrapper.h:1668:12 #7 0x7f61be08a78a in rx::vk::BufferHelper::getBufferForVertexArray(rx::ContextVk, unsigned long, unsigned long*) ./../../third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp:5026:29 #8 0x7f61bdfac2b5 in rx::VertexArrayVk::syncDirtyAttrib(rx::ContextVk*, gl::VertexAttribute const&, gl::VertexBinding const&, unsigned long, bool) ./../../third_party/angle/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp:862:30 #9 0x7f61bdfa475e in rx::VertexArrayVk::syncState(gl::Context const*, angle::BitSetT<51ul, unsigned long, unsigned long> const&, std::__Cr::array<angle::BitSetT<5ul, unsigned long, unsigned long>, 16ul>, std::__Cr::array<angle::BitSetT<4ul, unsigned long, unsigned long>, 16ul>) ./../../third_party/angle/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp:646:17 #10 0x7f61be416d92 in gl::VertexArray::syncState(gl::Context const*) ./../../third_party/angle/src/libANGLE/VertexArray.cpp:641:9 #11 0x7f61be20d368 in syncDirtyObjects ./../../third_party/angle/src/libANGLE/State.h:1612:9 #12 0x7f61be20d368 in syncDirtyObjects ./../../third_party/angle/src/libANGLE/Context.inl.h:126:19 #13 0x7f61be20d368 in prepareForDraw ./../../third_party/angle/src/libANGLE/Context.inl.h:136:5 #14 0x7f61be20d368 in gl::Context::drawArraysInstanced(gl::PrimitiveMode, int, int, int) ./../../third_party/angle/src/libANGLE/Context.cpp:2776:5 #15 0x560742603321 in gpu::gles2::GLES2DecoderPassthroughImpl::DoDrawArraysInstancedANGLE(unsigned int, int, int, int) ./../../gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc:4785:10 #16 0x56074257404d in gpu::error::Error gpu::gles2::GLES2DecoderPassthroughImpl::DoCommandsImpl<false>(unsigned int, void const volatile*, int, int*) ./../../gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc:737:20 #17 0x560742a8b41b in gpu::CommandBufferService::Flush(int, gpu::AsyncAPIInterface*) ./../../gpu/command_buffer/service/command_buffer_service.cc:232:35 #18 0x560742a7a8a3 in gpu::CommandBufferStub::OnAsyncFlush(int, unsigned int, std::__Cr::vector<gpu::SyncToken, std::__Cr::allocatorgpu::SyncToken> const&) ./../../gpu/ipc/service/command_buffer_stub.cc:507:22 #19 0x560742a79d79 in gpu::CommandBufferStub::ExecuteDeferredRequest(gpu::mojom::DeferredCommandBufferRequestParams&) ./../../gpu/ipc/service/command_buffer_stub.cc:155:7 #20 0x560742a96731 in gpu::GpuChannel::ExecuteDeferredRequest(mojo::StructPtrgpu::mojom::DeferredRequestParams) ./../../gpu/ipc/service/gpu_channel.cc:874:13 #21 0x560742aa5e56 in void base::internal::DecayedFunctorTraits<void (gpu::GpuChannel::)(mojo::StructPtrgpu::mojom::DeferredRequestParams), base::WeakPtrgpu::GpuChannel&&, mojo::StructPtrgpu::mojom::DeferredRequestParams&&>::Invoke<void (gpu::GpuChannel::)(mojo::StructPtrgpu::mojom::DeferredRequestParams), base::WeakPtrgpu::GpuChannel const&, mojo::StructPtrgpu::mojom::DeferredRequestParams>(void (gpu::GpuChannel::)(mojo::StructPtrgpu::mojom::DeferredRequestParams), base::WeakPtrgpu::GpuChannel const&, mojo::StructPtrgpu::mojom::DeferredRequestParams&&) ./../../base/functional/bind_internal.h:737:12 #22 0x560742aa5c3c in MakeItSo<void (gpu::GpuChannel::)(mojo::StructPtrgpu::mojom::DeferredRequestParams), std::__Cr::tuple<base::WeakPtrgpu::GpuChannel, mojo::StructPtrgpu::mojom::DeferredRequestParams > > ./../../base/functional/bind_internal.h:953:5 #23 0x560742aa5c3c in RunImpl<void (gpu::GpuChannel::)(mojo::StructPtrgpu::mojom::DeferredRequestParams), std::__Cr::tuple<base::WeakPtrgpu::GpuChannel, mojo::StructPtrgpu::mojom::DeferredRequestParams >, 0UL, 1UL> ./../../base/functional/bind_internal.h:1066:14 #24 0x560742aa5c3c in base::internal::Invoker<base::internal::FunctorTraits<void (gpu::GpuChannel::&&)(mojo::StructPtrgpu::mojom::DeferredRequestParams), base::WeakPtrgpu::GpuChannel&&, mojo::StructPtrgpu::mojom::DeferredRequestParams&&>, base::internal::BindState<true, true, false, void (gpu::GpuChannel::)(mojo::StructPtrgpu::mojom::DeferredRequestParams), base::WeakPtrgpu::GpuChannel, mojo::StructPtrgpu::mojom::DeferredRequestParams>, void ()>::RunOnce(base::internal::BindStateBase) ./../../base/functional/bind_internal.h:979:12 #25 0x56073f89708d in Run ./../../base/functional/callback.h:156:12 #26 0x56073f89708d in gpu::SchedulerDfs::ExecuteSequence(base::IdType<gpu::SyncPointOrderData, unsigned int, 0u, 1u>) ./../../gpu/command_buffer/service/scheduler_dfs.cc:740:24 #27 0x56073f894fa2 in gpu::SchedulerDfs::RunNextTask() ./../../gpu/command_buffer/service/scheduler_dfs.cc:665:3 #28 0x56073f898b93 in Invoke<void (gpu::SchedulerDfs::)(), gpu::SchedulerDfs > ./../../base/functional/bind_internal.h:737:12 #29 0x56073f898b93 in MakeItSo<void (gpu::SchedulerDfs::)(), std::__Cr::tuple<base::internal::UnretainedWrapper<gpu::SchedulerDfs, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0> > > ./../../base/functional/bind_internal.h:929:12 #30 0x56073f898b93 in RunImpl<void (gpu::SchedulerDfs::)(), std::__Cr::tuple<base::internal::UnretainedWrapper<gpu::SchedulerDfs, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0> >, 0UL> ./../../base/functional/bind_internal.h:1066:14 #31 0x56073f898b93 in base::internal::Invoker<base::internal::FunctorTraits<void (gpu::SchedulerDfs::&&)(), gpu::SchedulerDfs>, base::internal::BindState<true, true, false, void (gpu::SchedulerDfs::)(), base::internal::UnretainedWrapper<gpu::SchedulerDfs, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>>, void ()>::RunOnce(base::internal::BindStateBase) ./../../base/functional/bind_internal.h:979:12 #32 0x56073a91e224 in Run ./../../base/functional/callback.h:156:12 #33 0x56073a91e224 in base::TaskAnnotator::RunTaskImpl(base::PendingTask&) ./../../base/task/common/task_annotator.cc:202:34 #34 0x56073a97fb0f in RunTask<(lambda at ../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:475:11)> ./../../base/task/common/task_annotator.h:89:5 #35 0x56073a97fb0f in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow*) ./../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:473:23 #36 0x56073a97eaf9 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() ./../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:338:40 #37 0x56073a9808ca in non-virtual thunk to base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() ./../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:0:0 #38 0x56073aae7cf2 in base::MessagePumpGlib::HandleDispatch() ./../../base/message_loop/message_pump_glib.cc:646:46 #39 0x56073aaeabb8 in base::(anonymous namespace)::WorkSourceDispatch(_GSource*, int ()(void), void*) ./../../base/message_loop/message_pump_glib.cc:274:43 #40 0x7f61c76ffd3a in g_main_context_dispatch ??:0:0

Thread T18 created by T0 (chrome) here: #0 0x560728ef4981 in ___interceptor_pthread_create asan_rtl:3 #1 0x7f61b28b3eae in __libcpp_thread_create ./../../third_party/libc++/src/include/__thread/support/pthread.h:181:10 #2 0x7f61b28b3eae in std::__Cr::thread::thread<void (vk::Queue::)(marl::Scheduler), vk::Queue*, marl::Scheduler*&, 0>(void (vk::Queue::&&)(marl::Scheduler), vk::Queue*&&, marl::Scheduler*&) ./../../third_party/libc++/src/include/__thread/thread.h:212:14 #3 0x7f61b28b3afb in vk::Queue::Queue(vk::Device*, marl::Scheduler*) ./../../third_party/swiftshader/src/Vulkan/VkQueue.cpp:38:16 #4 0x7f61b286d432 in vk::Device::Device(VkDeviceCreateInfo const*, void*, vk::PhysicalDevice*, VkPhysicalDeviceFeatures const*, std::__Cr::shared_ptrmarl::Scheduler const&) ./../../third_party/swiftshader/src/Vulkan/VkDevice.cpp:139:26 #5 0x7f61b28ce3b5 in DispatchableObject<const VkDeviceCreateInfo , void , vk::PhysicalDevice , const VkPhysicalDeviceFeatures , std::__Cr::shared_ptrmarl::Scheduler > ./../../third_party/swiftshader/src/Vulkan/VkObject.hpp:127:8 #6 0x7f61b28ce3b5 in Create<vk::DispatchableObject<vk::Device, VkDevice_T >, VkDevice_T , VkDeviceCreateInfo, vk::PhysicalDevice , const VkPhysicalDeviceFeatures , std::__Cr::shared_ptrmarl::Scheduler > ./../../third_party/swiftshader/src/Vulkan/VkObject.hpp:65:34 #7 0x7f61b28ce3b5 in VkResult vk::DispatchableObject<vk::Device, VkDevice_T>::Create<VkDeviceCreateInfo, vk::PhysicalDevice, VkPhysicalDeviceFeatures const, std::__Cr::shared_ptrmarl::Scheduler>(VkAllocationCallbacks const, VkDeviceCreateInfo const, VkDevice_T, vk::PhysicalDevice, VkPhysicalDeviceFeatures const*, std::__Cr::shared_ptrmarl::Scheduler) ./../../third_party/swiftshader/src/Vulkan/VkObject.hpp:147:10 #8 0x7f61b28cdd05 in vkCreateDevice ./../../third_party/swiftshader/src/Vulkan/libVulkan.cpp:1264:9 #9 0x7f61bcf2d81a in terminator_CreateDevice ./../../third_party/vulkan-deps/vulkan-loader/src/loader/loader.c:5833:11 #10 0x7f61bcf30dc5 in loader_create_device_chain ./../../third_party/vulkan-deps/vulkan-loader/src/loader/loader.c:4937:15 #11 0x7f61bcf2f3d6 in loader_layer_create_device ./../../third_party/vulkan-deps/vulkan-loader/src/loader/loader.c:4317:11 #12 0x7f61bcf44818 in vkCreateDevice ./../../third_party/vulkan-deps/vulkan-loader/src/loader/trampoline.c:1005:20 #13 0x7f61bded3fdf in rx::RendererVk::createDeviceAndQueue(rx::DisplayVk*, unsigned int) ./../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp:3487:5 #14 0x7f61bdecf517 in rx::RendererVk::initialize(rx::DisplayVk*, egl::Display*, char const*, char const*) ./../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp:1980:5 #15 0x7f61bde59022 in rx::DisplayVk::initialize(egl::Display*) ./../../third_party/angle/src/libANGLE/renderer/vulkan/DisplayVk.cpp:110:39 #16 0x7f61be0f0a56 in rx::DisplayVkXcb::initialize(egl::Display*) ./../../third_party/angle/src/libANGLE/renderer/vulkan/linux/xcb/DisplayVkXcb.cpp:64:23 #17 0x7f61be27f5cb in egl::Display::initialize() ./../../third_party/angle/src/libANGLE/Display.cpp:1066:36 #18 0x7f61bdd7a7df in egl::Initialize(egl::Thread*, egl::Display*, int*, int*) ./../../third_party/angle/src/libGLESv2/egl_stubs.cpp:514:5 #19 0x7f61bdd817db in EGL_Initialize ./../../third_party/angle/src/libGLESv2/entry_points_egl_autogen.cpp:478:27 #20 0x56073eae6e3c in gl::GLDisplayEGL::InitializeDisplay(bool, std::__Cr::vector<gl::DisplayType, std::__Cr::allocatorgl::DisplayType>, gl::EGLDisplayPlatform, gl::GLDisplayEGL*) ./../../ui/gl/gl_display.cc:783:10 #21 0x56073eae54cf in gl::GLDisplayEGL::Initialize(bool, std::__Cr::vector<gl::DisplayType, std::__Cr::allocatorgl::DisplayType>, gl::EGLDisplayPlatform) ./../../ui/gl/gl_display.cc:673:8 #22 0x56072b262c29 in ui::GLOzoneEGL::InitializeGLOneOffPlatform(bool, std::__Cr::vector<gl::DisplayType, std::__Cr::allocatorgl::DisplayType>, gl::GpuPreference) ./../../ui/ozone/common/gl_ozone_egl.cc:25:17 #23 0x560742abb347 in gl::init::InitializeGLOneOffPlatform(gl::GpuPreference) ./../../ui/gl/init/gl_initializer_ozone.cc:27:26 #24 0x560742ab9a5b in gl::init::InitializeGLOneOffPlatformImplementation(bool, bool, bool, gl::GpuPreference) ./../../ui/gl/init/gl_factory.cc:211:24 #25 0x560742ab93f1 in gl::init::(anonymous namespace)::InitializeGLOneOffPlatformHelper(bool, gl::GpuPreference) ./../../ui/gl/init/gl_factory.cc:135:10 #26 0x560742ab978f in gl::init::InitializeGLNoExtensionsOneOff(bool, gl::GpuPreference) ./../../ui/gl/init/gl_factory.cc:166:10 #27 0x560742b1b152 in gpu::GpuInit::InitializeAndStartSandbox(base::CommandLine*, gpu::GpuPreferences const&) ./../../gpu/ipc/service/gpu_init.cc:443:18 #28 0x56075129dec8 in content::GpuMain(content::MainFunctionParams) ./../../content/gpu/gpu_main.cc:357:39 #29 0x560738025888 in content::RunZygote(content::ContentMainDelegate*) ./../../content/app/content_main_runner_impl.cc:676:14 #30 0x560738026db1 in content::RunOtherNamedProcessTypeMain(std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>> const&, content::MainFunctionParams, content::ContentMainDelegate*) ./../../content/app/content_main_runner_impl.cc:780:12 #31 0x5607380297ef in content::ContentMainRunnerImpl::Run() ./../../content/app/content_main_runner_impl.cc:1146:10 #32 0x560738023be0 in content::RunContentProcess(content::ContentMainParams, content::ContentMainRunner*) ./../../content/app/content_main.cc:335:36 #33 0x56073802425b in content::ContentMain(content::ContentMainParams) ./../../content/app/content_main.cc:348:10 #34 0x560728f44de8 in ChromeMain ./../../chrome/app/chrome_main.cc:192:12 #35 0x7f61c6429d8f in __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16

SUMMARY: AddressSanitizer: heap-use-after-free (/home/pwn11/asan-linux-release/././libvk_swiftshader.so+0x45445a) (BuildId: 7b83c3575abf9e76) Shadow bytes around the buggy address: 0x50700011b480: fa fa f7 fa fd fd fd fd fd fd fd fd fd fd fa fa 0x50700011b500: f7 fa fd fd fd fd fd fd fd fd fd fd fa fa f7 fa 0x50700011b580: fd fd fd fd fd fd fd fd fd fa fa fa f7 fa fd fd 0x50700011b600: fd fd fd fd fd fd fd fa fa fa f7 fa fd fd fd fd 0x50700011b680: fd fd fd fd fd fd fa fa f7 fa fd fd fd fd fd fd =>0x50700011b700: fd fd fd fd fa fa f7 fa fd[fd]fd fd fd fd fd fd 0x50700011b780: fd fd fa fa f7 fa fd fd fd fd fd fd fd fd fd fd 0x50700011b800: fa fa f7 fa fd fd fd fd fd fd fd fd fd fa fa fa 0x50700011b880: f7 fa fd fd fd fd fd fd fd fd fd fd fa fa f7 fa 0x50700011b900: fd fd fd fd fd fd fd fd fd fa fa fa f7 fa fd fd 0x50700011b980: fd fd fd fd fd fd fd fa fa fa f7 fa fd fd fd fd Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb

==210209==ADDITIONAL INFO

==210209==Note: Please include this section with the ASan report. Task trace:

MiraclePtr Status: NOT PROTECTED No raw_ptr<T> access to this region was detected prior to this crash. This crash is still exploitable with MiraclePtr. Refer to https://chromium.googlesource.com/chromium/src/+/main/base/memory/raw_ptr.md for details.

==210209==END OF ADDITIONAL INFO ==210209==ABORTING

The original report as published on the Chromium issue tracker, by Cassidy Kim(@cassidy6564). Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 9 min read.

Context

This is a Chrome Vulnerability Reward Program (VRP) report for a use-after-free in ANGLE, Chrome's graphics translation layer that implements OpenGL ES on top of Vulkan, among other backends. The bug was assigned CVE-2024-2883 and rated critical. The researcher is Cassidy Kim (@cassidy6564), and the report was disclosed on 26 March 2024 with a bounty of 10,000 USD.

The crash happens in SwiftShader, the software Vulkan implementation that Chrome falls back to when no usable GPU driver is available. ANGLE's Vulkan backend (rx::vk) suballocates buffers and tracks their lifetime through a garbage list; SwiftShader then reads a buffer's offset pointer while executing a draw. The two sides disagree about when the buffer is still alive, and AddressSanitizer catches the read after the free.

Setup

The report gives the tested OS and Chrome version:

  • Tested OS: Ubuntu 22.04
  • Tested Chrome version: Chromium 124.0.6315.2
  • An AddressSanitizer build of Chromium, with the crash surfacing in libvk_swiftshader.so
  • A local page served at http://localhost:8000/crash.html

The reproduction is launched with GPU acceleration disabled:

Bash
chrome --incognito --user-data-dir=/tmp/xxx http://localhost:8000/crash.html --disable-gpu

The command uses --incognito, a throwaway --user-data-dir and --disable-gpu. The contents of crash.html are not included in the report.

Finding it

The report is a crash report rather than a narrative, so the finding is the AddressSanitizer output itself. ASan reports a heap-use-after-free:

Text
==210209==ERROR: AddressSanitizer: heap-use-after-free on address 0x50700011b748 at pc 0x7f61b285445b bp 0x7f6197280f40 sp 0x7f6197280f38
READ of size 8 at 0x50700011b748 thread T18

The faulting read is an 8-byte load on thread T18, created by vk::Queue::Queue. The top of the stack is in SwiftShader's buffer code:

Text
    #0 0x7f61b285445a in vk::Buffer::getOffsetPointer(unsigned long) const ./../../third_party/swiftshader/src/Vulkan/VkBuffer.cpp:151:37
    #1 0x7f61b29542af in vk::Inputs::bindVertexInputs(int) ./../../third_party/swiftshader/src/Device/Context.cpp:382:61
    #2 0x7f61b286230d in (anonymous namespace)::CmdDrawBase::draw(vk::CommandBuffer::ExecutionState&, bool, unsigned int, unsigned int, unsigned int, int, unsigned int) ./../../third_party/swiftshader/src/Vulkan/VkCommandBuffer.cpp:976:10
    #3 0x7f61b2862121 in (anonymous namespace)::CmdDraw::execute(vk::CommandBuffer::ExecutionState&) ./../../third_party/swiftshader/src/Vulkan/VkCommandBuffer.cpp:1028:3
    #4 0x7f61b285aa02 in vk::CommandBuffer::submit(vk::CommandBuffer::ExecutionState&) ./../../third_party/swiftshader/src/Vulkan/VkCommandBuffer.cpp:2383:12
    #5 0x7f61b28b4acf in vk::Queue::submitQueue(vk::Queue::Task const&) ./../../third_party/swiftshader/src/Vulkan/VkQueue.cpp:104:42
    #6 0x7f61b28b3c60 in vk::Queue::taskLoop(marl::Scheduler*) ./../../third_party/swiftshader/src/Vulkan/VkQueue.cpp:156:4

So a draw command submitted to the SwiftShader queue is binding vertex inputs and dereferencing a buffer pointer that has already been freed. The freed region is described as follows:

Text
0x50700011b748 is located 8 bytes inside of 80-byte region [0x50700011b740,0x50700011b790)
freed by thread T0 (chrome) here:

The free happened on the main Chrome thread (T0), not on the queue thread. The free happened on thread T0, the main Chrome thread, not on the reading thread.

Exploitation

Step 1: launch the browser against the test page

Bash
chrome --incognito --user-data-dir=/tmp/xxx http://localhost:8000/crash.html --disable-gpu

This starts Chromium 124.0.6315.2 in incognito with a temporary profile and disables the GPU.

Step 2: the allocation path (draw with a vertex array)

The "previously allocated" stack shows where the 80-byte buffer came from. The allocation is triggered by a draw call that syncs a dirty vertex attribute:

Text
    #0 0x560728f0eb0f in __interceptor_malloc _asan_rtl_:3
    #1 0x7f61b2d4f10d in allocate ./../../third_party/swiftshader/src/System/Memory.cpp:81:42
    #2 0x7f61b2d4f10d in sw::allocateZeroOrPoison(unsigned long, unsigned long) ./../../third_party/swiftshader/src/System/Memory.cpp:110:9
    #3 0x7f61b28d36df in Create<vk::Buffer, VkNonDispatchableHandle<VkBuffer_T *>, VkBufferCreateInfo> ./../../third_party/swiftshader/src/Vulkan/VkObject.hpp:58:23
    #4 0x7f61b28d36df in VkResult vk::ObjectBase<vk::Buffer, VkNonDispatchableHandle<VkBuffer_T*>>::Create<VkBufferCreateInfo>(VkAllocationCallbacks const*, VkBufferCreateInfo const*, VkNonDispatchableHandle<VkBuffer_T*>*) ./../../third_party/swiftshader/src/Vulkan/VkObject.hpp:92:10
    #5 0x7f61b28d35cd in vkCreateBuffer ./../../third_party/swiftshader/src/Vulkan/libVulkan.cpp:1958:9
    #6 0x7f61be08a78a in init ./../../third_party/angle/src/libANGLE/renderer/vulkan/vk_wrapper.h:1668:12
    #7 0x7f61be08a78a in rx::vk::BufferHelper::getBufferForVertexArray(rx::ContextVk*, unsigned long, unsigned long*) ./../../third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp:5026:29
    #8 0x7f61bdfac2b5 in rx::VertexArrayVk::syncDirtyAttrib(rx::ContextVk*, gl::VertexAttribute const&, gl::VertexBinding const&, unsigned long, bool) ./../../third_party/angle/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp:862:30
    #9 0x7f61bdfa475e in rx::VertexArrayVk::syncState(gl::Context const*, angle::BitSetT<51ul, unsigned long, unsigned long> const&, std::__Cr::array<angle::BitSetT<5ul, unsigned long, unsigned long>, 16ul>*, std::__Cr::array<angle::BitSetT<4ul, unsigned long, unsigned long>, 16ul>*) ./../../third_party/angle/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp:646:17
    #10 0x7f61be416d92 in gl::VertexArray::syncState(gl::Context const*) ./../../third_party/angle/src/libANGLE/VertexArray.cpp:641:9
    #11 0x7f61be20d368 in syncDirtyObjects ./../../third_party/angle/src/libANGLE/State.h:1612:9
    #12 0x7f61be20d368 in syncDirtyObjects ./../../third_party/angle/src/libANGLE/Context.inl.h:126:19
    #13 0x7f61be20d368 in prepareForDraw ./../../third_party/angle/src/libANGLE/Context.inl.h:136:5
    #14 0x7f61be20d368 in gl::Context::drawArraysInstanced(gl::PrimitiveMode, int, int, int) ./../../third_party/angle/src/libANGLE/Context.cpp:2776:5
    #15 0x560742603321 in gpu::gles2::GLES2DecoderPassthroughImpl::DoDrawArraysInstancedANGLE(unsigned int, int, int, int) ./../../gpu/command_buffer/service/[redacted].cc:4785:10

Reading bottom to top: the renderer process issues glDrawArraysInstanced, the passthrough command decoder forwards it, ANGLE prepares for the draw, syncs the dirty vertex array state, and VertexArrayVk::syncDirtyAttrib calls BufferHelper::getBufferForVertexArray. That helper creates a Vulkan buffer through vkCreateBuffer, and SwiftShader allocates the 80-byte vk::Buffer object with sw::allocateZeroOrPoison. The allocation happens on the main thread, T0.

Step 3: the free path (deleting the GL buffer)

The "freed by" stack shows the buffer being released, again on T0:

Text
    #0 0x560728f0e876 in __interceptor_free _asan_rtl_:3
    #1 0x7f61bdf21c77 in destroy ./../../third_party/angle/src/libANGLE/renderer/vulkan/vk_wrapper.h:1660:9
    #2 0x7f61bdf21c77 in rx::vk::BufferSuballocationGarbage::destroyIfComplete(rx::RendererVk*) ./../../third_party/angle/src/libANGLE/renderer/vulkan/Suballocation.cpp:190:17
    #3 0x7f61be0ce5cd in rx::vk::SharedGarbageList<rx::vk::BufferSuballocationGarbage>::add(rx::RendererVk*, rx::vk::BufferSuballocationGarbage&&) ./../../third_party/angle/src/libANGLE/renderer/vulkan/ResourceVk.h:195:21
    #4 0x7f61be08b06b in rx::RendererVk::collectSuballocationGarbage(rx::vk::ResourceUse const&, rx::vk::BufferSuballocation&&, rx::vk::Buffer&&) ./../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.h:325:35
    #5 0x7f61be08b428 in release ./../../third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp:5085:19
    #6 0x7f61be08b428 in rx::vk::BufferHelper::releaseBufferAndDescriptorSetCache(rx::RendererVk*) ./../../third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp:5110:5
    #7 0x7f61bde41979 in rx::ContextVk::releaseBufferAllocation(rx::vk::BufferHelper*) ./../../third_party/angle/src/libANGLE/renderer/vulkan/ContextVk.cpp:7318:19
    #8 0x7f61bddd7cc4 in rx::BufferVk::release(rx::ContextVk*) ./../../third_party/angle/src/libANGLE/renderer/vulkan/BufferVk.cpp:339:9
    #9 0x7f61be3847b3 in release ./../../third_party/angle/src/libANGLE/RefCountObject.h:45:13
    #10 0x7f61be3847b3 in DeleteObject ./../../third_party/angle/src/libANGLE/ResourceManager.cpp:122:13
    #11 0x7f61be3847b3 in gl::TypedResourceManager<gl::Buffer, gl::BufferManager, gl::BufferID>::deleteObject(gl::Context const*, gl::BufferID) ./../../third_party/angle/src/libANGLE/ResourceManager.cpp:96:9
    #12 0x7f61be232302 in deleteBuffer ./../../third_party/angle/src/libANGLE/Context.cpp:1128:28
    #13 0x7f61be232302 in gl::Context::deleteBuffers(int, gl::BufferID const*) ./../../third_party/angle/src/libANGLE/Context.cpp:6738:9
    #14 0x5607425c6bc3 in gpu::gles2::GLES2DecoderPassthroughImpl::DoDeleteBuffers(int, unsigned int const volatile*) ./../../gpu/command_buffer/service/[redacted].cc:1020:10

Again bottom to top: the renderer issues glDeleteBuffers, the passthrough decoder calls DoDeleteBuffers, ANGLE's Context::deleteBuffers reaches BufferVk::release, which calls ContextVk::releaseBufferAllocation and then BufferHelper::releaseBufferAndDescriptorSetCache. That hands the suballocation to RendererVk::collectSuballocationGarbage, which adds it to a SharedGarbageList<BufferSuballocationGarbage>. The garbage entry's destroyIfComplete then calls destroy in vk_wrapper.h, which frees the underlying SwiftShader buffer object.

Step 4: the queued draw reads the freed buffer

Thread T18 was created by vk::Queue::Queue during device creation:

Text
Thread T18 created by T0 (chrome) here:
    #0 0x560728ef4981 in ___interceptor_pthread_create _asan_rtl_:3
    #1 0x7f61b28b3eae in __libcpp_thread_create ./../../third_party/libc++/src/include/__thread/support/pthread.h:181:10
    #2 0x7f61b28b3eae in std::__Cr::thread::thread<void (vk::Queue::*)(marl::Scheduler*), vk::Queue*, marl::Scheduler*&, 0>(void (vk::Queue::*&&)(marl::Scheduler*), vk::Queue*&&, marl::Scheduler*&) ./../../third_party/libc++/src/include/__thread/thread.h:212:14
    #3 0x7f61b28b3afb in vk::Queue::Queue(vk::Device*, marl::Scheduler*) ./../../third_party/swiftshader/src/Vulkan/VkQueue.cpp:38:16

When CmdDraw::execute runs, vk::Inputs::bindVertexInputs calls vk::Buffer::getOffsetPointer on the buffer that was freed in step 3, and ASan reports the 8-byte read at 0x50700011b748, 8 bytes inside the 80-byte region. The shadow memory dump confirms the region is marked as freed:

Text
=>0x50700011b700: fd fd fd fd fa fa f7 fa fd[fd]fd fd fd fd fd fd

Step 5: the additional info

ASan's additional section records the MiraclePtr status for the crash:

Text
MiraclePtr Status: NOT PROTECTED
No raw_ptr<T> access to this region was detected prior to this crash.
This crash is still exploitable with MiraclePtr.

MiraclePtr is Chrome's mitigation that makes use-after-free of raw_ptr-managed objects harder to exploit by quarantining freed memory. Here the access did not go through a raw_ptr, so the mitigation would not have covered this path.

Root cause

The bug is a lifetime mismatch between ANGLE's Vulkan buffer management and SwiftShader's command execution. ANGLE suballocates buffers and, when a GL buffer is deleted, moves the suballocation into a garbage list whose entries are destroyed once they are considered complete. In this sequence, the buffer object was freed on the main thread while a draw command referencing it was still queued for execution on the SwiftShader queue thread. When the queue thread executed the draw, it dereferenced the freed buffer in vk::Buffer::getOffsetPointer.

The report does not state which specific lifetime check failed, so the exact reason the garbage entry was considered complete while the draw was still pending is not given. What the stacks do show is that the free and the read happen on different threads, and that the read is a plain pointer access that MiraclePtr did not protect.

Impact

This is a use-after-free in ANGLE's Vulkan backend and SwiftShader. The report rates it critical and it was assigned CVE-2024-2883. The report itself does not describe a full exploit chain, so the practical impact beyond the crash (for example, whether the freed 80-byte object could be reallocated with attacker-controlled data to influence the draw) is not established here. The ASan note that the crash is still exploitable with MiraclePtr indicates the mitigation would not block exploitation of this path.

Fix

The report does not describe the fix. The only fix-related information is the CVE assignment (CVE-2024-2883) and the disclosure date.

Variants to test

  • Other resource types in the same garbage machinery. The report shows BufferSuballocationGarbage in a SharedGarbageList. A positive result is an ASan heap-use-after-free where the free stack goes through destroyIfComplete and the read stack is on a SwiftShader queue thread.
  • Different draw paths that sync vertex state. The allocation here came from VertexArrayVk::syncDirtyAttrib during drawArraysInstanced. Try other draw entry points that force a dirty vertex attribute sync. A positive result is the same allocation stack through BufferHelper::getBufferForVertexArray followed by a free before the queued draw executes.
  • Delete immediately after draw. The pattern is draw, then delete the buffer while the draw is still queued. Vary the timing and the number of queued commands to see whether the garbage entry is destroyed before the queue drains. A positive result is the same cross-thread free/read split between T0 and the queue thread.
  • Software rendering paths. The crash was reproduced with --disable-gpu. Test on machines without a usable GPU driver, or with the software fallback forced, to see whether the same lifetime gap appears in other backends.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 22 min read.

What happened, in plain words

A security researcher found a bug in Google Chrome, the web browser most people use. The bug is in a part of Chrome that draws graphics on the screen. When a web page asks the browser to draw something, Chrome hands that job to a graphics layer called ANGLE, which in turn talks to a lower layer called Vulkan. On computers where no proper graphics driver is available, Chrome uses a software stand-in for Vulkan called SwiftShader, which does the drawing work with the ordinary processor instead of a graphics card.

The bug is a use-after-free. To understand that, imagine a library where you borrow a book, and the librarian is allowed to take the book back and put it on a shelf for someone else once you say you are done with it. If you then try to read a page from the book you already gave back, you are reading something that may no longer be yours, or may have been replaced by a different book. In computer memory, a program asks the operating system for a chunk of memory (allocates it), uses it, and then gives it back (frees it). A use-after-free happens when the program keeps using that chunk after giving it back. The memory may now hold something else, and the program can crash or, worse, be tricked into doing something harmful.

In this case, Chrome freed a small piece of memory that described a graphics buffer while a drawing command that still needed that buffer was waiting in a queue to be carried out. When the queue finally ran the drawing command, it tried to read the buffer that had already been freed. A tool called AddressSanitizer, built into this special test version of Chrome, noticed the mistake and stopped the program with a detailed report.

The bug was given the identifier CVE-2024-2883. "CVE" stands for Common Vulnerabilities and Exposures: a public catalogue number that lets everyone refer to the same bug. It was rated critical, the most serious level. The researcher is Cassidy Kim (@cassidy6564), the report came through the Chrome Vulnerability Reward Program (VRP), a scheme that pays people for finding and reporting security bugs, and the bounty was 10,000 USD. The report was made public on 26 March 2024.

Context

Chrome does not draw web pages by itself. It uses a graphics layer called ANGLE. ANGLE is a translation layer: web pages use a standard set of drawing instructions called OpenGL ES, and ANGLE translates those instructions into whatever the machine underneath actually understands. One of those underlying systems is Vulkan, a modern interface for talking to graphics hardware. Think of ANGLE as an interpreter at a meeting: the web page speaks OpenGL ES, the graphics card speaks Vulkan, and ANGLE translates between them.

When there is no usable graphics driver, Chrome falls back to SwiftShader, a software implementation of Vulkan. Instead of a graphics card doing the work, the ordinary processor does it. It is slower, but it keeps things working.

ANGLE's Vulkan backend lives in code whose names start with rx::vk. It manages memory for buffers in a clever way: rather than asking the system for a fresh block of memory for every small buffer, it takes one large block and hands out slices of it. This is called suballocation, and it is like a landlord renting out rooms in one big house instead of building a separate house for every tenant. Because several parts of the program may still be using a slice, ANGLE does not free it the moment it seems unused. It puts the slice on a garbage list, a waiting list of memory that will be cleaned up later once ANGLE believes nothing needs it any more.

SwiftShader, meanwhile, runs drawing commands on its own worker thread, taking them from a queue one at a time. A thread is an independent line of execution inside a program; a program can have several threads working at once, like several clerks serving different customers. A queue is simply a line of jobs waiting to be done, first in, first out.

The two sides disagreed about when the buffer was still alive. ANGLE freed it on one thread while SwiftShader was still going to read it on another. AddressSanitizer caught the read after the free.

Setup

The report gives the tested OS and Chrome version:

  • Tested OS: Ubuntu 22.04
  • Tested Chrome version: Chromium 124.0.6315.2
  • An AddressSanitizer build of Chromium, with the crash surfacing in libvk_swiftshader.so
  • A local page served at http://localhost:8000/crash.html

Ubuntu 22.04 is a version of the Linux operating system. Chromium is the open-source project Chrome is built from, and 124.0.6315.2 is the exact build tested. An AddressSanitizer build is a special version of the browser compiled with a memory-checking tool. AddressSanitizer, or ASan, watches every memory access and shouts loudly the moment a program touches memory it should not. It is like a building inspector who follows every worker and notes the instant someone enters a room they no longer rent. libvk_swiftshader.so is the file containing the SwiftShader software Vulkan code; the .so ending means shared object, a library loaded by the program at run time.

http://localhost:8000/crash.html is a web page stored on the same machine, served by a small local web server listening on port 8000. localhost means "this computer", and 8000 is the port number, a numbered door through which the server accepts requests. The page is named crash.html because loading it triggers the crash. Its contents are not included in the report.

The reproduction is launched with GPU acceleration disabled:

Bash
chrome --incognito --user-data-dir=/tmp/xxx http://localhost:8000/crash.html --disable-gpu

Line by line:

  • chrome is the browser program being started.
  • --incognito opens a private browsing window that does not keep history or other profile data. This keeps the test clean: no saved settings or extensions can interfere.
  • --user-data-dir=/tmp/xxx tells Chrome to keep all its profile files in the folder /tmp/xxx instead of the normal place. /tmp is a temporary folder on Linux, and xxx is just a throwaway folder name. Using a fresh folder means the run starts from a blank profile every time.
  • http://localhost:8000/crash.html is the page to open immediately on startup.
  • --disable-gpu turns off use of the graphics card.

Finding it

The report is a crash report rather than a story, so the "finding" is the AddressSanitizer output itself. ASan reports a heap-use-after-free:

Text
==210209==ERROR: AddressSanitizer: heap-use-after-free on address 0x50700011b748 at pc 0x7f61b285445b bp 0x7f6197280f40 sp 0x7f6197280f38
READ of size 8 at 0x50700011b748 thread T18

What this says, piece by piece:

  • ==210209== is the process ID, the number the operating system gave this particular run of the browser. It lets you match lines from the same run.
  • ERROR: AddressSanitizer: heap-use-after-free is the verdict: a use-after-free was detected. The heap is the pool of memory a program borrows at run time for things whose size is not known in advance.
  • on address 0x50700011b748 is the exact memory location involved. The 0x prefix means the number is written in hexadecimal, base 16, the usual way programmers write memory addresses.
  • at pc 0x7f61b285445b bp 0x7f6197280f40 sp 0x7f6197280f38 gives the program counter (where the code was executing), the base pointer and the stack pointer, three registers that describe where in the program the fault happened. You do not need to decode them; they are for the developer.
  • READ of size 8 means the program tried to read 8 bytes of memory in one go. Eight bytes is the size of a pointer on a 64-bit machine, so this is the program reading an address out of the freed memory.
  • thread T18 says which thread did it. Threads are numbered, and T18 is a worker thread inside SwiftShader.

The faulting read is an 8-byte load on thread T18, created by vk::Queue::Queue. The top of the stack is in SwiftShader's buffer code:

Text
    #0 0x7f61b285445a in vk::Buffer::getOffsetPointer(unsigned long) const ./../../third_party/swiftshader/src/Vulkan/VkBuffer.cpp:151:37
    #1 0x7f61b29542af in vk::Inputs::bindVertexInputs(int) ./../../third_party/swiftshader/src/Device/Context.cpp:382:61
    #2 0x7f61b286230d in (anonymous namespace)::CmdDrawBase::draw(vk::CommandBuffer::ExecutionState&, bool, unsigned int, unsigned int, unsigned int, int, unsigned int) ./../../third_party/swiftshader/src/Vulkan/VkCommandBuffer.cpp:976:10
    #3 0x7f61b2862121 in (anonymous namespace)::CmdDraw::execute(vk::CommandBuffer::ExecutionState&) ./../../third_party/swiftshader/src/Vulkan/VkCommandBuffer.cpp:1028:3
    #4 0x7f61b285aa02 in vk::CommandBuffer::submit(vk::CommandBuffer::ExecutionState&) ./../../third_party/swiftshader/src/Vulkan/VkCommandBuffer.cpp:2383:12
    #5 0x7f61b28b4acf in vk::Queue::submitQueue(vk::Queue::Task const&) ./../../third_party/swiftshader/src/Vulkan/VkQueue.cpp:104:42
    #6 0x7f61b28b3c60 in vk::Queue::taskLoop(marl::Scheduler*) ./../../third_party/swiftshader/src/Vulkan/VkQueue.cpp:156:4

This is a stack trace, a list of the function calls that led to the crash, with the most recent call at the top. Reading it from the bottom up tells the story:

  • #6 vk::Queue::taskLoop is the worker loop: the code that keeps taking jobs off the queue.
  • #5 vk::Queue::submitQueue submits the next queued job.
  • #4 vk::CommandBuffer::submit starts executing a recorded command buffer, a list of drawing commands prepared earlier.
  • #3 CmdDraw::execute runs a draw command, one instruction that says "draw this shape".
  • #2 CmdDrawBase::draw does the actual drawing work.
  • #1 vk::Inputs::bindVertexInputs connects the shape's vertex inputs: the per-corner data (positions, colours and so on) that the draw needs. A vertex is a corner point of a shape.
  • #0 vk::Buffer::getOffsetPointer asks a buffer object where its data starts in memory. This is the exact line that read the freed memory.

So a draw command submitted to the SwiftShader queue is binding vertex inputs and dereferencing a buffer pointer that has already been freed. The freed region is described as follows:

Text
0x50700011b748 is located 8 bytes inside of 80-byte region [0x50700011b740,0x50700011b790)
freed by thread T0 (chrome) here:

This tells us the freed chunk was 80 bytes long, running from address 0x50700011b740 up to but not including 0x50700011b790. The bad read was 8 bytes into that chunk. The next line says the free happened on thread T0, the main Chrome thread, not on the queue thread. The free happened on thread T0, the main Chrome thread, not on the reading thread.

Exploitation

Step 1: launch the browser against the test page

Bash
chrome --incognito --user-data-dir=/tmp/xxx http://localhost:8000/crash.html --disable-gpu

This starts Chromium 124.0.6315.2 in incognito with a temporary profile and disables the GPU. The same command appears twice in the report because it is both the setup and the first step of the reproduction: there is nothing else to do but start the browser on the page.

Step 2: the allocation path (draw with a vertex array)

The "previously allocated" stack shows where the 80-byte buffer came from. ASan records not only where the bad access happened but also where the memory was first handed out, so you can see the whole life of the chunk. The allocation is triggered by a draw call that syncs a dirty vertex attribute:

Text
    #0 0x560728f0eb0f in __interceptor_malloc _asan_rtl_:3
    #1 0x7f61b2d4f10d in allocate ./../../third_party/swiftshader/src/System/Memory.cpp:81:42
    #2 0x7f61b2d4f10d in sw::allocateZeroOrPoison(unsigned long, unsigned long) ./../../third_party/swiftshader/src/System/Memory.cpp:110:9
    #3 0x7f61b28d36df in Create<vk::Buffer, VkNonDispatchableHandle<VkBuffer_T *>, VkBufferCreateInfo> ./../../third_party/swiftshader/src/Vulkan/VkObject.hpp:58:23
    #4 0x7f61b28d36df in VkResult vk::ObjectBase<vk::Buffer, VkNonDispatchableHandle<VkBuffer_T*>>::Create<VkBufferCreateInfo>(VkAllocationCallbacks const*, VkBufferCreateInfo const*, VkNonDispatchableHandle<VkBuffer_T*>*) ./../../third_party/swiftshader/src/Vulkan/VkObject.hpp:92:10
    #5 0x7f61b28d35cd in vkCreateBuffer ./../../third_party/swiftshader/src/Vulkan/libVulkan.cpp:1958:9
    #6 0x7f61be08a78a in init ./../../third_party/angle/src/libANGLE/renderer/vulkan/vk_wrapper.h:1668:12
    #7 0x7f61be08a78a in rx::vk::BufferHelper::getBufferForVertexArray(rx::ContextVk*, unsigned long, unsigned long*) ./../../third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp:5026:29
    #8 0x7f61bdfac2b5 in rx::VertexArrayVk::syncDirtyAttrib(rx::ContextVk*, gl::VertexAttribute const&, gl::VertexBinding const&, unsigned long, bool) ./../../third_party/angle/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp:862:30
    #9 0x7f61bdfa475e in rx::VertexArrayVk::syncState(gl::Context const*, angle::BitSetT<51ul, unsigned long, unsigned long> const&, std::__Cr::array<angle::BitSetT<5ul, unsigned long, unsigned long>, 16ul>*, std::__Cr::array<angle::BitSetT<4ul, unsigned long, unsigned long>, 16ul>*) ./../../third_party/angle/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp:646:17
    #10 0x7f61be416d92 in gl::VertexArray::syncState(gl::Context const*) ./../../third_party/angle/src/libANGLE/VertexArray.cpp:641:9
    #11 0x7f61be20d368 in syncDirtyObjects ./../../third_party/angle/src/libANGLE/State.h:1612:9
    #12 0x7f61be20d368 in syncDirtyObjects ./../../third_party/angle/src/libANGLE/Context.inl.h:126:19
    #13 0x7f61be20d368 in prepareForDraw ./../../third_party/angle/src/libANGLE/Context.inl.h:136:5
    #14 0x7f61be20d368 in gl::Context::drawArraysInstanced(gl::PrimitiveMode, int, int, int) ./../../third_party/angle/src/libANGLE/Context.cpp:2776:5
    #15 0x560742603321 in gpu::gles2::GLES2DecoderPassthroughImpl::DoDrawArraysInstancedANGLE(unsigned int, int, int, int) ./../../gpu/command_buffer/service/[redacted].cc:4785:10

Reading bottom to top: the renderer process issues glDrawArraysInstanced, the passthrough command decoder forwards it, ANGLE prepares for the draw, syncs the dirty vertex array state, and VertexArrayVk::syncDirtyAttrib calls BufferHelper::getBufferForVertexArray. That helper creates a Vulkan buffer through vkCreateBuffer, and SwiftShader allocates the 80-byte vk::Buffer object with sw::allocateZeroOrPoison. The allocation happens on the main thread, T0.

Some terms in that paragraph, from zero:

  • The renderer process is the part of Chrome that turns a web page into what you see. Chrome splits itself into several processes for safety, so a crash or attack in one does not automatically take down the whole browser.
  • glDrawArraysInstanced is an OpenGL ES instruction meaning "draw this set of vertices, repeated a number of times". A web page using WebGL, the browser's 3D drawing interface, can cause it.
  • The passthrough command decoder is Chrome's component that receives drawing instructions from the renderer and passes them on to the graphics layer. "Passthrough" means it mostly forwards them rather than reimplementing them.
  • Dirty state means "changed since last time and not yet applied". When a page changes something about how a shape is drawn, ANGLE marks it dirty and syncs it before the next draw. syncDirtyAttrib is the function that applies a changed vertex attribute.
  • vkCreateBuffer is the Vulkan call that creates a buffer object. SwiftShader's implementation of it allocates the 80-byte bookkeeping object with sw::allocateZeroOrPoison, which is SwiftShader's own memory allocator. The name says it fills the memory with zeros, or with a special poison pattern when running under a memory checker, so that accidental use of uninitialised memory is easier to spot.

Step 3: the free path (deleting the GL buffer)

The "freed by" stack shows the buffer being released, again on T0:

Text
    #0 0x560728f0e876 in __interceptor_free _asan_rtl_:3
    #1 0x7f61bdf21c77 in destroy ./../../third_party/angle/src/libANGLE/renderer/vulkan/vk_wrapper.h:1660:9
    #2 0x7f61bdf21c77 in rx::vk::BufferSuballocationGarbage::destroyIfComplete(rx::RendererVk*) ./../../third_party/angle/src/libANGLE/renderer/vulkan/Suballocation.cpp:190:17
    #3 0x7f61be0ce5cd in rx::vk::SharedGarbageList<rx::vk::BufferSuballocationGarbage>::add(rx::RendererVk*, rx::vk::BufferSuballocationGarbage&&) ./../../third_party/angle/src/libANGLE/renderer/vulkan/ResourceVk.h:195:21
    #4 0x7f61be08b06b in rx::RendererVk::collectSuballocationGarbage(rx::vk::ResourceUse const&, rx::vk::BufferSuballocation&&, rx::vk::Buffer&&) ./../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.h:325:35
    #5 0x7f61be08b428 in release ./../../third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp:5085:19
    #6 0x7f61be08b428 in rx::vk::BufferHelper::releaseBufferAndDescriptorSetCache(rx::RendererVk*) ./../../third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp:5110:5
    #7 0x7f61bde41979 in rx::ContextVk::releaseBufferAllocation(rx::vk::BufferHelper*) ./../../third_party/angle/src/libANGLE/renderer/vulkan/ContextVk.cpp:7318:19
    #8 0x7f61bddd7cc4 in rx::BufferVk::release(rx::ContextVk*) ./../../third_party/angle/src/libANGLE/renderer/vulkan/BufferVk.cpp:339:9
    #9 0x7f61be3847b3 in release ./../../third_party/angle/src/libANGLE/RefCountObject.h:45:13
    #10 0x7f61be3847b3 in DeleteObject ./../../third_party/angle/src/libANGLE/ResourceManager.cpp:122:13
    #11 0x7f61be3847b3 in gl::TypedResourceManager<gl::Buffer, gl::BufferManager, gl::BufferID>::deleteObject(gl::Context const*, gl::BufferID) ./../../third_party/angle/src/libANGLE/ResourceManager.cpp:96:9
    #12 0x7f61be232302 in deleteBuffer ./../../third_party/angle/src/libANGLE/Context.cpp:1128:28
    #13 0x7f61be232302 in gl::Context::deleteBuffers(int, gl::BufferID const*) ./../../third_party/angle/src/libANGLE/Context.cpp:6738:9
    #14 0x5607425c6bc3 in gpu::gles2::GLES2DecoderPassthroughImpl::DoDeleteBuffers(int, unsigned int const volatile*) ./../../gpu/command_buffer/service/[redacted].cc:1020:10

Again bottom to top: the renderer issues glDeleteBuffers, the passthrough decoder calls DoDeleteBuffers, ANGLE's Context::deleteBuffers reaches BufferVk::release, which calls ContextVk::releaseBufferAllocation and then BufferHelper::releaseBufferAndDescriptorSetCache. That hands the suballocation to RendererVk::collectSuballocationGarbage, which adds it to a SharedGarbageList<BufferSuballocationGarbage>. The garbage entry's destroyIfComplete then calls destroy in vk_wrapper.h, which frees the underlying SwiftShader buffer object.

In plain words:

  • glDeleteBuffers is the OpenGL ES instruction that says "I am done with this buffer, you may clean it up". A page can call it through WebGL.
  • DoDeleteBuffers is the passthrough decoder's handler for that instruction.
  • BufferVk::release is ANGLE's Vulkan-side buffer object being told to let go of its resources. RefCountObject and DeleteObject in the stack are the reference-counting machinery: a reference count is a tally of how many parts of the program are using an object, and the object is only destroyed when the tally reaches zero. It is like a shared meeting room that is only locked up when the last person leaves.
  • releaseBufferAllocation and releaseBufferAndDescriptorSetCache give the memory slice back. A descriptor set is a small table telling the graphics system where to find a buffer; the cache of such tables is cleaned up at the same time.
  • collectSuballocationGarbage puts the slice on the garbage list, SharedGarbageList<BufferSuballocationGarbage>. The name says it all: a list of garbage shared between parts of the renderer, where each entry is a buffer suballocation waiting to be destroyed.
  • destroyIfComplete is the check that decides whether the entry can be destroyed now. The word "complete" here means ANGLE believes every use of the buffer has finished.
  • destroy calls free, which returns the 80 bytes to the system. From this moment the memory is no longer the program's to use.

Step 4: the queued draw reads the freed buffer

Thread T18 was created by vk::Queue::Queue during device creation:

Text
Thread T18 created by T0 (chrome) here:
    #0 0x560728ef4981 in ___interceptor_pthread_create _asan_rtl_:3
    #1 0x7f61b28b3eae in __libcpp_thread_create ./../../third_party/libc++/src/include/__thread/support/pthread.h:181:10
    #2 0x7f61b28b3eae in std::__Cr::thread::thread<void (vk::Queue::*)(marl::Scheduler*), vk::Queue*, marl::Scheduler*&, 0>(void (vk::Queue::*&&)(marl::Scheduler*), vk::Queue*&&, marl::Scheduler*&) ./../../third_party/libc++/src/include/__thread/thread.h:212:14
    #3 0x7f61b28b3afb in vk::Queue::Queue(vk::Device*, marl::Scheduler*) ./../../third_party/swiftshader/src/Vulkan/VkQueue.cpp:38:16

This stack shows where thread T18 came from. pthread_create is the operating system call that starts a new thread; __libcpp_thread_create and std::__Cr::thread::thread are the C++ standard library wrappers around it. The thread was created inside vk::Queue::Queue, the constructor of SwiftShader's queue object, which runs when the Vulkan device is set up.

When CmdDraw::execute runs, vk::Inputs::bindVertexInputs calls vk::Buffer::getOffsetPointer on the buffer that was freed in step 3, and ASan reports the 8-byte read at 0x50700011b748, 8 bytes inside the 80-byte region. The shadow memory dump confirms the region is marked as freed:

Text
=>0x50700011b700: fd fd fd fd fa fa f7 fa fd[fd]fd fd fd fd fd fd

Shadow memory is how ASan keeps track of which bytes are valid. For every 8 bytes of real memory, ASan keeps one extra byte saying whether those 8 bytes are fine to use. The dump shows those extra bytes around the bad address. The => marks the line containing the address that was read, and the square brackets mark the exact shadow byte for it. The value fd means "freed heap region": ASan has painted the memory as freed. fa marks a redzone, a guard area around an allocation that should never be touched, and f7 means memory that has been deliberately poisoned. Seeing fd at the bracketed position confirms the program read memory it had already given back.

Step 5: the additional info

ASan's additional section records the MiraclePtr status for the crash:

Text
MiraclePtr Status: NOT PROTECTED
No raw_ptr<T> access to this region was detected prior to this crash.
This crash is still exploitable with MiraclePtr.

MiraclePtr is Chrome's mitigation that makes use-after-free of raw_ptr-managed objects harder to exploit by quarantining freed memory. A mitigation is a defensive measure that does not remove a bug but makes it harder to turn into an attack. raw_ptr is a special pointer type Chrome uses for pointers to objects it wants to protect; when such an object is freed, MiraclePtr can make the pointer stop working instead of silently pointing at reused memory. Here the access did not go through a raw_ptr, so the mitigation would not have covered this path. The note says plainly that the crash is still exploitable even with MiraclePtr enabled.

Root cause

The bug is a lifetime mismatch between ANGLE's Vulkan buffer management and SwiftShader's command execution. ANGLE suballocates buffers and, when a GL buffer is deleted, moves the suballocation into a garbage list whose entries are destroyed once they are considered complete. In this sequence, the buffer object was freed on the main thread while a draw command referencing it was still queued for execution on the SwiftShader queue thread. When the queue thread executed the draw, it dereferenced the freed buffer in vk::Buffer::getOffsetPointer.

A useful comparison is a restaurant. The kitchen (the main thread) decides a table's order is finished and clears the table, while a waiter (the queue thread) is still carrying that order to the table. The waiter arrives with food for a table that has already been reset. The mistake is not in the cooking or the carrying; it is in the assumption about when the table is really done.

The report does not state which specific lifetime check failed, so the exact reason the garbage entry was considered complete while the draw was still pending is not given. What the stacks do show is that the free and the read happen on different threads, and that the read is a plain pointer access that MiraclePtr did not protect.

Impact

This is a use-after-free in ANGLE's Vulkan backend and SwiftShader. The GPU process is the separate Chrome process that handles graphics work; keeping it separate limits the damage a graphics bug can do.

The report rates it critical and it was assigned CVE-2024-2883. The report itself does not describe a full exploit chain, so the practical impact beyond the crash (for example, whether the freed 80-byte object could be reallocated with attacker-controlled data to influence the draw) is not established here. An exploit chain is a series of steps that turns a bug into real control over a machine; a crash alone is a denial of service, annoying but limited. The ASan note that the crash is still exploitable with MiraclePtr indicates the mitigation would not block exploitation of this path.

Fix

The report does not describe the fix. The only fix-related information is the CVE assignment (CVE-2024-2883) and the disclosure date.

Variants to test

These are ideas for a researcher who wants to look for similar bugs. Each one describes what to try and what a positive result would look like.

  • Other resource types in the same garbage machinery. The report shows BufferSuballocationGarbage in a SharedGarbageList. A positive result is an ASan heap-use-after-free where the free stack goes through destroyIfComplete and the read stack is on a SwiftShader queue thread.
  • Different draw paths that sync vertex state. The allocation here came from VertexArrayVk::syncDirtyAttrib during drawArraysInstanced. Try other draw entry points that force a dirty vertex attribute sync. A positive result is the same allocation stack through BufferHelper::getBufferForVertexArray followed by a free before the queued draw executes.
  • Delete immediately after draw. The pattern is draw, then delete the buffer while the draw is still queued. Vary the timing and the number of queued commands to see whether the garbage entry is destroyed before the queue drains. A positive result is the same cross-thread free/read split between T0 and the queue thread.
  • Software rendering paths. The crash was reproduced with --disable-gpu. Test on machines without a usable GPU driver, or with the software fallback forced, to see whether the same lifetime gap appears in other backends.

Glossary

  • AddressSanitizer (ASan): a memory-checking tool built into a special build of a program that detects invalid memory use, such as reading memory after it has been freed.
  • ANGLE: Chrome's graphics translation layer that implements OpenGL ES on top of other graphics systems such as Vulkan.
  • API: an agreed set of instructions one piece of software uses to ask another to do something, like a menu of services.
  • Buffer: a block of memory used to hold data, here the per-corner data for drawing shapes.
  • Chromium: the open-source browser project that Google Chrome is built from.
  • Command buffer: a recorded list of graphics commands that can be submitted for execution as a unit.
  • CVE: Common Vulnerabilities and Exposures, a public catalogue number for a specific security bug.
  • Descriptor set: a small table telling the graphics system where to find resources such as buffers.
  • Dirty state: state that has changed and has not yet been applied to the underlying graphics system.
  • Exploit chain: a series of steps that turns a bug into real control over a system.
  • Free: to give a block of memory back to the system so it can be reused.
  • Garbage list: a waiting list of memory that will be cleaned up later once it is believed nothing needs it.
  • GPU process: the separate Chrome process that handles graphics work.
  • Heap: the pool of memory a program borrows at run time for data whose size is not known in advance.
  • Hex / hexadecimal: base-16 number notation, the usual way memory addresses are written, with a 0x prefix.
  • Incognito: a private browsing mode that does not keep history or profile data.
  • MiraclePtr: a Chrome mitigation that makes use-after-free of raw_ptr-managed objects harder to exploit by quarantining freed memory.
  • Mitigation: a defensive measure that does not remove a bug but makes it harder to exploit.
  • OpenGL ES: a standard set of drawing instructions used by web pages and apps.
  • Passthrough command decoder: Chrome's component that receives drawing instructions from the renderer and forwards them to the graphics layer.
  • Pointer: a value that holds the memory address of something else, like a note saying where a book sits on a shelf.
  • Process: a running program with its own memory, kept separate from other processes.
  • Queue: a line of jobs waiting to be done, first in, first out.
  • raw_ptr: a special pointer type Chrome uses for pointers to objects it wants to protect with MiraclePtr.
  • Reference count: a tally of how many parts of a program are using an object; the object is destroyed when the tally reaches zero.
  • Renderer process: the part of Chrome that turns a web page into what you see.
  • Shadow memory: extra memory AddressSanitizer keeps to record which bytes of real memory are valid.
  • Shared object (.so): a library file loaded by a program at run time on Linux.
  • Stack trace: a list of the function calls that led to a particular point, with the most recent call at the top.
  • Suballocation: handing out slices of one large block of memory instead of a separate block for each user.
  • SwiftShader: a software implementation of Vulkan that does graphics work on the ordinary processor when no usable graphics driver is available.
  • Thread: an independent line of execution inside a program.
  • Use-after-free: a bug where a program keeps using a block of memory after giving it back.
  • Vertex: a corner point of a shape, carrying data such as position and colour.
  • Vulkan: a modern interface for talking to graphics hardware.
  • VRP (Vulnerability Reward Program): a scheme that pays people for finding and reporting security bugs.
  • WebGL: the browser interface that lets web pages draw 3D graphics.

More by Cassidy Kim

View all

29 more disclosed reports, best first.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.