Re: snmpd crash after "response to proxy request illegal. We're screwed"

Tomasz Chmielewski <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 30.03.2011 01:25, Dave Shield wrote:
> On 29 March 2011 17:36, Tomasz Chmielewski<[email protected]>  wrote:
>>> What queries are you sending to the agent?
>>
>> Well, not so sure here.
> 
> What is the client application that's sending the original request?
> snmpget?   snmpwalk?   something else?

snmpd talks to some "nonstandard"/custom application which gets the information about the proxy.

Perhaps it responds with something illegal... Not sure if snmpd should crash though.


>> I checked with tcpdump or strace, and snmpd sends this:
> 
> Hmmm... that's not particularly easy to work with.
> Could you try running the agent using the option '-d'
> and send the request again.   That should show several
> raw packets dumps:
> 
>     - the incoming request from the original client application
>     - the request forwarded to the proxied agent
>     - the response from the proxied agent
> 
> (and in principle, the response sent back to the client application).

>From /etc/snmp/snmpd.conf:

proxy -v 2c -c public localhost:1611 .1.3.6.1.4.1.34039.10


Below, two outputs ending with crash:


1)

could not open /proc/net/if_inet6
error on subcontainer 'ia_addr' insert (-1)
cannot open /proc/net/snmp6 ...
NET-SNMP version 5.6.1
[smux_accept] accepted fd 13 from 127.0.0.1:58421
accepted smux peer: oid SNMPv2-SMI::enterprises.674.10892.1, descr Systems Management SNMP MIB Plug-in Manager
error on subcontainer 'ia_addr' insert (-1)
error on subcontainer 'ia_addr' insert (-1)
Wrong netlink message type 3
error on subcontainer 'ia_addr' insert (-1)
error on subcontainer 'ia_addr' insert (-1)
Wrong netlink message type 3
error on subcontainer 'ia_addr' insert (-1)
error on subcontainer 'ia_addr' insert (-1)
Wrong netlink message type 3
error on subcontainer 'ia_addr' insert (-1)

Received 36 byte packet from UDP: [a.a.a.a]:51304->[b.b.b.b]:161
0000: 30 22 02 01  01 04 06 70  75 62 6C 69  63 A1 15 02    0".....public...
0016: 04 6E 46 5C  EF 02 01 00  02 01 00 30  07 30 05 06    .nF\.......0.0..
0032: 01 2B 05 00                                           .+..

Connection from UDP: [a.a.a.a]:51304->[b.b.b.b]:161
Received SNMP packet(s) from UDP: [a.a.a.a]:51304->[b.b.b.b]:161
  GETNEXT message
    -- SNMPv2-SMI::org

Sending 117 bytes to UDP: [a.a.a.a]:51304->[b.b.b.b]:161
0000: 30 73 02 01  01 04 06 70  75 62 6C 69  63 A2 66 02    0s.....public.f.
0016: 04 6E 46 5C  EF 02 01 00  02 01 00 30  58 30 56 06    .nF\.......0X0V.
0032: 08 2B 06 01  02 01 01 01  00 04 4A 4C  69 6E 75 78    .+........JLinux
0048: 20 54 52 55  45 2D 50 4F  43 2D 53 43  36 31 30 30     TRUE-POC-SC6100
0064: 20 32 2E 36  2E 33 35 2E  35 20 23 31  20 53 4D 50     2.6.35.5 #1 SMP
0080: 20 54 75 65  20 53 65 70  20 32 38 20  30 30 3A 33     Tue Sep 28 00:3
0096: 33 3A 33 36  20 4E 5A 44  54 20 32 30  31 30 20 78    3:36 NZDT 2010 x
0112: 38 36 5F 36  34                                       86_64


Received 196 byte packet from UDP: [a.a.a.a]:58756->[b.b.b.b]:161
0000: 30 81 C1 02  01 01 04 06  70 75 62 6C  69 63 A0 81    0.......public..
0016: B3 02 04 6E  46 5C FB 02  01 00 02 01  00 30 81 A4    ...nF\.......0..
0032: 30 0E 06 0A  2B 06 01 04  01 82 89 77  0A 09 05 00    0...+......w....
0048: 30 0E 06 0A  2B 06 01 04  01 82 89 77  0A 06 05 00    0...+......w....
0064: 30 0E 06 0A  2B 06 01 04  01 82 89 77  0A 02 05 00    0...+......w....
0080: 30 0E 06 0A  2B 06 01 04  01 8F 65 04  05 00 05 00    0...+.....e.....
0096: 30 0E 06 0A  2B 06 01 04  01 8F 65 04  06 00 05 00    0...+.....e.....
0112: 30 0E 06 0A  2B 06 01 04  01 8F 65 04  0E 00 05 00    0...+.....e.....
0128: 30 10 06 0C  2B 06 01 04  01 82 89 77  0A 0D 01 03    0...+......w....
0144: 05 00 30 10  06 0C 2B 06  01 04 01 82  89 77 0A 0D    ..0...+......w..
0160: 01 02 05 00  30 0E 06 0A  2B 06 01 04  01 82 89 77    ....0...+......w
0176: 0A 06 05 00  30 0E 06 0A  2B 06 01 04  01 82 89 77    ....0...+......w
0192: 0A 01 05 00                                           ....

Connection from UDP: [a.a.a.a]:58756->[b.b.b.b]:161
Received SNMP packet(s) from UDP: [a.a.a.a]:58756->[b.b.b.b]:161
  GET message
    -- SNMPv2-SMI::enterprises.34039.10.9
    -- SNMPv2-SMI::enterprises.34039.10.6
    -- SNMPv2-SMI::enterprises.34039.10.2
    -- UCD-SNMP-MIB::memTotalReal.0
    -- UCD-SNMP-MIB::memAvailReal.0
    -- UCD-SNMP-MIB::memBuffer.0
    -- SNMPv2-SMI::enterprises.34039.10.13.1.3
    -- SNMPv2-SMI::enterprises.34039.10.13.1.2
    -- SNMPv2-SMI::enterprises.34039.10.6
    -- SNMPv2-SMI::enterprises.34039.10.1

Sending 147 bytes to UDP: [127.0.0.1]:1611->[0.0.0.0]:0
0000: 30 81 90 02  01 01 04 06  70 75 62 6C  69 63 A0 81    0.......public..
0016: 82 02 04 49  42 E3 A5 02  01 00 02 01  00 30 74 30    ...IB........0t0
0032: 0E 06 0A 2B  06 01 04 01  82 89 77 0A  09 05 00 30    ...+......w....0
0048: 0E 06 0A 2B  06 01 04 01  82 89 77 0A  06 05 00 30    ...+......w....0
0064: 0E 06 0A 2B  06 01 04 01  82 89 77 0A  02 05 00 30    ...+......w....0
0080: 10 06 0C 2B  06 01 04 01  82 89 77 0A  0D 01 03 05    ...+......w.....
0096: 00 30 10 06  0C 2B 06 01  04 01 82 89  77 0A 0D 01    .0...+......w...
0112: 02 05 00 30  0E 06 0A 2B  06 01 04 01  82 89 77 0A    ...0...+......w.
0128: 06 05 00 30  0E 06 0A 2B  06 01 04 01  82 89 77 0A    ...0...+......w.
0144: 01 05 00                                              ...


Received 45 byte packet from UDP: [127.0.0.1]:1611->[0.0.0.0]:29711
0000: 30 2B 02 01  01 04 06 70  75 62 6C 69  63 A2 1E 02    0+.....public...
0016: 04 49 42 E3  A5 02 01 00  02 01 00 30  10 30 0E 06    .IB........0.0..
0032: 0A 2B 06 01  04 01 82 89  77 0A 09 81  00             .+......w....

response to proxy request illegal.  We're screwed.




2)

could not open /proc/net/if_inet6
error on subcontainer 'ia_addr' insert (-1)
cannot open /proc/net/snmp6 ...
NET-SNMP version 5.6.1
[smux_accept] accepted fd 13 from 127.0.0.1:32158
accepted smux peer: oid SNMPv2-SMI::enterprises.674.10892.1, descr Systems Management SNMP MIB Plug-in Manager
error on subcontainer 'ia_addr' insert (-1)
error on subcontainer 'ia_addr' insert (-1)
Wrong netlink message type 3
error on subcontainer 'ia_addr' insert (-1)
error on subcontainer 'ia_addr' insert (-1)
Wrong netlink message type 3
error on subcontainer 'ia_addr' insert (-1)

Received 36 byte packet from UDP: [a.a.a.a]:53133->[b.b.b.b]:161
0000: 30 22 02 01  01 04 06 70  75 62 6C 69  63 A1 15 02    0".....public...
0016: 04 45 5D ED  E7 02 01 00  02 01 00 30  07 30 05 06    .E]........0.0..
0032: 01 2B 05 00                                           .+..

Connection from UDP: [a.a.a.a]:53133->[b.b.b.b]:161
Received SNMP packet(s) from UDP: [a.a.a.a]:53133->[b.b.b.b]:161
  GETNEXT message
    -- SNMPv2-SMI::org

Sending 117 bytes to UDP: [a.a.a.a]:53133->[b.b.b.b]:161
0000: 30 73 02 01  01 04 06 70  75 62 6C 69  63 A2 66 02    0s.....public.f.
0016: 04 45 5D ED  E7 02 01 00  02 01 00 30  58 30 56 06    .E]........0X0V.
0032: 08 2B 06 01  02 01 01 01  00 04 4A 4C  69 6E 75 78    .+........JLinux
0048: 20 54 52 55  45 2D 50 4F  43 2D 53 43  36 31 30 30     TRUE-POC-SC6100
0064: 20 32 2E 36  2E 33 35 2E  35 20 23 31  20 53 4D 50     2.6.35.5 #1 SMP
0080: 20 54 75 65  20 53 65 70  20 32 38 20  30 30 3A 33     Tue Sep 28 00:3
0096: 33 3A 33 36  20 4E 5A 44  54 20 32 30  31 30 20 78    3:36 NZDT 2010 x
0112: 38 36 5F 36  34                                       86_64


Received 196 byte packet from UDP: [a.a.a.a]:57903->[b.b.b.b]:161
0000: 30 81 C1 02  01 01 04 06  70 75 62 6C  69 63 A0 81    0.......public..
0016: B3 02 04 45  5D ED E9 02  01 00 02 01  00 30 81 A4    ...E]........0..
0032: 30 0E 06 0A  2B 06 01 04  01 82 89 77  0A 09 05 00    0...+......w....
0048: 30 0E 06 0A  2B 06 01 04  01 82 89 77  0A 06 05 00    0...+......w....
0064: 30 0E 06 0A  2B 06 01 04  01 82 89 77  0A 02 05 00    0...+......w....
0080: 30 0E 06 0A  2B 06 01 04  01 8F 65 04  05 00 05 00    0...+.....e.....
0096: 30 0E 06 0A  2B 06 01 04  01 8F 65 04  06 00 05 00    0...+.....e.....
0112: 30 0E 06 0A  2B 06 01 04  01 8F 65 04  0E 00 05 00    0...+.....e.....
0128: 30 10 06 0C  2B 06 01 04  01 82 89 77  0A 0D 01 03    0...+......w....
0144: 05 00 30 10  06 0C 2B 06  01 04 01 82  89 77 0A 0D    ..0...+......w..
0160: 01 02 05 00  30 0E 06 0A  2B 06 01 04  01 82 89 77    ....0...+......w
0176: 0A 06 05 00  30 0E 06 0A  2B 06 01 04  01 82 89 77    ....0...+......w
0192: 0A 01 05 00                                           ....

Connection from UDP: [a.a.a.a]:57903->[b.b.b.b]:161
Received SNMP packet(s) from UDP: [a.a.a.a]:57903->[b.b.b.b]:161
  GET message
    -- SNMPv2-SMI::enterprises.34039.10.9
    -- SNMPv2-SMI::enterprises.34039.10.6
    -- SNMPv2-SMI::enterprises.34039.10.2
    -- UCD-SNMP-MIB::memTotalReal.0
    -- UCD-SNMP-MIB::memAvailReal.0
    -- UCD-SNMP-MIB::memBuffer.0
    -- SNMPv2-SMI::enterprises.34039.10.13.1.3
    -- SNMPv2-SMI::enterprises.34039.10.13.1.2
    -- SNMPv2-SMI::enterprises.34039.10.6
    -- SNMPv2-SMI::enterprises.34039.10.1

Sending 147 bytes to UDP: [127.0.0.1]:1611->[0.0.0.0]:0
0000: 30 81 90 02  01 01 04 06  70 75 62 6C  69 63 A0 81    0.......public..
0016: 82 02 04 0E  7B 78 00 02  01 00 02 01  00 30 74 30    ....{x.......0t0
0032: 0E 06 0A 2B  06 01 04 01  82 89 77 0A  09 05 00 30    ...+......w....0
0048: 0E 06 0A 2B  06 01 04 01  82 89 77 0A  06 05 00 30    ...+......w....0
0064: 0E 06 0A 2B  06 01 04 01  82 89 77 0A  02 05 00 30    ...+......w....0
0080: 10 06 0C 2B  06 01 04 01  82 89 77 0A  0D 01 03 05    ...+......w.....
0096: 00 30 10 06  0C 2B 06 01  04 01 82 89  77 0A 0D 01    .0...+......w...
0112: 02 05 00 30  0E 06 0A 2B  06 01 04 01  82 89 77 0A    ...0...+......w.
0128: 06 05 00 30  0E 06 0A 2B  06 01 04 01  82 89 77 0A    ...0...+......w.
0144: 01 05 00                                              ...


Received 45 byte packet from UDP: [127.0.0.1]:1611->[0.0.0.0]:47463
0000: 30 2B 02 01  01 04 06 70  75 62 6C 69  63 A2 1E 02    0+.....public...
0016: 04 0E 7B 78  00 02 01 00  02 01 00 30  10 30 0E 06    ..{x.......0.0..
0032: 0A 2B 06 01  04 01 82 89  77 0A 09 81  00             .+......w....

response to proxy request illegal.  We're screwed.



-- 
Tomasz Chmielewski
http://wpkg.org

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.