Bug 79028 - SEGV in Net-SNMP
Product: Red Hat Linux
Classification: Retired
Component: net-snmp (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Phil Knirsch
: Security
Depends On:
  Show dependency treegraph
Reported: 2002-12-04 13:01 EST by Need Real Name
Modified: 2015-03-04 20:11 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-12-19 04:00:31 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2002-12-04 13:01:07 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021127

Description of problem:
There is an off-by-one error in the SNMP agent's source code. Anyone who can
make a GET request to the server can crash it.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

Actual Results:  N/A

Expected Results:  N/A

Additional info:

Around agent/snmpd_agent.c:1490 where the agent grows its cache, it memsets all
but the last element in the expanded array to 0x00.

To fix it, change line 1490 from
    sizeof(netsnmp_tree_cache) * (CACHE_GROW_SIZE - 1));
    sizeof(netsnmp_tree_cache) * CACHE_GROW_SIZE );

This problem is also present in Net-SNMP 5.0.6, although the line moved down
around 1581.

Contact me if you need a demonstration program that can reliably crash snmpd.
Comment 1 Mark J. Cox 2002-12-05 03:09:48 EST
Is this a known public issue (has it been reported to Net-SNMP folks)?  Any
references or details about how this was reported and when would help us with
any erratum.
Comment 2 Need Real Name 2002-12-05 10:33:24 EST
I added it to the Net-SNMP bug tracker yesterday. It's number is 648515. Wes
Hardaker says a fix was already in the CVS tree and it will be in the
forthcoming 5.0.7 release.

Here's a link to the Sourceforge bug:
Comment 3 Alan Cox 2002-12-18 13:42:24 EST
Mark is this fixed in the latest snmp we pushed if so can you close it

Alan the bugzilla womble
Comment 4 Mark J. Cox 2002-12-19 04:00:31 EST
Yes, fixed by erratum

(This bug should have got automatically updated when the erratum was pushed,
will look into this as a process problem).

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