Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 40400

Summary: man 1.5h1-10 has an exploitable overflow
Product: [Retired] Red Hat Linux Reporter: Need Real Name <empathy>
Component: manAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED ERRATA QA Contact: Aaron Brown <abrown>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-05-13 18:22:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2001-05-13 17:35:11 UTC
Description of Problem:

man 1.5h1-10 (version released with rh7.0) has a heap based overflow
in man.c, get_section_list() function. The check 

      if (end == NULL || i + 1 == sizeof (tmp_section_list))
        break;
should be
      if (end == NULL || i + 1 == (sizeof (tmp_section_list) /
sizeof(tmp_section_list[0]))
        break;

There exists an exploit for gid man.

How Reproducible:

Make a section list with over 100 elements in it.

Steps to Reproduce:
1. man -S `perl -e 'print ":" x 101'` ls

Actual Results:

Segmentation fault

Expected Results:

No manual entry for ls

Additional Information:
	
A root exploit from gid man also exists.

Comment 1 Bernhard Rosenkraenzer 2001-05-13 18:22:38 UTC
Quick fix: Update to the versions from 7.1 or rawhide (preferred).
I'll take care of errataing this now.


Comment 2 Bernhard Rosenkraenzer 2001-05-21 18:38:10 UTC
The errata package just passed QA - closing this bug.


Comment 3 Bernhard Rosenkraenzer 2001-05-21 18:39:50 UTC
By the way, I could not find any information about a root exploit from gid man 
anywhere on the net.
If this is indeed true, please open a new bug report with information on this.