Bug 1964016 (CVE-2021-28905) - CVE-2021-28905 libyang: reachable assertion in lys_node_free()
Summary: CVE-2021-28905 libyang: reachable assertion in lys_node_free()
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2021-28905
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: 1964017 1965258 1965259
Blocks: 1964021
TreeView+ depends on / blocked
 
Reported: 2021-05-24 14:43 UTC by Guilherme de Almeida Suckevicz
Modified: 2022-04-17 21:24 UTC (History)
2 users (show)

Fixed In Version: libyang 1.0.225
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in libyang. An assertion in lys_node_free function may be reached or, if assertions are disabled, a NULL pointer dereference could be triggered allowing a remote attacker to crash an application that uses libyang with user-controlled YIN data. The highest threat from this vulnerability is the service availability.
Clone Of:
Environment:
Last Closed: 2021-10-28 12:28:46 UTC
Embargoed:


Attachments (Terms of Use)

Description Guilherme de Almeida Suckevicz 2021-05-24 14:43:54 UTC
In function lys_node_free() in libyang <= v1.0.225, it asserts that the value of node->module can't be NULL. But in some cases, node->module can be null, which triggers a reachable assertion (CWE-617).

Reference:
https://github.com/CESNET/libyang/issues/1452

Comment 1 Guilherme de Almeida Suckevicz 2021-05-24 14:44:12 UTC
Created libyang tracking bugs for this issue:

Affects: fedora-all [bug 1964017]

Comment 2 Riccardo Schirone 2021-05-27 09:39:47 UTC
Upstream patch:
https://github.com/CESNET/libyang/commit/5ce30801f9ccc372bbe9b7c98bb5324b15fb010a


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