Bug 1963990 - bind: missing validation while handling TKEY queries leads to out-of-bound read
Summary: bind: missing validation while handling TKEY queries leads to out-of-bound read
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1963991 1963993
Blocks: 1974318
TreeView+ depends on / blocked
 
Reported: 2021-05-24 14:22 UTC by Michael Kaplan
Modified: 2022-04-17 21:24 UTC (History)
8 users (show)

Fixed In Version: bind 9.11.31, bind 9.16.15
Clone Of:
Environment:
Last Closed: 2021-10-28 12:27:37 UTC
Embargoed:


Attachments (Terms of Use)

Description Michael Kaplan 2021-05-24 14:22:39 UTC
The specific flaw exists within the handling of TKEY queries. The issue results from the lack of proper validation of user-supplied data, which can result in a read past the end of an allocated buffer. An attacker can leverage this in conjunction with other vulnerabilities to execute arbitrary code in the context of the "bind" user.

Comment 1 Michael Kaplan 2021-05-24 14:22:56 UTC
Created bind tracking bugs for this issue:

Affects: fedora-all [bug 1963991]

Comment 3 Riccardo Schirone 2021-06-21 12:38:35 UTC
The issue was in the internal implementation of SPNEGO in spnego.c. Function der_match_tag_and_length() reads a length from the user-provided data without validating it. The length is then used in other functions, potentially allowing to read beyond the bounds of a buffer.

This problem was fixed upstream by completely removing the internal SPNEGO implementation.

Comment 5 Riccardo Schirone 2021-06-21 12:43:58 UTC
It seems SPNEGO internal implementation was first introduced with:
https://github.com/isc-projects/bind9/commit/289ae548d52bc8f982d9823af64cafda7bd92232

It was then removed in:
https://github.com/isc-projects/bind9/commit/978c7b2e89aa37a7ddfe2f6b6ba12ce73dd04528


Note You need to log in before you can comment on or make changes to this bug.