ipDefaultRouterLifetime returns out-of-range values

Bug #1724420 reported by Eugene M. Kim on 2017-10-18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
net-snmp (Ubuntu)

Bug Description

IP-MIB defines ipDefaultRouterLifetime to be in 0..65535 range, but the current code 1) erroneously uses 0xFFFFFFFFUL (4294967296) as the max value, and 2) does not clip the computed value that exceeds the maximum (this was unnecessary probably because the max value was also the max value permitted for the underlying type uint32_t).

The attached patch – also submitted upstream, https://sourceforge.net/p/net-snmp/code/merge-requests/11/ – fixes this problem.

To reproduce:

$ snmptable -Ci -v2c -c<REDACTED> localhost IP-MIB::ipDefaultRouterTable
SNMP table: IP-MIB::ipDefaultRouterTable

             index ipDefaultRouterLifetime ipDefaultRouterPreference
ipv4."".3 4294967295 seconds medium

Eugene M. Kim (astralblue) wrote :

The attachment "The fix for the bug" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Joshua Powers (powersj) on 2017-10-30
Changed in net-snmp (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers