• Join/Login
  • Business Software
  • Open Source Software
  • For Vendors
  • Blog
  • About
  • More
    • Articles
    • Create
    • SourceForge Podcast
    • Site Documentation
    • Subscribe to our Newsletter
    • Support Request
SourceForge logo
For Vendors Help Create Join Login
SourceForge logo
Business Software
Open Source Software
SourceForge Podcast
Resources
  • Articles
  • Case Studies
  • Blog
Menu
  • Help
  • Create
  • Join
  • Login
  • Home
  • Browse
  • net-snmp
  • Patches
net-snmp

possible snmpd crash when snmp subagent connection timeout.

Brought to you by: baerm, dts12, hardaker, marz, and 3 others
  • Summary
  • Files
  • Reviews
  • Support
  • News
  • Mailing Lists
  • Bugs
  • Feature Requests
  • Patches
  • Official Patches
  • Htdocs
  • Code
Menu ▾ ▴
  • Create Ticket
  • View Stats

Group

  • backport-needed

Searches

  • Changes
  • Closed Tickets
  • My patches
  • Open Tickets

Help

  • Formatting Help

#1406 possible snmpd crash when snmp subagent connection timeout.

backport-needed
open
nobody
None
5
2019-09-04
2019-08-23
Renuka Manavalan
No

Version: net-snmp-5.7.3+dfsg
uname -a: Linux MyDUT 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u5 (2015-12-19) x86_64 GNU/Linux

Fix snmpd crash that could happen when netsnmp session with an agent closes due to timeout.

Background:

A netsnmp_session could register netsnmp_subtrees with AGENTX_MSG_REGISTER command
These netsnmp_subtree objects gets associated with corresponding netsnmp_session
When an agent explicitly/implicitly/timeout closes the netsnmp_session, all the associated netsnmp_subtree objects get freed.
But these netsnmp_subtree objects could be in use by requests from other netsnmp_sessions
During close, it sweeps across all requests from all delegated netsnmp_agent_sessions, fail them, to get them undelegated & close, before proceeding to release all the associated subtrees.
Bug:
While walking all requests of a netsnmp_agent_session, it tries to use the next pointer of request.
The next pointer links only requests that share this cache/cache-id.
To scan all requests, we would need to walk across all cahces (asp->treecache_num).
Or walk acrosss all requests 0 .. asp->vbcount, as requests are maintained as an array of vbcount.

It is more robust to walk until vbcount, as that takes care of possible scenarios where a request is not yet added to cache.

Fix:
To scan all requests, don't use next pointer, but instead walk the range 0 .. vbcount.

1 Attachments
0006-Release-all-requests-that-use-this-session.patch

Discussion

  • Renuka Manavalan

    Renuka Manavalan - 2019-09-04

    Looks like addressed by https://sourceforge.net/p/net-snmp/patches/1237/

     
    If you would like to refer to this comment somewhere else in this project, copy and paste the following link:

Log in to post a comment.

SourceForge
  • Create a Project
  • Open Source Software
  • Business Software
  • Top Downloaded Projects
Company
  • About
  • Team
  • SourceForge Headquarters
    225 Broadway Suite 1600
    San Diego, CA 92101
    +1 (858) 422-6466
Resources
  • Support
  • Site Documentation
  • Site Status
  • SourceForge Reviews
SourceForge logo
© 2025 Slashdot Media. All Rights Reserved.
Terms Privacy Opt Out Advertise
×
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.