title: Denial of service when trimming EDE text on positive replies
description: NLnet Labs Unbound version 1.18.0 up to and including version 1.19.1 contain a vulnerability that can cause denial of service by a certain code path that can lead to an infinite loop. Unbound 1.18.0 introduced a feature that removes EDE records from responses with size higher than the client's advertised buffer size. Before removing all the EDE records however, it would try to see if trimming the extra text fields on those records would result in an acceptable size while still retaining the EDE codes. Due to an unchecked condition, the code that trims the text of the EDE records could loop indefinitely. This happens when Unbound would reply with attached EDE information on a positive reply and the client's buffer size is smaller than the needed space to include EDE records. The vulnerability can only be triggered when the 'ede: yes' option is used; non default configuration. From version 1.19.2 on, the code is fixed to avoid looping indefinitely.
problem types: CWE-835 Loop with Unreachable Exit Condition ('Infinite Loop')
affected:
{
vendor: NLnet Labs
product: Unbound
versions:
version: 1.18.0, status: affected, lessThan: 1.19.2, versionType: semver
defaultStatus: unaffected
}
metrics:
format: CVSS
scenarios: 'ede: yes' option set
cvssV3_1: [
version: 3.1
baseScore: 7.5
baseSeverity: HIGH
vectorString: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
]
solutions: This issue is fixed in 1.19.2 and all later versions. For the vulnerable versions 1.18.0 up to and including 1.19.1, the option 'ede: no' (default configuration) is also a solution as it does not exercise the vulnerable code path.