[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#958931: marked as done (buster-pu: package node-mongodb/3.1.13+~3.1.11-2+deb10u1)



Your message dated Sat, 09 May 2020 11:53:52 +0100
with message-id <fd7fa4d56896c35aab49a5a51cb69727dc60e87a.camel@adam-barratt.org.uk>
and subject line Closing requests included in 10.4 point release
has caused the Debian Bug report #958931,
regarding buster-pu: package node-mongodb/3.1.13+~3.1.11-2+deb10u1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
958931: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=958931
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
Tags: buster
User: release.debian.org@packages.debian.org
Usertags: pu

Hi,

bson (embedded in node-mongodb) is vulnerable to Deserialization of Untrusted
Data. This upstream fix fixes both CVE-2019-2391 and CVE-2020-7610.

Cheers,
Xavier
diff --git a/debian/changelog b/debian/changelog
index 7b663b5..5ee648d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+node-mongodb (3.1.13+~3.1.11-2+deb10u1) buster; urgency=medium
+
+  * Throw if invalid _bsontype is detected
+    (Closes: CVE-2019-2391, CVE-2020-7610)
+
+ -- Xavier Guimard <yadd@debian.org>  Sun, 26 Apr 2020 21:41:23 +0200
+
 node-mongodb (3.1.13+~3.1.11-2) unstable; urgency=medium
 
   * Remove bson tests (Closes: #923353)
diff --git a/debian/patches/fix-json-parsing.diff b/debian/patches/fix-json-parsing.diff
new file mode 100644
index 0000000..f4b9c44
--- /dev/null
+++ b/debian/patches/fix-json-parsing.diff
@@ -0,0 +1,73 @@
+Description: throw if invalid _bsontype is detected 
+ Closes: CVE-2019-2391, CVE-2020-7610
+Author: Matt Broadstone
+Bug: https://snyk.io/vuln/SNYK-JS-BSON-561052
+Forwarded: not-needed
+Reviewed-By: Xavier Guimard <yadd@debian.org>
+Last-Update: 2020-04-26
+
+--- a/bson/browser_build/bson.js
++++ b/bson/browser_build/bson.js
+@@ -17074,6 +17074,8 @@
+ 	        index = serializeInt32(buffer, key, value, index, true);
+ 	      } else if (value['_bsontype'] === 'MinKey' || value['_bsontype'] === 'MaxKey') {
+ 	        index = serializeMinMax(buffer, key, value, index, true);
++	      } else if (typeof value['_bsontype'] !== 'undefined') {
++	        throw new TypeError('Unrecognized or invalid _bsontype: ' + value['_bsontype']);
+ 	      }
+ 	    }
+ 	  } else if (object instanceof Map) {
+@@ -17152,6 +17154,8 @@
+ 	        index = serializeInt32(buffer, key, value, index);
+ 	      } else if (value['_bsontype'] === 'MinKey' || value['_bsontype'] === 'MaxKey') {
+ 	        index = serializeMinMax(buffer, key, value, index);
++	      } else if (typeof value['_bsontype'] !== 'undefined') {
++	        throw new TypeError('Unrecognized or invalid _bsontype: ' + value['_bsontype']);
+ 	      }
+ 	    }
+ 	  } else {
+@@ -17233,6 +17237,8 @@
+ 	        index = serializeInt32(buffer, key, value, index);
+ 	      } else if (value['_bsontype'] === 'MinKey' || value['_bsontype'] === 'MaxKey') {
+ 	        index = serializeMinMax(buffer, key, value, index);
++	      } else if (typeof value['_bsontype'] !== 'undefined') {
++	        throw new TypeError('Unrecognized or invalid _bsontype: ' + value['_bsontype']);
+ 	      }
+ 	    }
+ 	  }
+@@ -17745,4 +17751,4 @@
+ /***/ })
+ /******/ ])
+ });
+-;
+\ No newline at end of file
++;
+--- a/bson/lib/bson/parser/serializer.js
++++ b/bson/lib/bson/parser/serializer.js
+@@ -778,6 +778,8 @@
+         index = serializeInt32(buffer, key, value, index, true);
+       } else if (value['_bsontype'] === 'MinKey' || value['_bsontype'] === 'MaxKey') {
+         index = serializeMinMax(buffer, key, value, index, true);
++      } else if (typeof value['_bsontype'] !== 'undefined') {
++        throw new TypeError('Unrecognized or invalid _bsontype: ' + value['_bsontype']);
+       }
+     }
+   } else if (object instanceof Map) {
+@@ -876,6 +878,8 @@
+         index = serializeInt32(buffer, key, value, index);
+       } else if (value['_bsontype'] === 'MinKey' || value['_bsontype'] === 'MaxKey') {
+         index = serializeMinMax(buffer, key, value, index);
++      } else if (typeof value['_bsontype'] !== 'undefined') {
++        throw new TypeError('Unrecognized or invalid _bsontype: ' + value['_bsontype']);
+       }
+     }
+   } else {
+@@ -978,6 +982,8 @@
+         index = serializeInt32(buffer, key, value, index);
+       } else if (value['_bsontype'] === 'MinKey' || value['_bsontype'] === 'MaxKey') {
+         index = serializeMinMax(buffer, key, value, index);
++      } else if (typeof value['_bsontype'] !== 'undefined') {
++        throw new TypeError('Unrecognized or invalid _bsontype: ' + value['_bsontype']);
+       }
+     }
+   }
diff --git a/debian/patches/series b/debian/patches/series
index a92eae2..a27d49a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 remove-privacy-leak.patch
 remove-dependency-versions.patch
+fix-json-parsing.diff

--- End Message ---
--- Begin Message ---
Package: release.debian.org
Version: 10.4

Hi,

Each of the uploads referred to by these bugs was included in today's
stable point release.

Regards,

Adam

--- End Message ---

Reply to: