net-snmp 3.29.1 → 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.
- package/README.md +4 -0
- package/index.js +10 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3812,6 +3812,10 @@ Example programs are included under the module's `example` directory.
|
|
|
3812
3812
|
|
|
3813
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
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
|
+
|
|
3815
3819
|
# License
|
|
3816
3820
|
|
|
3817
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)
|