|
| 1 | +From 0df25374147ee336e08c3e5a67f98c3a0c9c74fb Mon Sep 17 00:00:00 2001 |
| 2 | + |
| 3 | +Date: Wed, 21 May 2025 14:52:49 -0400 |
| 4 | +Subject: [PATCH] Address CVE-2025-47279 |
| 5 | +Upstream Patch Reference: https://github.com/nodejs/undici/commit/f317618ec28753a4218beccea048bcf89c36db25 |
| 6 | + |
| 7 | +--- |
| 8 | + deps/undici/src/lib/pool.js | 14 ++++++++++++++ |
| 9 | + 1 file changed, 14 insertions(+) |
| 10 | + |
| 11 | +diff --git a/deps/undici/src/lib/pool.js b/deps/undici/src/lib/pool.js |
| 12 | +index e3cd3399..86b29d44 100644 |
| 13 | +--- a/deps/undici/src/lib/pool.js |
| 14 | ++++ b/deps/undici/src/lib/pool.js |
| 15 | +@@ -73,6 +73,20 @@ class Pool extends PoolBase { |
| 16 | + ? { ...options.interceptors } |
| 17 | + : undefined |
| 18 | + this[kFactory] = factory |
| 19 | ++ |
| 20 | ++ this.on('connectionError', (origin, targets, error) => { |
| 21 | ++ // If a connection error occurs, we remove the client from the pool, |
| 22 | ++ // and emit a connectionError event. They will not be re-used. |
| 23 | ++ // Fixes https://github.com/nodejs/undici/issues/3895 |
| 24 | ++ for (const target of targets) { |
| 25 | ++ // Do not use kRemoveClient here, as it will close the client, |
| 26 | ++ // but the client cannot be closed in this state. |
| 27 | ++ const idx = this[kClients].indexOf(target) |
| 28 | ++ if (idx !== -1) { |
| 29 | ++ this[kClients].splice(idx, 1) |
| 30 | ++ } |
| 31 | ++ } |
| 32 | ++ }) |
| 33 | + } |
| 34 | + |
| 35 | + [kGetDispatcher] () { |
| 36 | +-- |
| 37 | +2.34.1 |
| 38 | + |
0 commit comments