Public bug reported:

[ Impact ]

Nautilus crashes if nautilus-python is installed and
update_file_info_full is running and the folder is being left. This
happens because of a NULL deref.

My patch checks for NULL and returns to avoid the NULL deref.

[ Test Plan ]

1. Install python3-nautilus
2. Copy test.py to ~/.local/share/nautilus-python/extensions/ 
(https://gitlab.gnome.org/-/project/1/uploads/4becd588cc4db8294e9154813e814224/test.py)
3. create an empty folder and open a terminal and run mkdir test_{1..500} to 
create a lot of empty folders in your new directory
4. kill nautilus with nautilus -q
5. restart nautilus with nautilus --no-desktop
6. navigate to your folder
7. immediately go back to the parent folder, i.e. press alt+arrow-key-up
8. repeat folder navigation multiple times

Nautilus should not crash.

[ Where problems could occur ]

Since the extension functions return now prematurely, some of the code
paths are no longer being executed, i.e. a g_object_unref or
finish_info_provider. This might lead to a memory leak or undefined
extension behavior.

Instead of crashing nautilus will output an error message.

[ Other Info ]

Upstream MR: https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/1662
Upstream issue: https://gitlab.gnome.org/GNOME/nautilus/-/issues/3505

Since nautilus-python is not preinstalled and an extension which calls
the async method is required, this crash and this patch does not affect
a Ubuntu standard installation and therefore most of the Ubuntu users.

Nonetheless I think this crash especially affects developers who use
Ubuntu and a tool like turtle
(https://gitlab.gnome.org/philippun1/turtle), which uses the nautilus
python extension to calculate git status emblems.

** Affects: nautilus (Ubuntu)
     Importance: Undecided
         Status: New

** Merge proposal linked:
   
https://code.launchpad.net/~philippun/ubuntu/+source/nautilus/+git/nautilus/+merge/479248

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to nautilus in Ubuntu.
https://bugs.launchpad.net/bugs/2095129

Title:
  Nautilus crashes when update_file_info_full is running and the folder
  is being left

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/2095129/+subscriptions


-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to