Summary: | NULL pointer dereference in html-layout.c in Latest version | ||
---|---|---|---|
Product: | MuPDF | Reporter: | Ishayu <ishayupotey> |
Component: | epub | Assignee: | MuPDF bugs <mupdf-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | robin.watts, sebastian.rasmussen |
Priority: | P2 | ||
Version: | master | ||
Hardware: | PC | ||
OS: | All | ||
Customer: | Word Size: | --- |
Description
Ishayu
2025-08-04 19:08:01 UTC
Any update on this even like confirmation of presence of bug on your side and any more information which you might need from side ? Fixed in: commit bdd5d241748807378a78a622388e0312332513c5 Author: Robin Watts <Robin.Watts@artifex.com> Date: Fri Sep 5 16:26:44 2025 +0100 Bug 708720: Fix NULL dereference in HTML layout. If we have a single flow node that is too large to fit in the available width, and we are using the "overflow-wrap:break-word" CSS style, then we attempt to break the flow node into smaller pieces so that it can wrap nicely. We do this by walking the flow node text to break it into clusters; we want to break at cluster level rather than character level to avoid problems with shaping. For right to left text, the clusters come in the opposite order to expected and the existing logic goes wrong. This can lead to the splitting code not actually splitting anything which in turn can lead to node->next being NULL, and us attempting to dereference NULL. The fix is to split differently for right 2 left text. While investigating this, an additional problem was spotted, namely that the way we were calling harfbuzz meant that it didn't group clusters together as we expected. Accordingly, we extend the code here so that our 'string_walker' can call harfbuzz in 'grapheme' cluster mode rather than 'character' cluster node. Using that, we then update the code to walk the returned fragments of the string, breaking the code at the correct position for the required space, with care taken to cope correctly with both l2r and r2l text. Thanks for the report. I would like to inquire if this issue is eligible for a bug bounty under your program. https://artifex.com/developers-bug-bounty-program#2f4730dcc0c9 Additionally, could you help me assign a CVE for this vulnerability so it can be referenced in security advisories https://mupdf.com/releases/cve Thank You |