ipDefaultRouterLifetime returns out-of-range values

Bug #1724420 reported by Eugene M. Kim
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
net-snmp (Ubuntu)
Confirmed
Undecided
Unassigned

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."10.15.2.1".3 4294967295 seconds medium

Tags: patch
Revision history for this message
Eugene M. Kim (astralblue) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) 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)
Changed in net-snmp (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.