Bug 1038007 - (CVE-2012-6151) CVE-2012-6151 net-snmp: snmpd crashes/hangs when AgentX subagent times-out
CVE-2012-6151 net-snmp: snmpd crashes/hangs when AgentX subagent times-out
Status: CLOSED ERRATA
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=20120905,repor...
: Security
Depends On: 969061 1038011 1039518 1073224 1073225
Blocks: 1001926 1070397
  Show dependency treegraph
 
Reported: 2013-12-04 04:19 EST by Ratul Gupta
Modified: 2015-10-16 13:34 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-03-26 10:57:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
backported patch (4.08 KB, patch)
2014-03-04 06:23 EST, Jan Safranek
no flags Details | Diff
backported patch (9.32 KB, patch)
2014-03-04 06:26 EST, Jan Safranek
no flags Details | Diff

  None (edit)
Description Ratul Gupta 2013-12-04 04:19:30 EST
net-snmp was found to be crashing/hanging due to the heavy load on the subagent AgentX.

Here, snmpd is the master agent, AgentX is the subagent registering to handle a MIB and processing GETNEXT requests. When the subagent is under heavy load, requests start to pile up in the queue, replies from the subagent arrive too late (per log messages) and eventually the subagent is timed out. When the timeout occurs there is a high probability of either a crash (Segfault) or a hang (100% CPU utilisation, tight loop in the snmpd code) dependent on the version of the snmpd under test. This also happens when the subagent dies unexpectedly with outstanding transactions unserviced.

References:
http://seclists.org/oss-sec/2013/q4/398
http://sourceforge.net/p/net-snmp/bugs/2411/

Patch:
http://sourceforge.net/p/net-snmp/patches/1237/?page=0
Comment 1 Ratul Gupta 2013-12-04 04:21:22 EST
Created net-snmp tracking bugs for this issue:

Affects: fedora-all [bug 1038011]
Comment 3 Fedora Update System 2014-01-07 04:35:33 EST
net-snmp-5.7.2-13.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 4 Fedora Update System 2014-01-07 04:40:08 EST
net-snmp-5.7.2-7.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 5 Fedora Update System 2014-01-07 04:47:41 EST
net-snmp-5.7.2-16.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 7 Vincent Danen 2014-01-15 17:41:35 EST
This issue was corrected in Red Hat Enterprise Linux 6 via RHBA-2013:1150

  http://rhn.redhat.com/errata/RHBA-2013-1150.html

before it was considered a security flaw.

The upstream patch is here:

http://sourceforge.net/p/net-snmp/code/ci/793d596838ff7cb48a73b675d62897c56c9e62df/
Comment 11 Jan Safranek 2014-03-04 06:23:54 EST
Created attachment 870332 [details]
backported patch

And I've just checked that this patch fixes the bug.
Comment 12 Jan Safranek 2014-03-04 06:26:00 EST
Created attachment 870333 [details]
backported patch

I accidentally attached wrong patch, this is the right one.
Comment 14 errata-xmlrpc 2014-03-24 13:55:03 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2014:0322 https://rhn.redhat.com/errata/RHSA-2014-0322.html

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