Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1628754 - (CVE-2018-16741) CVE-2018-16741 mgetty: command injection in faxrunq
CVE-2018-16741 mgetty: command injection in faxrunq
Status: NEW
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,public=20180911,repor...
: Security
Depends On: 1628755 1630791
Blocks: 1628756
  Show dependency treegraph
 
Reported: 2018-09-13 17:44 EDT by Laura Pardo
Modified: 2018-09-19 10:39 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
A command injection was discovered in mgetty in the faxrunq script used to send queued faxes. The shell script faxrunq does not properly escape the arguments passed to faxsend before evaluating the command allowing a user, who has permissions to queue faxes in the system, to execute arbitrary command with elevated privileges.
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
upstream patch (1.28 KB, patch)
2018-09-19 05:26 EDT, Riccardo Schirone
no flags Details | Diff

  None (edit)
Description Laura Pardo 2018-09-13 17:44:43 EDT
An issue was discovered in mgetty before 1.2.1. The shell script faxrunq does not properly escape arguments passed to faxsend and that may lead to command injection. A local user may use faxq-helper to sneak in some shell metacharacters (e.g. ||, &&, >) in the fax job file, that will be later parsed by faxrunq.


References:
https://lists.debian.org/debian-lts-announce/2018/09/msg00012.html
https://www.x41-dsec.de/lab/advisories/x41-2018-007-mgetty/
Comment 1 Laura Pardo 2018-09-13 17:45:04 EDT
Created mgetty tracking bugs for this issue:

Affects: fedora-all [bug 1628755]
Comment 3 Riccardo Schirone 2018-09-19 05:26 EDT
Created attachment 1484634 [details]
upstream patch

This patch was extracted from mgetty-1.2.1
Comment 4 Riccardo Schirone 2018-09-19 05:30:40 EDT
faxrunq SHELL script does not properly escape the parameters before evaluating
the command to send the fax, thus the characters that sneak in thanks to loose
checks in faxq-helper.c:do_activate() can be used to inject commands.
Comment 6 Riccardo Schirone 2018-09-19 05:35:01 EDT
Mitigation:

Allow only trusted users to run the faxq-helper binary, by correctly setting the /etc/mgetty+sendfax/fax.allow configuration file.
Comment 7 Riccardo Schirone 2018-09-19 05:36:31 EDT
By default /etc/mgetty+sendfax/fax.allow does not exist on RHEL and only root is allowed to run faxq-helper binary, thus only root can exploit this flaw.

Note You need to log in before you can comment on or make changes to this bug.