Buffer overflow in svg transformation reading

Bug #1047524 reported by Ralf Engels
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
Unassigned

Bug Description

While reviewing the svg reading code I found a problem in svg-affine.cpp

When reading the arguments of a transformation a buffer with 6 values is used but later on an unlimited amount of matrix arguments can be read.

The other buffer used in this function seems to be protected sufficiently.

The attached patch solves the problem.

Revision history for this message
Ralf Engels (ralf-engels) wrote :
jazzynico (jazzynico)
tags: added: code-design
Revision history for this message
jazzynico (jazzynico) wrote :

Apparently the args count is done later in the code, line 78:
--
if (n_args == sizeof (args) / sizeof (args[0])) return false; /* Too many args */
--

It's a bit weird, and protecting the code in the loop seems to be safer indeed.

Changed in inkscape:
importance: Undecided → Low
Revision history for this message
Martin Owens (doctormo) wrote :

Closing because patch applied to master on GitLab.

Closed by: https://gitlab.com/doctormo

tags: added: bug-migration
Changed in inkscape:
status: New → Fix Released
Martin Owens (doctormo)
information type: Private Security → Public
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.