Skip to content
Memory corruption Disclosed report Advanced CVE-2024-6600

WebGL macOS GLSL Shader Out-Of-Bounds Vulnerability

pwn2addr Follow

Originally disclosed on Mozilla

  • Fixed in 3 months
  • Paid in 3 months
  • Disclosed after 3 months

Created attachment 9393705 oob.html

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36

Steps to reproduce:

Steps to reproduce: Operating System: MacOS Sonoma 14.4 [Macbook ARM]

  1. python3 -m http.server 9292
  2. Open Firefox
  3. Open http://localhost:9292/poc.html

Actual results:

=================================================================
==5988==ERROR: AddressSanitizer: BUS on unknown address (pc 0x00018e29dd74 bp 0x000173983120 sp 0x000173982f10 T50)
==5988==The signal is caused by a READ memory access.
==5988==Hint: this fault was caused by a dereference of a high value address (see register values below).  Disassemble the provided pc to learn which register was used.
    #0 0x18e29dd74 in ___chkstk_darwin+0x3c (libsystem_pthread.dylib:arm64+0x1d74)
    #1 0x5e708001e4c0aeac  (<unknown module>)
    #2 0x2e520001e4c0cf94  (<unknown module>)
    #3 0xf7128001e4c0592c  (<unknown module>)
    #4 0x2f318001e4bd75a4  (<unknown module>)
    #5 0xb2260001e4b50c04  (<unknown module>)
    #6 0x60238001e4b47c18  (<unknown module>)
    #7 0x7a588001e4b47694  (<unknown module>)
    #8 0xd588001e4b6eda0  (<unknown module>)
    #9 0x8d6a0001012f2c88  (<unknown module>)
    #10 0x18e0f23e4 in _dispatch_client_callout+0x10 (libdispatch.dylib:arm64+0x43e4)
    #11 0x1a4a80018e1018d4  (<unknown module>)
    #12 0xa5058001012f2f0c  (<unknown module>)
    #13 0x1e4ae65d8 in glFlush_ExecThread+0x1c (GLEngine:arm64+0x4f5d8)
    #14 0x9e24800129987b80  (<unknown module>)
    #15 0x12d140198 in bool (*mozilla::MethodDispatcher<mozilla::WebGLMethodDispatcher, 26ul, void (mozilla::HostWebGLContext::*)(), &mozilla::HostWebGLContext::DidRefresh()>::DispatchCommandFuncById<mozilla::HostWebGLContext>(unsigned long))(mozilla::HostWebGLContext&, mozilla::webgl::RangeConsumerView&)::'lambda'(mozilla::HostWebGLContext&, mozilla::webgl::RangeConsumerView&)::__invoke(mozilla::HostWebGLContext&, mozilla::webgl::RangeConsumerView&)+0x4c (XUL:arm64+0x6304198)
    #16 0x12d0ea7e4 in mozilla::dom::WebGLParent::RecvDispatchCommands(mozilla::ipc::BigBuffer&&, unsigned long long)+0x570 (XUL:arm64+0x62ae7e4)
    #17 0x12d202780 in mozilla::dom::PWebGLParent::OnMessageReceived(IPC::Message const&)+0xbe4 (XUL:arm64+0x63c6780)
    #18 0x12a120dac in mozilla::gfx::PCanvasManagerParent::OnMessageReceived(IPC::Message const&)+0x344 (XUL:arm64+0x32e4dac)
    #19 0x128f712a8 in mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&)+0x14c (XUL:arm64+0x21352a8)
    #20 0x128f6e78c in mozilla::ipc::MessageChannel::DispatchMessage(mozilla::ipc::ActorLifecycleProxy*, mozilla::UniquePtr<IPC::Message, mozilla::DefaultDelete<IPC::Message>>)+0x41c (XUL:arm64+0x213278c)
    #21 0x128f6f548 in mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::ActorLifecycleProxy*, mozilla::ipc::MessageChannel::MessageTask&)+0x2b4 (XUL:arm64+0x2133548)
    #22 0x128f6ff90 in mozilla::ipc::MessageChannel::MessageTask::Run()+0x14c (XUL:arm64+0x2133f90)
    #23 0x127a6afb4 in nsThread::ProcessNextEvent(bool, bool*)+0xd8c (XUL:arm64+0xc2efb4)
    #24 0x127a7730c in NS_ProcessNextEvent(nsIThread*, bool)+0x114 (XUL:arm64+0xc3b30c)
    #25 0x128f7a49c in mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)+0x264 (XUL:arm64+0x213e49c)
    #26 0x128e6e3bc in MessageLoop::Run()+0x1c4 (XUL:arm64+0x20323bc)
    #27 0x127a6381c in nsThread::ThreadFunc(void*)+0x290 (XUL:arm64+0xc2781c)
    #28 0x1041eeb08 in _pt_root+0x384 (libnss3.dylib:arm64+0x3cab08)
    #29 0x1012f119c in asan_thread_start(void*)+0x3c (libclang_rt.asan_osx_dynamic.dylib:arm64+0x4d19c)
    #30 0x18e2a2f90 in _pthread_start+0x84 (libsystem_pthread.dylib:arm64+0x6f90)
    #31 0xef6180018e29dd30  (<unknown module>)

==5988==Register values:
 x[0] = 0x00006300000c0ce0   x[1] = 0x000000000008dac0   x[2] = 0x0000606000fdab40   x[3] = 0x00006270001e3eb0
 x[4] = 0x00000001f647b010   x[5] = 0x0000000000000000   x[6] = 0x00006270001e3320   x[7] = 0x00006270001e4178
 x[8] = 0x000000000008dac0   x[9] = 0x000000000008dac0  x[10] = 0x00000001738f5450  x[11] = 0x0000000173904000
x[12] = 0x0200000102000998  x[13] = 0x0000615000253d80  x[14] = 0x01000001f784a3ed  x[15] = 0x00000001f784a3e8
x[16] = 0x000000018e29dd38  x[17] = 0x00000001ffea56b8  x[18] = 0x0000000000000000  x[19] = 0x0000000173982f10
x[20] = 0x0000000000000000  x[21] = 0x00006270001e3320  x[22] = 0x00006270001e3100  x[23] = 0x00006270001e4178
x[24] = 0x00000000fffffffe  x[25] = 0x000061e0004f0880  x[26] = 0x0000631010f90800  x[27] = 0x0000631010f90800
x[28] = 0x0000000000000000     fp = 0x0000000173983120     lr = 0x00000001e49a2cc4     sp = 0x0000000173982f10
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: BUS (libsystem_pthread.dylib:arm64+0x1d74) in ___chkstk_darwin+0x3c
Thread T50 created by T0 here:
    #0 0x1012ebda0 in pthread_create+0x58 (libclang_rt.asan_osx_dynamic.dylib:arm64+0x47da0)
    #1 0x1041dedf8 in _PR_CreateThread+0x448 (libnss3.dylib:arm64+0x3badf8)
    #2 0x127a661b8 in nsThread::Init(nsTSubstring<char> const&)+0x17c (XUL:arm64+0xc2a1b8)
    #3 0x127a75230 in nsThreadManager::NewNamedThread(nsTSubstring<char> const&, nsIThreadManager::ThreadCreationOptions, nsIThread**)+0x2b0 (XUL:arm64+0xc39230)
    #4 0x127a82af8 in NS_NewNamedThread(nsTSubstring<char> const&, nsIThread**, already_AddRefed<nsIRunnable>, nsIThreadManager::ThreadCreationOptions)+0x148 (XUL:arm64+0xc46af8)
    #5 0x12a0e4cbc in mozilla::gfx::CanvasRenderThread::Start()+0x4bc (XUL:arm64+0x32a8cbc)
    #6 0x129f24e7c in gfxPlatform::Init()+0x19e4 (XUL:arm64+0x30e8e7c)
    #7 0x129f2334c in gfxPlatform::GetPlatform()+0x2c (XUL:arm64+0x30e734c)
    #8 0x130b8a620 in mozilla::widget::GfxInfoBase::GetContentBackend(nsTSubstring<char16_t>&)+0xac (XUL:arm64+0x9d4e620)
    #9 0x127ab7084 in _NS_InvokeByIndex+0x5c (XUL:arm64+0xc7b084)
    #10 0x12927f93c in XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode)+0x27f0 (XUL:arm64+0x244393c)
    #11 0x129285780 in XPC_WN_GetterSetter(JSContext*, unsigned int, JS::Value*)+0x594 (XUL:arm64+0x2449780)
    #12 0x1343e1da8 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason)+0x86c (XUL:arm64+0xd5a5da8)
    #13 0x1343e3878 in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason)+0x1dc (XUL:arm64+0xd5a7878)
    #14 0x1343e52b0 in js::CallGetter(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::MutableHandle<JS::Value>)+0x234 (XUL:arm64+0xd5a92b0)
    #15 0x1347a1ec8 in js::NativeGetProperty(JSContext*, JS::Handle<js::NativeObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>)+0x141c (XUL:arm64+0xd965ec8)
    #16 0x1343fc1e8 in js::Interpret(JSContext*, js::RunState&)+0x12534 (XUL:arm64+0xd5c01e8)
    #17 0x1343e0d10 in js::RunScript(JSContext*, js::RunState&)+0x4d4 (XUL:arm64+0xd5a4d10)
    #18 0x1343e1eb4 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason)+0x978 (XUL:arm64+0xd5a5eb4)
    #19 0x1343e3878 in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason)+0x1dc (XUL:arm64+0xd5a7878)
    #20 0x1343e52b0 in js::CallGetter(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::MutableHandle<JS::Value>)+0x234 (XUL:arm64+0xd5a92b0)
    #21 0x1347a1ec8 in js::NativeGetProperty(JSContext*, JS::Handle<js::NativeObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>)+0x141c (XUL:arm64+0xd965ec8)
    #22 0x134416e40 in js::GetProperty(JSContext*, JS::Handle<JS::Value>, JS::Handle<js::PropertyName*>, JS::MutableHandle<JS::Value>)+0x82c (XUL:arm64+0xd5dae40)
    #23 0x1343ec78c in js::Interpret(JSContext*, js::RunState&)+0x2ad8 (XUL:arm64+0xd5b078c)
    #24 0x1343e0d10 in js::RunScript(JSContext*, js::RunState&)+0x4d4 (XUL:arm64+0xd5a4d10)
    #25 0x1343e1eb4 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason)+0x978 (XUL:arm64+0xd5a5eb4)
    #26 0x1343e3878 in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason)+0x1dc (XUL:arm64+0xd5a7878)
    #27 0x1345bc67c in JS_CallFunctionValue(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>)+0x480 (XUL:arm64+0xd78067c)
    #28 0x129270568 in nsXPCWrappedJS::CallMethod(unsigned short, nsXPTMethodInfo const*, nsXPTCMiniVariant*)+0x11b4 (XUL:arm64+0x2434568)
    #29 0x127ab8b68 in PrepareAndDispatch+0x970 (XUL:arm64+0xc7cb68)
    #30 0x127ab70d4 in SharedStub+0x3c (XUL:arm64+0xc7b0d4)
    #31 0x1279f69c4 in NS_CreateServicesFromCategory(char const*, nsISupports*, char const*, char16_t const*)+0xa28 (XUL:arm64+0xbba9c4)
    #32 0x1341de7e8 in nsXREDirProvider::DoStartup()+0x4a8 (XUL:arm64+0xd3a27e8)
    #33 0x1341c1ad0 in XREMain::XRE_mainRun()+0xe2c (XUL:arm64+0xd385ad0)
    #34 0x1341c40c0 in XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&)+0xcb0 (XUL:arm64+0xd3880c0)
    #35 0x1341c5170 in XRE_main(int, char**, mozilla::BootstrapConfig const&)+0x168 (XUL:arm64+0xd389170)
    #36 0x100881184 in main+0x6f8 (firefox:arm64+0x100001184)
    #37 0x18df1a0dc  (<unknown module>)
    #38 0xa3dfffffffffffc  (<unknown module>)

==5988==ABORTING
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.

Actual results:

.

Expected results:

.

The original report as published on Mozilla's Bugzilla, by Pwn2addr. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is known

A medium-severity memory corruption bug in Graphics: CanvasWebGL. Mozilla made it public on 25 June 2024 as CVE-2024-6600.

About Memory corruption

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

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is Memory corruption?

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

More by pwn2addr

View all

71 more disclosed reports, best first.

More from Mozilla

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.