Template:WcagCheck and Ghostscript-CVE-2023-36664 - How to fix: Difference between pages

(Difference between pages)
No edit summary
Tag: 2017 source edit
 
No edit summary
Tag: 2017 source edit
 
Line 1: Line 1:
<noinclude>Template is included in Template:BSExtensionInfo and Template:BSExtensionInfobox to check all extensions for accessibility.</noinclude><templatestyles src="WcagCheck/styles.css" /><includeonly>{{#if: {{{wcagStatus|}}}|
{{Featurepage|featured=true|featuredesc=Ghostscript-CVE-2023-36664 - How to fix|featurestart=07/28/2023}}
<div id="wcaginfo">
==Overview==
==Accessibility==
This page is related to the [[Security:Security Advisories/BSSA-2023-01|BSSA-2023-01 Security Advisory]].
{{{!}} class="wikitable" {{!}}
 
!Test status:
Older versions of Ghostscript open a way for script infusion.
{{!}}[[wcagStatus::{{{wcagStatus|}}}]]
 
{{!}}-
Because of bugs in the Ghostscript binary out of the BlueSpice package manager, Hallo Welt! mostly installed manually on Linux systems. These bugs no longer seem to be a problem.
!Checked for:
==How to update  - Linux==
{{!}}{{#arraymap:{{{wcagCheckedfor|}}}|,|@@@|[[wcagCheckedfor::@@@]]}}
 
{{!}}-
# '''Check '''the system for manual installation and delete it:<syntaxhighlight lang="bash">ls -al /usr/local/bin</syntaxhighlight>If there is a binary called<syntaxhighlight lang="bash">gs</syntaxhighlight>delete it:<syntaxhighlight lang="bash">
!Last test date:
rm -fr /usr/local/bin/gs</syntaxhighlight>
{{!}}[[wcagTestdate::{{{wcagTestdate|}}}]]
#'''Check''' the system for an installation out of the package manager (Ghostscript comes as a dependency of ImageMagik):<syntaxhighlight lang="bash">
{{!}}-
dpkg -l ghostscript
!WCAG level
</syntaxhighlight>for Debian 11 this should look like:<syntaxhighlight lang="bash">
{{!}}[[wcagLevel::{{{wcagLevel|}}}]]
root@XXXXXXXXXXXX:~# dpkg -l ghostscript
{{!}}-
Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
!WCAG support:
| Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
{{!}} class="{{#switch:{{{wcagSupport}}}|supports=supports|partially supports=partiallysupports|does not support=notsupports|}}" {{!}}[[wcagSupport::{{{wcagSupport|}}}]] {{#ifeq: {{{wcagSupport}}}|partially supports|<span> (workaround: [[wcagWorkaround::{{{wcagWorkaround|}}}]])</span>|#ifeq: {{{wcagSupport}}}|does not support|<span> (workaround: [[wcagWorkaround::{{{wcagWorkaround|}}}]])</span>}}
        Halb installiert/Trigger erWartet/Trigger anhängig
{{#if: {{{wcagComments|}}}|
|/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
{{!}}-
||/ Name          Version              Architektur  Beschreibung
!Comments:
+++-==============-=====================-============-===================================================
{{!}}{{{wcagComments|}}}|}}
ii  ghostscript    9.53.3~dfsg-7+deb11u5 amd64        interpreter for the PostScript language and for PDF
{{!}}-
 
!Extension type:
</syntaxhighlight>For Debian 12 the Version is "10.0.0~dfsg-11+deb12u1"<br>For Ubuntu 22 the Version is "9.50~dfsg-5ubuntu4.8"<br><br>If it does not match the needed Version please do an:<syntaxhighlight lang="bash">
{{!}}[[extensionType::{{{extensionType|}}}]]
apt update
{{!}}-
apt upgrade -y
!Extension focus:
</syntaxhighlight>and recheck.<br />
{{!}}[[extensionFocus::{{{extensionFocus|}}}]]
#'''Change''' the settings in the codebase.  <br /><br>Go to the directory where the codebase is saved (check your ApacheConfiguration for''DocumentRoot'' if you are not sure). Normally it should look like this:<syntaxhighlight lang="bash">
{{!}}}
root@XXXXX:/var/www/bluespice/w/settings.d# grep -rin PdfProcessor
<div>|}}</includeonly>
005-PdfHandler.php:5:$wgPdfProcessor = '/usr/local/bin/gs';
</syntaxhighlight>It could be <code>005-PdfHandler.php</code> or some other configuration file.<br />
#'''Find'''  '''and change''' the variable to the correct path, for example with this command:<syntaxhighlight lang="bash">
sed -i 's/local\///g' 005-PdfHandler.php
</syntaxhighlight>Double-check:<syntaxhighlight lang="bash">
root@XXXXXXXXXXX:/var/www/bluespice/w/settings.d# grep -rin PdfProcessor
005-PdfHandler.php:5:$wgPdfProcessor = '/usr/bin/gs';
 
</syntaxhighlight>
 
Your system is now patched.
 
==How to update  - Windows==
 
#'''Deinstall''' the package ''GPL Ghostscript''.
#'''Download''' the package ''Ghostscript AGPL Release'' from https://www.ghostscript.com/releases/gsdnld.html .
#'''Install''' the new package.
 
Your system is now patched.
 
__FORCETOC__

Revision as of 10:03, 28 July 2023

Overview

This page is related to the BSSA-2023-01 Security Advisory.

Older versions of Ghostscript open a way for script infusion.

Because of bugs in the Ghostscript binary out of the BlueSpice package manager, Hallo Welt! mostly installed manually on Linux systems. These bugs no longer seem to be a problem.

How to update - Linux

  1. Check the system for manual installation and delete it:
    ls -al /usr/local/bin
    
    If there is a binary called
    gs
    
    delete it:
    rm -fr /usr/local/bin/gs
    
  2. Check the system for an installation out of the package manager (Ghostscript comes as a dependency of ImageMagik):
    dpkg -l ghostscript
    
    for Debian 11 this should look like:
    root@XXXXXXXXXXXX:~# dpkg -l ghostscript
    Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
    | Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
             Halb installiert/Trigger erWartet/Trigger anhängig
    |/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
    ||/ Name           Version               Architektur  Beschreibung
    +++-==============-=====================-============-===================================================
    ii  ghostscript    9.53.3~dfsg-7+deb11u5 amd64        interpreter for the PostScript language and for PDF
    
    For Debian 12 the Version is "10.0.0~dfsg-11+deb12u1"
    For Ubuntu 22 the Version is "9.50~dfsg-5ubuntu4.8"

    If it does not match the needed Version please do an:
    apt update
    apt upgrade -y
    
    and recheck.
  3. Change the settings in the codebase.

    Go to the directory where the codebase is saved (check your ApacheConfiguration forDocumentRoot if you are not sure). Normally it should look like this:
    root@XXXXX:/var/www/bluespice/w/settings.d# grep -rin PdfProcessor
    005-PdfHandler.php:5:$wgPdfProcessor = '/usr/local/bin/gs';
    
    It could be 005-PdfHandler.php or some other configuration file.
  4. Find and change the variable to the correct path, for example with this command:
    sed -i 's/local\///g' 005-PdfHandler.php
    
    Double-check:
    root@XXXXXXXXXXX:/var/www/bluespice/w/settings.d# grep -rin PdfProcessor
    005-PdfHandler.php:5:$wgPdfProcessor = '/usr/bin/gs';
    

Your system is now patched.

How to update - Windows

  1. Deinstall the package GPL Ghostscript.
  2. Download the package Ghostscript AGPL Release from https://www.ghostscript.com/releases/gsdnld.html .
  3. Install the new package.

Your system is now patched.


No categories assignedEdit

Discussions