Page MenuHomePhabricator

Securing external binaries run by MediaWiki
Closed, DeclinedPublic

Description

MediaWiki can run various external binaries for varying reasons, some, but not all of these are secured in firejails/similar

We should audit these, and move to securing them all as appropriate

binarysecured?task
ffmpegnoT172298
texvc, texvcchecknoT172583
lilypond, abc2ly, timidityyesT172582
ghostcriptyesT147041 T164000
ddjvu, djvudumpnoT182743
tiffinfono
identifyno
exiv2no
pdfinfo, pdftotextnoT182746
vipsyesT182747
pygmentsyesT182468

Related Objects

Event Timeline

We can fix all these, but I think the best mid-term solution would be to implement support for contained execution on the Mediawiki end. I also spoke about this with @Bawolff at Wikimania and have just created
https://phabricator.wikimedia.org/T173370 for this. Comments welcome, I can help with all the bits on the firejail end.

dpatrick subscribed.

Other candidates...

  • $wgDjvuDump - djvudump
  • $wgDjvuRenderer - ddjvu
  • $wgTiffTiffinfoCommand - tiffinfo
  • $wgImageMagickIdentifyCommand - identify
  • $wgExiv2Command - exiv2
  • $wgPdfInfo - pdfinfo
  • $wgPdftoText - pdftotext
  • $wgVipsCommand - vips

Can we make this task public? With firejail support in core now, most of these will go through MediaWiki code review now. And there's quite a few binaries missing from here, e.g. pygments, diff, ...

https://gerrit.wikimedia.org/r/397606 - shell: Add debug logging to find binaries that aren't being restricted

Can we make this task public? With firejail support in core now, most of these will go through MediaWiki code review now. And there's quite a few binaries missing from here, e.g. pygments, diff, ...

Fine with me

Legoktm changed the visibility from "Custom Policy" to "Public (No Login Required)".Dec 13 2017, 2:05 AM
Legoktm updated the task description. (Show Details)
LSobanski closed subtask Restricted Task as Resolved.Jan 6 2023, 12:08 PM
Joe subscribed.

There is no point in working on firejail profiles given we've introduced shellbox in the meantime.