AddressSanitizer: ILL on unknown address 0x73711f3ab2bd [@ _cairo_pdf_surface_emit_image]
Categories
(Core :: Graphics: Canvas2D, defect, P3)
Tracking
()
People
(Reporter: jkratzer, Assigned: aleiserson, NeedInfo)
References
(Blocks 1 open bug)
Details
(Keywords: sec-high, testcase, Whiteboard: [bugmon:bisected,confirmed][pp3][adv-main150.0.2+r][adv-esr140.10.2+r][adv-esr115.35.2+r])
Attachments
(1 file, 5 external files)
|
2.56 KB,
text/html
|
Details |
Testcase found while fuzzing mozilla-central rev 086d14f42154 (built with: --enable-address-sanitizer --enable-fuzzing).
Testcase can be reproduced using the following commands:
$ pip install fuzzfetch grizzly-framework pipx --upgrade
$ python -m pipx ensurepath
$ fuzzfetch --build 086d14f42154 --asan --fuzzing -n firefox
$ grizzly-replay-bugzilla ./firefox/firefox <bugid>
AddressSanitizer: ILL on unknown address 0x73711f3ab2bd [@ _cairo_pdf_surface_emit_image]
=================================================================
==2698814==ERROR: AddressSanitizer: ILL on unknown address 0x73711f3ab2bd (pc 0x73711f3ab2bd bp 0x7ffdbdaec7f0 sp 0x7ffdbdaec6c0 T0)
#0 0x73711f3ab2bd in _cairo_pdf_surface_emit_image /gfx/cairo/cairo/src/cairo-pdf-surface.c:3322:17
#1 0x73711f3a13f9 in _cairo_pdf_surface_emit_surface /gfx/cairo/cairo/src/cairo-pdf-surface.c:4083:11
#2 0x73711f39eb96 in _cairo_pdf_surface_write_patterns_and_smask_groups /gfx/cairo/cairo/src/cairo-pdf-surface.c:7757:15
#3 0x73711f395be0 in _cairo_pdf_surface_write_page /gfx/cairo/cairo/src/cairo-pdf-surface.c:7858:14
#4 0x73711f395be0 in _cairo_pdf_surface_show_page /gfx/cairo/cairo/src/cairo-pdf-surface.c:5673:14
#5 0x73711f4bf188 in _moz_cairo_surface_show_page /gfx/cairo/cairo/src/cairo-surface.c:2582:40
#6 0x73711f4653ac in _cairo_paginated_surface_show_page /gfx/cairo/cairo/src/cairo-paginated-surface.c:605:5
#7 0x73711f4bf188 in _moz_cairo_surface_show_page /gfx/cairo/cairo/src/cairo-surface.c:2582:40
#8 0x7371206af019 in mozilla::gfx::PrintTargetPDF::EndPage() /gfx/thebes/PrintTargetPDF.cpp:100:3
#9 0x73711f7fe4db in nsDeviceContext::EndPage() /gfx/src/nsDeviceContext.cpp:350:5
#10 0x73712987c110 in mozilla::layout::RemotePrintJobParent::PrintPage(mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits> const&, mozilla::layout::PRFileDescStream&, nsRefCountedHashtable<nsIntegralHashKey<unsigned long, 0>, RefPtr<mozilla::gfx::RecordedDependentSurface>>*) /layout/printing/ipc/RemotePrintJobParent.cpp:211:29
#11 0x73712987bc61 in mozilla::layout::RemotePrintJobParent::FinishProcessingPage(mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits> const&, nsRefCountedHashtable<nsIntegralHashKey<unsigned long, 0>, RefPtr<mozilla::gfx::RecordedDependentSurface>>*) /layout/printing/ipc/RemotePrintJobParent.cpp:184:17
#12 0x73712987b92a in mozilla::layout::RemotePrintJobParent::RecvProcessPage(int const&, int const&, nsTArray<unsigned long>&&) /layout/printing/ipc/RemotePrintJobParent.cpp:154:5
#13 0x737128d76e51 in mozilla::layout::PRemotePrintJobParent::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/obj-build/ipc/ipdl/PRemotePrintJobParent.cpp:391:52
#14 0x737127ba1db0 in mozilla::dom::PContentParent::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/obj-build/ipc/ipdl/PContentParent.cpp:6540:32
#15 0x73711eac5cd5 in mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) /ipc/glue/MessageChannel.cpp:1798:25
#16 0x73711eac21ce in mozilla::ipc::MessageChannel::DispatchMessage(mozilla::ipc::ActorLifecycleProxy*, std::unique_ptr<IPC::Message, std::default_delete<IPC::Message>>) /ipc/glue/MessageChannel.cpp:1724:9
#17 0x73711eac2fe7 in mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::ActorLifecycleProxy*, mozilla::ipc::MessageChannel::MessageTask&) /ipc/glue/MessageChannel.cpp:1513:3
#18 0x73711eac4503 in mozilla::ipc::MessageChannel::MessageTask::Run() /ipc/glue/MessageChannel.cpp:1615:14
#19 0x73711d3e059a in mozilla::RunnableTask::Run() /xpcom/threads/TaskController.cpp:719:16
#20 0x73711d3d5771 in mozilla::TaskController::RunTask(mozilla::Task*) /xpcom/threads/TaskController.cpp:210:19
#21 0x73711d3dca6d in mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /xpcom/threads/TaskController.cpp:1358:20
#22 0x73711d3da548 in mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /xpcom/threads/TaskController.cpp:1181:15
#23 0x73711d3dab66 in mozilla::TaskController::ProcessPendingMTTask(bool) /xpcom/threads/TaskController.cpp:655:36
#24 0x73711d3f3a31 in operator() /xpcom/threads/TaskController.cpp:347:37
#25 0x73711d3f3a31 in mozilla::detail::RunnableFunction<mozilla::TaskController::TaskController()::$_0>::Run() /xpcom/threads/nsThreadUtils.h:547:5
#26 0x73711d41720c in nsThread::ProcessNextEvent(bool, bool*) /xpcom/threads/nsThread.cpp:1179:16
#27 0x73711d420359 in NS_ProcessNextEvent(nsIThread*, bool) /xpcom/threads/nsThreadUtils.cpp:465:10
#28 0x73711eacf42e in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /ipc/glue/MessagePump.cpp:83:21
#29 0x73711e9ad8f4 in RunInternal /ipc/chromium/src/base/message_loop.cc:371:10
#30 0x73711e9ad8f4 in RunHandler /ipc/chromium/src/base/message_loop.cc:364:3
#31 0x73711e9ad8f4 in MessageLoop::Run() /ipc/chromium/src/base/message_loop.cc:346:3
#32 0x73712878cee6 in nsBaseAppShell::Run() /widget/nsBaseAppShell.cpp:151:27
#33 0x73712897401b in nsAppShell::Run() /widget/gtk/nsAppShell.cpp:553:33
#34 0x73712a79b5a5 in nsAppStartup::Run() /toolkit/components/startup/nsAppStartup.cpp:290:30
#35 0x73712aa1c790 in XREMain::XRE_mainRun() /toolkit/xre/nsAppRunner.cpp:5940:22
#36 0x73712aa1e2c2 in XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /toolkit/xre/nsAppRunner.cpp:6195:8
#37 0x73712aa1f373 in XRE_main(int, char**, mozilla::BootstrapConfig const&) /toolkit/xre/nsAppRunner.cpp:6268:21
#38 0x577947281c3a in do_main /browser/app/nsBrowserApp.cpp:270:22
#39 0x577947281c3a in main /browser/app/nsBrowserApp.cpp:534:16
#40 0x777143e2a1c9 in __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#41 0x777143e2a28a in __libc_start_main ./csu/../csu/libc-start.c:360:3
#42 0x57794719b818 in _start ??:0:0
==2698814==Register values:
rax = 0x00000000ff404040 rbx = 0x00007ffdbdaec6c0 rcx = 0xffffffff80000001 rdx = 0x0000736ebe6eb801
rdi = 0x000074b14319c500 rsi = 0x0000000000000040 rbp = 0x00007ffdbdaec7f0 rsp = 0x00007ffdbdaec6c0
r8 = 0x000000000000425e r9 = 0x0000000000000000 r10 = 0x000073707e55b2b0 r11 = 0x0000000000ff4040
r12 = 0x0000736f3e6eb800 r13 = 0x0000000000000001 r14 = 0x0000000080000001 r15 = 0x0000000092f6c1f9
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: ILL (/home/jkratzer/builds/m-c-20260329205327-fuzzing-asan-opt/libxul.so+0x8bab2bd) (BuildId: 8c8b4e0b3fb2c2bc4be989706b3631ca395252e3)
==2698814==ABORTING
| Reporter | ||
Comment 1•7 months ago
|
||
| Reporter | ||
Updated•7 months ago
|
Comment 2•7 months ago
|
||
Verified bug as reproducible on mozilla-central 20260330213624-0b76dd137a61.
Unable to bisect testcase (Testcase reproduces on start build!):
Start: befa35dc6ab4806b8008138d38f7a053a7fd7fd3 (20250401212749)
End: 086d14f4215495401f6eafe03c8a4951ad85d368 (20260329205327)
BuildFlags: BuildFlags(asan=True, tsan=False, debug=False, fuzzing=True, coverage=False, valgrind=False, no_opt=False, fuzzilli=False, nyx=False, searchfox=False, afl=False)
Comment 3•7 months ago
|
||
Setting component to Canvas2D since Ciaro is involved.
Comment 4•7 months ago
|
||
I can't think of reasons for a reproducible SIGILL that aren't bad news.
Comment 5•7 months ago
|
||
The severity field for this bug is set to S3. However, the bug is flagged with the sec-high keyword.
:lsalzman, could you consider increasing the severity of this security bug?
For more information, please visit BugBot documentation.
Updated•7 months ago
|
| Assignee | ||
Updated•7 months ago
|
| Assignee | ||
Comment 6•7 months ago
|
||
| Assignee | ||
Comment 7•7 months ago
|
||
Comment on attachment 9565088 [details]
(secure)
Security Approval Request
- How easily could an exploit be constructed based on the patch?: Non-trivial. Claude's initial rewriting of the fuzz failure as a crash test broke it, so there's at least a little subtlety in creating a suitable image, and additional work would be required to turn the overrun into an exploit.
- Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem?: No
- Which branches (beta, release, and/or ESR) are affected by this flaw, and do the release status flags reflect this affected/unaffected state correctly?: all
- If not all supported branches, which bug introduced the flaw?: None
- Do you have backports for the affected branches?: No
- If not, how different, hard to create, and risky will they be?: Easy
- How likely is this patch to cause regressions; how much testing does it need?: Very safe
- Is the patch ready to land after security approval is given?: Yes
- Is Android affected?: Unknown
| Assignee | ||
Comment 8•7 months ago
|
||
The symptom here is a SIGILL from UBSan when an unsigned int that is indexing sequential memory access overflows. So there could be wild memory writes, but they're not well controlled.
Updated•7 months ago
|
Updated•6 months ago
|
Comment 9•6 months ago
|
||
Is this going to be submitted upstream to Cairo? Or otherwise noted as a patch in gfx/cairo for if/when we do update if we don't upstream this?
| Assignee | ||
Comment 10•6 months ago
|
||
I emailed Emmanuele Bassi last week, and he suggested filing a confidential bug in GitLab (which I did -- https://gitlab.freedesktop.org/cairo/cairo/-/work_items/939), and he also asked that we keep the issue confidential until the GNOME project had an opportunity to look at it, which is why I haven't landed the patch yet.
I believe :dholbert reached out to someone as well.
Comment 11•6 months ago
|
||
The bug is marked as tracked for firefox150 (beta) and tracked for firefox151 (nightly). However, the bug still has low priority.
:bhood, could you please increase the priority for this tracked bug? If you disagree with the tracking decision, please talk with the release managers.
For more information, please visit BugBot documentation.
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Comment 13•6 months ago
|
||
Comment 14•6 months ago
|
||
Comment 15•6 months ago
|
||
The patch landed in nightly and beta is affected.
:aleiserson, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox151towontfix.
For more information, please visit BugBot documentation.
Comment 16•6 months ago
|
||
To add to comment 15, please also add uplift requests for release, ESR140, and ESR115
Comment 17•6 months ago
|
||
Verified bug as fixed on rev mozilla-central 20260428094204-3b3446e1079b.
Removing bugmon keyword as no further action possible. Please review the bug and re-add the keyword for further analysis.
| Assignee | ||
Comment 18•6 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D292028
Updated•6 months ago
|
Comment 19•6 months ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined/Reason for urgency: Security fix
- Code covered by automated testing?: no
- Fix verified in Nightly?: yes
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing: n/a
- Risk associated with taking this patch: low
- Explanation of risk level: Just changes some math to use
unsigned longinstead ofint. - String changes made/needed?: no
- Is Android affected?: unknown
Comment 20•6 months ago
|
||
firefox-esr115 Uplift Approval Request
- User impact if declined/Reason for urgency: Security fix
- Code covered by automated testing?: no
- Fix verified in Nightly?: yes
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing: n/a
- Risk associated with taking this patch: low
- Explanation of risk level: Just changes some math to use
unsigned longinstead ofint. - String changes made/needed?: no
- Is Android affected?: unknown
| Assignee | ||
Comment 21•6 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D292028
Comment 22•6 months ago
|
||
firefox-esr140 Uplift Approval Request
- User impact if declined/Reason for urgency: Security fix
- Code covered by automated testing?: no
- Fix verified in Nightly?: yes
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing: n/a
- Risk associated with taking this patch: low
- Explanation of risk level: Just changes some math to use
unsigned longinstead ofint. - String changes made/needed?: no
- Is Android affected?: unknown
| Assignee | ||
Comment 23•6 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D292028
Comment 24•6 months ago
|
||
firefox-release Uplift Approval Request
- User impact if declined/Reason for urgency: Security fix
- Code covered by automated testing?: no
- Fix verified in Nightly?: yes
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing: n/a
- Risk associated with taking this patch: low
- Explanation of risk level: Just changes some math to use
unsigned longinstead ofint. - String changes made/needed?: no
- Is Android affected?: unknown
| Assignee | ||
Comment 25•6 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D292028
| Assignee | ||
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Comment 26•6 months ago
|
||
| uplift | ||
Updated•6 months ago
|
Updated•6 months ago
|
Comment 27•6 months ago
|
||
| uplift | ||
Updated•6 months ago
|
Updated•6 months ago
|
Comment 28•6 months ago
|
||
| uplift | ||
Updated•6 months ago
|
Updated•6 months ago
|
Comment 29•6 months ago
|
||
| 150.0.2 uplift | ||
Updated•6 months ago
|
Comment 30•6 months ago
|
||
| 140.10.2 uplift | ||
Updated•6 months ago
|
Comment 31•6 months ago
|
||
| 115.35.2 uplift | ||
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Updated•2 months ago
|
Description
•