Bug 121727 - slow spellchecking area calculation make document appear to hang
Summary: slow spellchecking area calculation make document appear to hang
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.1.2.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Performance
  Show dependency treegraph
 
Reported: 2018-11-27 00:11 UTC by LFlo
Modified: 2025-09-30 16:11 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
just the textbox that causes the delay (9.06 KB, application/vnd.oasis.opendocument.text)
2018-12-06 09:05 UTC, Caolán McNamara
Details

Note You need to log in before you can comment on or make changes to this bug.
Description LFlo 2018-11-27 00:11:58 UTC
Description:
I set the marco security setting to "very high" and still the contaminated file makes LibreOffice to hang completely. I tested the file in a fresh contained VM (Fedora 29 Workstation edition) and ran all the updates.

Steps to Reproduce:
1. Setup fresh VM with Fedora 29 (don't use any production machine)
2. Open LibreOffice and set the macro security setting to "very high"
3. Open the contaminated file.

Actual Results:
LibreOffice says that the document contains macros but macros are disabled. After I click on ok, LibreOffice hangs immediately...

Expected Results:
LibreOffice shouldn't hang, because no macro is executed.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 LFlo 2018-12-03 00:54:43 UTC Comment hidden (no-value)
Comment 2 LFlo 2018-12-03 00:56:48 UTC
Can I get at least a security email address where I can send the malware to? I don't want it to be available in the public bugtracker...
Comment 3 Xavier Van Wijmeersch 2018-12-03 07:43:48 UTC
First try to reset your userprofile and test it again

Wish OS
Comment 4 Telesto 2018-12-03 09:12:27 UTC Comment hidden (obsolete)
Comment 5 Buovjaga 2018-12-03 12:33:52 UTC Comment hidden (obsolete)
Comment 6 LFlo 2018-12-03 20:34:27 UTC
(In reply to Buovjaga from comment #5)
> (In reply to LFlo from comment #2)
> > Can I get at least a security email address where I can send the malware to?
> > I don't want it to be available in the public bugtracker...
> 
> security@documentfoundation.org

Thanks a lot! I just sent the document.
Comment 7 Caolán McNamara 2018-12-03 21:26:17 UTC
no macro is executed, the layout of a line of text is looping. so its not a virus or a macro, just a hang. Its looping in laying out a line of text, seemingly unable to find a place to line break it on first glance. We don't treat such denial of service issues, (hangs and such), as high priority security issues requiring special handling, but your reporting of it through this channel is commendable. You can attach your test case to the bug in the clear.
Comment 8 Caolán McNamara 2018-12-03 21:37:10 UTC
its the spell checking, or the calculation of the area of text that is misspelled, that is hanging. So if you uncheck "automatic spell checking" in the tools menu before attempting to open it, it will then open without a hang.
Comment 9 Caolán McNamara 2018-12-04 11:29:14 UTC
The area calculation does eventually complete so its not a true hang, just very slow. The good news is that while in 6.1 it takes (for me) about 21 seconds, in 6.2 it now takes about 3. So arguably this might be considered fixed in 6.2 if we consider that an acceptable delay.

caolanm->vmiklos; I imagine that's your sallayout cache in action in the time reduction.
Comment 10 Xisco Faulí 2018-12-05 16:25:03 UTC
@Caolán, Since this is not a security issue, could it be possible to attach the document ?
Comment 11 Caolán McNamara 2018-12-05 16:45:32 UTC
LFlo sent the doc in private to the security list so I can't assume permission to attach their document in the clear here although I can confirm its safe for them to do so and hopefully they will
Comment 12 Xisco Faulí 2018-12-05 16:54:14 UTC
(In reply to Caolán McNamara from comment #11)
> LFlo sent the doc in private to the security list so I can't assume
> permission to attach their document in the clear here although I can confirm
> its safe for them to do so and hopefully they will

Oh, you're right!

@LFlo, Please attach a sample document, as this makes it easier for us to verify the bug. 
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)

I have set the bug's status to 'NEEDINFO'. Please change it back to 'NEW' once the requested document is provided.
Comment 13 LFlo 2018-12-06 00:36:39 UTC
Hey sorry for the late response. Actually this isn't a test case I made up, it was actual malware we got on our E-Mail account. I saved the file in order to test if the malware can also attack libre office. As far as I know the file *does* contain macros which can hurt windows environment, at least libre office warned me of macros before opening the file. Also the anti-virus of the Windows system in our office detected it as malware. That's why I wasn't sure if I can actually upload the file since I don't want to provide a "free" way to hurt any Windows System with MS Office although Libre office + Linux seem to be immune against.
@Caolán McNamara: Can you confirm again that the file does not contain any macros which can be malicious for Libre Office and MS Office? Is there a way to get rid of the macros?

Thanks again for the investigation of the file!
Comment 14 Caolán McNamara 2018-12-06 09:05:10 UTC
Created attachment 147311 [details]
just the textbox that causes the delay

I'll take that as permission to upload the content, so here's just the bit that matters to us
Comment 15 QA Administrators 2019-12-07 03:42:20 UTC Comment hidden (obsolete)
Comment 16 QA Administrators 2021-12-07 04:56:30 UTC Comment hidden (obsolete)
Comment 17 QA Administrators 2024-12-29 03:13:28 UTC Comment hidden (obsolete)
Comment 18 Noel Grandin 2025-09-30 13:32:53 UTC
On current master, there is no spellcheck visible on the startup profile at all, marking as fixed