Ghostscript肆意文件读写缝隙安全公告
颁布功夫 2018-10-11缝隙编号和级别
CVE编号:CVE-2018-17961,危险级别:高危,CVSS分值:官方未评定
影响版本
Ghostscript version <= 9.26
缝隙概述
Ghostscript是Adobe PostScript和PDF的诠释说话,好多图片处置库均有引用,常见的有 ImageMagick、Python-Matplotlib、Latex2html等。
缝隙导致所有引用ghostscript的上游利用受到影响。 常见利用如下:
Imagemagick、libmagick、graphicsmagick、gimp、python-matplotlib、texlive-core、texmacs、latex2html、latex2rtf等
缝隙验证
官方对.forceput的使用介绍,可能强造更新dict中的值。这次的缝隙重要原因也就是在触发谬误的时辰由于机关出.forceput留存在栈中,而后被注册成号令forceput进而对systemdict进行批改。最终达到bypass safer以及开启文件读写权限等操作。
ImageMagick 7.0.8-12 测试:
建复建议
http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=a54c9e61e7d
http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=a6807394bd94
无法更新的可通过批改policy.xml禁用PS, EPS, PDF and XPS coders(会造成有关职能不成使用)
如:批改ImageMagick的policy文件,默认地位为/etc/ImageMagick-7/policy.xml
增长如下内容:
<policymap>
<policydomain="coder" rights="none" pattern="PS" />
<policydomain="coder" rights="none" pattern="EPS" />
<policydomain="coder" rights="none" pattern="PDF" />
<policydomain="coder" rights="none" pattern="XPS" />
</policymap>
若是不必要使用GhostScript,可卸载。
参考链接


京公网安备11010802024551号