Improve deep recursion detection in exif_data_load_data_content.
authorDan Fandrich <dan@coneharvesters.com>
Fri, 12 Oct 2018 14:01:45 +0000 (16:01 +0200)
committerDan Fandrich <dan@coneharvesters.com>
Thu, 7 Feb 2019 11:07:35 +0000 (12:07 +0100)
commit6aa11df549114ebda520dde4cdaea2f9357b2c89
treef15f936ecc368e5a46540372cd48cbb01a508ea6
parent7c82ed939af9415f3241c6401e16a69032daaa07
Improve deep recursion detection in exif_data_load_data_content.

The existing detection was still vulnerable to pathological cases
causing DoS by wasting CPU. The new algorithm takes the number of tags
into account to make it harder to abuse by cases using shallow recursion
but with a very large number of tags.  This improves on commit 5d28011c
which wasn't sufficient to counter this kind of case.

The limitation in the previous fix was discovered by Laurent Delosieres,
Secunia Research at Flexera (Secunia Advisory SA84652) and is assigned
the identifier CVE-2018-20030.
NEWS
libexif/exif-data.c