Degradation of resolution service when 'discard-timeout' and 'serve-expired-client-timeout' are combined in unusual configuration
In NLnet Labs Unbound 1.20.0 up to and including 1.25.1, when Unbound is configured with 'serve-expired: yes' and 'serve-expired-client-timeout > discard-timeout > 0' (contrary to the suggested values), the discard-timeout branch during the serve expired logic drops an aged client reply without performing the correct accounting for the number of reply addresses for the query. Other identical branches outside of serve expired perform the correct decrement. Since the counter is never decremented in such scenario, it can reach the maximum limit and new clients for duplicate in-flight queries are silently dropped resulting in degradation of resolution service. A malicious actor can exploit the vulnerability by querying the resolver for a client-controlled slow-on-demand authoritative zone that can drive the counter past the threshold. Shipped defaults for 'serve-expired-client-timeout: 1800' and 'discard-timeout: 1900' make the branch unreachable.
Problem Types
| Type | CWE ID | Description |
|---|
| CWE | CWE-772 | CWE-772: Missing Release of Resource after Effective Lifetime |
Type: CWE
Description: CWE-772: Missing Release of Resource after Effective Lifetime
Metrics
| Version | Base score | Base severity | Vector |
|---|
| 3.1 | 5.9 | MEDIUM | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
Version: 3.1
Base score: 5.9
Base severity: MEDIUM
Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Timeline
| Event | Date |
|---|
| Issue reported by Qifan Zhang | 2026-05-02 00:00:00 |
| NLnet Labs shares patch with Qifan Zhang | 2026-05-26 00:00:00 |
| Qifan Zhang verifies patch | 2026-05-27 00:00:00 |
| Issue reported by Haruki Oyama | 2026-06-04 00:00:00 |
| NLnet Labs shares patch with Haruki Oyama | 2026-06-06 00:00:00 |
| Haruki Oyama verifies patch | 2026-06-06 00:00:00 |
| Issue reported by Xin Wang | 2026-06-25 00:00:00 |
| NLnet Labs shares patch with Xin Wang | 2026-06-26 00:00:00 |
| Xin Wang verifies patch | 2026-06-26 00:00:00 |
| Fixes released with version 1.25.2 | 2026-07-22 00:00:00 |
Event: Issue reported by Qifan Zhang
Date: 2026-05-02 00:00:00
Event: NLnet Labs shares patch with Qifan Zhang
Date: 2026-05-26 00:00:00
Event: Qifan Zhang verifies patch
Date: 2026-05-27 00:00:00
Event: Issue reported by Haruki Oyama
Date: 2026-06-04 00:00:00
Event: NLnet Labs shares patch with Haruki Oyama
Date: 2026-06-06 00:00:00
Event: Haruki Oyama verifies patch
Date: 2026-06-06 00:00:00
Event: Issue reported by Xin Wang
Date: 2026-06-25 00:00:00
Event: NLnet Labs shares patch with Xin Wang
Date: 2026-06-26 00:00:00
Event: Xin Wang verifies patch
Date: 2026-06-26 00:00:00
Event: Fixes released with version 1.25.2
Date: 2026-07-22 00:00:00