Forgot to provide poc in last email
We found one bug in snmp by fuzzing. Here is the vulnerability info
and poc. Please assist us to get the cve number, it is very important
to us.
Discover: Yingchao Yu, Shibin Zhao, Chiheng Wang
The vulnerability is located in the snmp_add_var() function in
net-snmp/snmplib/snmp_api.c. When Agentxtrap parses the variable after the
`b` character in the parameter, it will apply for a buf with a size of 256,
and then put the variable string into the `vp`.
[image: image.png]
Then convert the string of the variable into an integer value in
sequence according to the delimiter, and divide it by 8 as the `ix`
value.
[image: image.png]
When `ix` is greater than `buf_len`, the snmp_relloc() function
(defined in net-snmp/snmplib/tools.c) will be called, and only the
original 256 size buf will be expanded to 256*2, and through this
judgment condition.
[image: image.png]
But since the value of `ltmp` can be arbitrarily parameterized, it
will cause `ix` to be arbitrarily large. Therefore, if `ix` is large
enough, it is greater than 256*2 of buf at this time! Then when
`buf[ix]` is taken out later, a heap overflow will occur.
poc: