Closed Bug 1657573 Opened 5 years ago Closed 5 years ago

Change libhunspell's file access code that loads dictionaries to use function pointers

Categories

(Core :: Spelling checker, enhancement, P3)

x86_64
Unspecified
enhancement

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: shravanrn, Assigned: shravanrn)

References

Details

Attachments

(1 file, 1 obsolete file)

Hunspell is the spelling checking library used in Firefox. Hunspell loads dictionaries from the file system. Currently this file system operations are applied via a in-tree patch to hunspell which makes direct calls to NS_* apis to open and read files from URIs.

Hunspell is to be sandboxed using RLBox. See Bug 1653659. In preparation for this, all NS_* calls for file access should be exposed via callbacks.

Attachment #9168426 - Attachment is obsolete: true
Pushed by dluca@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/28fe4f755717 Change libhunspell's file access code to use function pointers r=froydnj

Only skimmed the patch, but doesn't this [1] blindly trust the filename from the sandbox? Wouldn't it be better for the filename to be managed entirely by the code outside the sandbox?

[1] https://hg.mozilla.org/integration/autoland/rev/28fe4f755717#l4.82

Flags: needinfo?(shravanrn)
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch

@bholley : yup! That will be addressed in a separate patch. This patch simply makes some refactoring changes that makes the library easier to RLBox (namely separating the file access bits from the rest of hunspell). In the subsequent patches, (which are 70% complete) when we use the RLBox api, we will automatically be required to use file paths only from a trusted source.

Flags: needinfo?(shravanrn)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: