@Seb - so there is an autorun.inf in the original tarball which can be
used (I will attach it separately here as well) - and this reproduces
the crash for me - I just copied it to a FAT formatted USB drive,
plugged it in and then in dmesg:

[   40.361136] gvfs-udisks2-vo[1563]: segfault at 7f3c60a485e0 ip 
00007f3c6099ef86 sp 00007ffe34884e10 error 4 in 
libpcre.so.3.13.3[7f3c60983000+70000]
[   51.023933] gvfs-udisks2-vo[1805]: segfault at 7fb5ef2205e0 ip 
00007fb5ef176f86 sp 00007fff3e059160 error 4 in 
libpcre.so.3.13.3[7fb5ef15b000+70000]

And eventually apport popped up as well (gvfs-udisks2-volume-monitor
crashed with SIGSEGV in pcre_exec()).


** Attachment added: "autorun.inf"
   
https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1798725/+attachment/5212446/+files/autorun.inf

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

Title:
  gvfs may crash when parsing non-valid UTF8 in autorun.inf

Status in gvfs package in Ubuntu:
  Fix Committed

Bug description:
  * Impact

  gvfs can be made to segfault by being provided an invalid autorun.inf

  * Test Case

  Use the proof of concept from bellow to generate an invalid
  autorun.inf and place it on an usb drive, connect the drive to the
  computer, gvfs shouldn't hit a segfault

  * Regression potential

  Check that the autorun feature keeps working

  -----------------------

  Reported upstream at https://bugs.exim.org/show_bug.cgi?id=2330 -
  libpcre3 can be made to crash when matching the pattern \s*= when the
  context is n\xff=

  Able to reproduce on current Bionic using the PoC attached (which is
  copied directly from the upstream bug report) - in a fresh Bionic VM:

  $ sudo apt install build-essential libgtk2.0-dev
  $ cd PCRE_PoC
  $ ./compilePoC.sh
  $ ./PoC
  Content:
  -------------------
  n�=
  -------------------
  Pattern:
  -------------------
  \s*=
  ---------------------
  Segmentation fault (core dumped)

  Haven't yet tested the second PoC via an external disk autorun.inf and
  gvfs-udisks2-volume-monitor.

  Also haven't tested in Cosmic / older releases

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

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to