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

 
 

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

Submitter:  Giampaolo Bellini <iw2lsi>
Submitted:  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
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

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 Administrator
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 Administrator
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)

- <_81535>
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 _81535 (9KiB - application/octet-stream)
file #22534:  R14-LT98-LT97.out added by _81535 (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 _81535 (Updated the item)
  • -email is unavailable- added by iw2lsi (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-06-08 reini_urban Open/ClosedOpen Closed
    2018-05-01 reini_urban StatusIn Progress Works For Me
    2018-04-25 reini_urban StatusNone In Progress
        Assigned toNone reini_urban
    2011-01-27 _81535 Attached File- Added R2007.out, #22535
    2011-01-27 _81535 Attached File- Added R14-LT98-LT97.out, #22534
    2010-12-14 iw2lsi Attached File- Added sign01.dwg, #22198

    Back to the top


    Powered by Savane 3.9