Current IcedTea-Web versions are affected by GIFAR issue. It is possible to combine GIF image with Java JAR into a single file, that is both valid GIF as well as valid JAR/ZIP file. This issue can be used to execute Java applet in the context of the site that allows untrusted users to upload images in GIF format. This problem was previously fixed in Oracle and IBM Java plugins as CVE-2008-5343 (bug 474790). References: http://en.wikipedia.org/wiki/Gifar http://xs-sniper.com/blog/2008/12/17/sun-fixes-gifars/ http://riosec.com/how-to-create-a-gifar
Created attachment 659469 [details] proposed patch This patch is fixing the issue. Troubles will come when not just zip jars will be used (and so jar header will change) - eg pack2000 in jdk8. Otherwise it was quite tested and looks ok.
Created attachment 663002 [details] Suggested reproducer for icedtea-web automated testsuite
Created attachment 663003 [details] Reviwed final patch
Acknowledgements: This issue was discovered by the Red Hat Security Response Team.
Fixed now in upstream IcedTea-Web versions 1.2.3 and 1.3.2: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2013-April/022790.html Upstream commit: http://icedtea.classpath.org/hg/release/icedtea-web-1.3/rev/19f5282f53e8 Follow-up changelog fixing related commits: http://icedtea.classpath.org/hg/release/icedtea-web-1.3/rev/ccc249a27004 http://icedtea.classpath.org/hg/release/icedtea-web-1.3/rev/c8544250d5b2
This issue has been addressed in following products: Red Hat Enterprise Linux 6 Via RHSA-2013:0753 https://rhn.redhat.com/errata/RHSA-2013-0753.html