chiark / gitweb /
update: strip EXIF data from all JPEGs
authorHans-Christoph Steiner <hans@eds.org>
Wed, 13 Dec 2017 10:57:36 +0000 (11:57 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Thu, 14 Dec 2017 15:57:22 +0000 (16:57 +0100)
commit67b9514c5a830159e6cc39a6ba180cb2774635b9
tree6e5525d98801a1ec5a117865024cb16b64808296
parentbde0558d82eb68c39d6c95eb80ed9c2eddea6ae6
update: strip EXIF data from all JPEGs

EXIF data can be abused to exploit systems a lot easier than the JPEG image
data can.  The F-Droid ecosystem does not use the EXIF data, so keep things
safe and strip it all away.  There is a chance that some images might rely
on the rotation to be set by EXIF, but I think having a safe system is more
important.

If needed, only the rotation data could be saved.  But that then makes it
hard to tell which images have been stripped.  This way, if there is no
EXIF, it has been stripped.  And if there is EXIF data, then it is suspect.

https://securityaffairs.co/wordpress/51043/mobile-2/android-cve-2016-3862-flaw.html
https://threatpost.com/google-shuts-down-potentially-massive-android-bug/120393/
https://blog.sucuri.net/2013/07/malware-hidden-inside-jpg-exif-headers.html

The big downside of this is that it decompresses and recompresses the
image data.  That should be replaced by a technique from jhead,
exiftool, ObscuraCam, etc. that only strips the metadata.
fdroidserver/update.py