Bug 158358 - DoS + Bad crash when killing Python macro
Summary: DoS + Bad crash when killing Python macro
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.6.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-24 14:52 UTC by LOO Debugger
Modified: 2023-11-25 07:24 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description LOO Debugger 2023-11-24 14:52:49 UTC
Hello

I'm trying to learn how to create a macro in LibreOffice (7.6.3.2 60(Build:2)) under Linux.

I hit "run" on a Python macro that was calling an external software using "subprocess.check_output". This external tools never ended. So I killed LOo with xkill.

Now, every time I hit the Tools>Macro>Run or Tools>Macro>Organize>Python LOo crashes.

I've tried killing/restarting LOo multiple times, I get the same result. I tried killing any remaining all the processes I could find related to LOo or Python, with no luck... The only thing I didn't try is restart the computer, because I can't do it for the moment (important stuff runnning).

The error message when running LOo from CLI is:
""
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
""

So there might be bad (exploitable?) stuff happening here :( At least, it's a complete DoS for all Macros...
Comment 1 m_a_riosv 2023-11-25 03:45:42 UTC
Please, can you put your question in:
https://ask.libreoffice.org/c/english/5
There are people with a great acknowledge on python macros.
Comment 2 Werner Tietz 2023-11-25 07:24:37 UTC
Hallo

For now you should rename (backup) your user-profile and start soffice with a new user-profile from scratch. 

For the future:
dont execute **long running independent things** via »subprocess.check_output(…)
use »subprocess.Popen(…)« instead!