net-snmp 3.29.0 → 3.29.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +8 -0
  2. package/index.js +10 -2
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -3808,6 +3808,14 @@ Example programs are included under the module's `example` directory.
3808
3808
 
3809
3809
  * Translate error statuses to their SNMPv1 equivalents when the agent responds to a version 1 request, using the mapping in RFC 2089 section 2.1 - the agent produces statuses from the SNMPv2 set whatever version it is answering, and previously sent codes such as `noAccess` and `notWritable` to SNMPv1 managers unchanged, even though SNMPv1 defines no such values. A SetRequest for a read-only object now returns `noSuchName` to an SNMPv1 manager
3810
3810
 
3811
+ # Version 3.29.1 - 13/09/2026
3812
+
3813
+ * Upgrade the Mocha test framework to version 12, clearing the outstanding `serialize-javascript` and `diff` security advisories from the dependency tree - both were development-only transitive dependencies of the test toolchain and were never part of the published package, so no user of the library was exposed. Running the test suite now requires Node.js `^20.19.0 || >=22.12.0`; the library itself is unaffected
3814
+
3815
+ # Version 3.29.2 - 09/10/2026
3816
+
3817
+ * Reject a varbind list that ends with a truncated OID instead of looping forever - a short unauthenticated UDP packet whose varbind carried a lone OID tag with no length byte sent the varbind parser into an infinite loop, spinning the CPU at 100% or exhausting memory. Such packets are now rejected with a `ResponseInvalidError` carrying the new `EBadVarbindList` code, closing a network-reachable denial-of-service on agents, receivers, and session clients
3818
+
3811
3819
  # License
3812
3820
 
3813
3821
  Copyright (c) 2020 Mark Abrahams <mark@abrahams.co.nz>
package/index.js CHANGED
@@ -305,7 +305,8 @@ var ResponseInvalidCode = {
305
305
  11: "EUnexpectedReport",
306
306
  12: "EResponseNotHandled",
307
307
  13: "EUnexpectedResponse",
308
- 14: "ENotInTimeWindow"
308
+ 14: "ENotInTimeWindow",
309
+ 15: "EBadVarbindList"
309
310
  };
310
311
 
311
312
  _expandConstantObject (ResponseInvalidCode);
@@ -496,6 +497,9 @@ function readVarbindValue (buffer, type) {
496
497
  value = null;
497
498
  } else if (type == ObjectType.OID) {
498
499
  value = buffer.readOID ();
500
+ if (value == null)
501
+ throw new ResponseInvalidError ("Truncated OID in varbind list",
502
+ ResponseInvalidCode.EBadVarbindList);
499
503
  } else if (type == ObjectType.IpAddress) {
500
504
  value = readIpAddress (buffer);
501
505
  } else if (type == ObjectType.Counter) {
@@ -531,10 +535,14 @@ function readVarbinds (buffer, varbinds) {
531
535
  buffer.readSequence ();
532
536
 
533
537
  while (1) {
534
- buffer.readSequence ();
538
+ if ( buffer.readSequence () == null )
539
+ break;
535
540
  if ( buffer.peek () != ObjectType.OID )
536
541
  break;
537
542
  var oid = buffer.readOID ();
543
+ if (oid == null)
544
+ throw new ResponseInvalidError ("Truncated OID in varbind list",
545
+ ResponseInvalidCode.EBadVarbindList);
538
546
  var type = buffer.peek ();
539
547
 
540
548
  if (type == null)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "net-snmp",
3
- "version": "3.29.0",
3
+ "version": "3.29.2",
4
4
  "description": "JavaScript implementation of the Simple Network Management Protocol (SNMP)",
5
5
  "author": "Mark Abrahams <mark@abrahams.co.nz>",
6
6
  "license": "MIT",
@@ -58,6 +58,6 @@
58
58
  "devDependencies": {
59
59
  "eslint": "^9.9.1",
60
60
  "getopts": "^2.3.0",
61
- "mocha": "^11.0.1"
61
+ "mocha": "^12.0.1"
62
62
  }
63
63
  }