bugLibreDWG - Bugs: bug #31867, opening a file with an unsupported...

 
 

bug #31867: opening a file with an unsupported dwg revision could cause a segfault

Submitted by:  Giampaolo Bellini <iw2lsi>
Submitted on:  Mon 13 Dec 2010 09:51:23 PM UTC  
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Works For Me
Privacy:  Public Assigned to:  Reini Urban <reini_urban>
Open/Closed:  Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 01 May 2018 04:38:35 PM UTC, comment #3:

Released versions, i.e. from a tar ball or package will now abort on unsupported DWG versions, only with a development version from .git
unsupported DWG versions will be tried to be decoded, and might eventually crash.

Reini Urban <reini_urban>
Project AdministratorIn charge of this item.
Wed 25 Apr 2018 01:36:39 PM UTC, comment #2:

Yes, we know. This is only an example, not a proper program yet.

Released libredwg packages will abort to scan unsupported versions.
Development versions will try to scan it nevertheless, even if will eventually fail or crash.

Reini Urban <reini_urban>
Project AdministratorIn charge of this item.
Thu 27 Jan 2011 04:32:39 PM UTC, comment #1:

I can verify this bug.

My test file (at https://pi-xi.net/share/libredwg/AutoCAD_Architecture_2011_Student_Version_R2010_Test_1.dwg) contains one polyline and two annotative dimensions (seen here: https://pi-xi.net/share/libredwg/AutoCAD_Architecture_2011_Student_Version_R2010_Test_1.png)

Running

./testSVG AutoCAD_Architecture_2011_Student_Version_R2010_Test_1.dwg > test1.svg

causes a segfault. There is no stderr output whatsoever (exported LIBREDWG_TRACE=3). Trying it on the example.dwg works fine

I also noticed that just running ./testSVG foobar (when foobar is a nonexisting or existing file) causes a segfault except when using with the libredwg example DWGs.

I tried out an empty R2007 file (at https://pi-xi.net/share/libredwg/AutoCAD_Architecture_2011_Student_Version_R2007-LT2007.dwg), it produced also a segfault but also stderr output which I have attached here (R2007.out). I did the same with R2004 and R14 exported DWG files (empty as well). R2004 produced a segfault as well but no stderr output, R14 exported correctly.

I am running it on Fedora 14 x86_64 compiled from a snapshot (27.01.2011). I have created all the DWGs with Autodesk AutoCAD Architecture 2011 Student version available from http://students.autodesk.com/. It is an exact replica of the full retail version except for the licensing which has to be renewed every year.

(file #22534, file #22535)

Otso Helenius <piksi>
Mon 13 Dec 2010 09:51:23 PM UTC, original submission:

opening a file with a bad dwg contents or with an unsupported dwg revision could cause a segfault.

be able to retrieve the dwg revision before load/parse the entire file could be a first stage in order to reduce the probability of a segfault of an application (when caused by unsupported dwg revision)

Giampaolo Bellini <iw2lsi>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #22535:  R2007.out added by piksi (9KiB - application/octet-stream)
file #22534:  R14-LT98-LT97.out added by piksi (2KiB - application/octet-stream)
file #22198:  sign01.dwg added by iw2lsi (21KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by reini_urban (Posted a comment)
  • -email is unavailable- added by piksi (Updated the item)
  • -email is unavailable- added by iw2lsi (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    Tue 01 May 2018 04:38:35 PM UTC reini_urban StatusIn Progress => Works For Me
    Wed 25 Apr 2018 01:36:39 PM UTC reini_urban StatusNone => In Progress
        Assigned toNone => reini_urban
    Thu 27 Jan 2011 04:32:39 PM UTC piksi Attached File- => Added R2007.out, #22535
    Thu 27 Jan 2011 04:32:38 PM UTC piksi Attached File- => Added R14-LT98-LT97.out, #22534
    Tue 14 Dec 2010 07:46:55 AM UTC iw2lsi Attached File- => Added sign01.dwg, #22198

    Back to the top


    Powered by Savane 3.3