[prev in list] [next in list] [prev in thread] [next in thread] 

List:       net-snmp-bugs
Subject:    [ net-snmp-Bugs-504231 ] bug in agentx_var causes infinite loop
From:       noreply () sourceforge ! net
Date:       2002-02-16 1:06:01
[Download RAW message or body]

Bugs item #504231, was opened at 2002-01-15 22:53
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=112694&aid=504231&group_id=12694

Category: agent
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: bug in agentx_var causes infinite loop

Initial Comment:
When called with exact=0, agentx_var is supposed to do 
an effective "getnext" on the argument name. 
Currently, agentx_var only does a getnext if the 
argument oid is less than the variable oid. The effect 
of this is to cause an infinite loop in the master 
agent when there is no view for the current pdu. What 
happens is that agentx_var is called with an argument 
oid either less than or equal to the oid implemented 
by the subagent. If the argument is less than the 
variable oid, then the argument oid is changed to the 
argument oid. agentx_var then returns a pointer to its 
write method. The caller (search_subtree_vars) then 
eventually get to the code which checks to see if the 
argument oid has a view (in_a_view - for access-
control). In this case, there is no view for this 
object, so in_a_view returns a non-zero value. That 
causes a goto back to the function which again calls 
agentx_var (indirectly through findVar). This time the 
argument oid is exactly the same as the variable oid 
due to the previous call. The exact argument to 
agentx_var is 0 which means to do the getnext on the 
variable. agentx_var however does nothing to the 
argument oid and still returns a non-NULL value - its 
write method. The effect is to go into an infinite 
loop between in_a_view and agentx_var.

So, agentx_var needs to add logic to return a NULL if 
exact=0 and the argument oid is equal to, or greater 
than the variable oid.

-jeff hardy


----------------------------------------------------------------------

>Comment By: Wes Hardaker (hardaker)
Date: 2002-02-15 17:06

Message:
Logged In: YES 
user_id=76242

Can you actually check out the main line branch in the cvs tree or the 5.0.pre2 release when it 
comes out next week.  It's quite a bit different and if it's fixed there we need to know.



----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2002-01-21 10:16

Message:
Logged In: NO 

There still appears to be in infinite loop. Only this time, 
bit the agent and the subagent go into the loop 
communicating with one another.

The key here still seems to be the fact that there is no 
view for the oid requested. It would seem that more testing 
needs to be done in this area. The problem is that any 
person can disable a master agent by putting it into an 
infinite loop.

I'll do more experimentation when I have time.

-jeff hardy


----------------------------------------------------------------------

Comment By: John Naylon (jbpn)
Date: 2002-01-16 02:36

Message:
Logged In: YES 
user_id=93926

Please check out the branch UCD-SNMP from the CVS tree and
use the AgentX support there, which is much improved over
4.2.3.  Let me know if you still have this problem with that
source tree. 

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=112694&aid=504231&group_id=12694

_______________________________________________
Net-snmp-bugs mailing list
Net-snmp-bugs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic