Bug 1186374 (CVE-2021-28902) - VUL-0: CVE-2021-28902: libyang: In function read_yin_container() in libyang <= v1.0.225, it doesn't check whether the value of retval->ext[r] is NULL. In some cases, it can be NULL, which leads to a DoS
Summary: VUL-0: CVE-2021-28902: libyang: In function read_yin_container() in libyang <...
Status: RESOLVED FIXED
Alias: CVE-2021-28902
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P2 - High : Major
Target Milestone: ---
Assignee: Martin Hauke
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/298856/
Whiteboard: CVSSv3.1:SUSE:CVE-2021-28902:7.5:(AV:...
Keywords:
Depends on:
Blocks: CVE-2021-28906
  Show dependency treegraph
 
Reported: 2021-05-24 08:52 UTC by Gianluca Gabrielli
Modified: 2024-05-23 09:44 UTC (History)
5 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gianluca Gabrielli 2021-05-24 08:52:55 UTC
CVE-2021-28902

In function read_yin_container() in libyang <= v1.0.225, it doesn't check
whether the value of retval->ext[r] is NULL. In some cases, it can be NULL,
which leads to the operation of retval->ext[r]->flags that results in a crash.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-28902
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-28902
https://github.com/CESNET/libyang/issues/1454
Comment 1 Gianluca Gabrielli 2021-05-24 08:53:54 UTC
Affected packages:

 - SUSE:SLE-15-SP3:Update/libyang  1.0.184
 - openSUSE:Factory/libyang        1.0.184

Upstream patch [0].

[0] https://github.com/CESNET/libyang/commit/a3917d95d516e3de267d3cfa5d4d3715a90e8777.patch
Comment 2 Thomas Leroy 2022-08-10 14:36:33 UTC
(In reply to Gianluca Gabrielli from comment #1)
> Affected packages:
> 
>  - SUSE:SLE-15-SP3:Update/libyang  1.0.184

Hi, could you please provide a fix for this bug? :)
Comment 7 Petr Gajdos 2022-09-08 13:02:58 UTC
Thanks to Danilo Spinella, done for 15sp3/libyang. Reassigning to openSUSE maintainer.

When done, please reassign to security-team@suse.de.

Might be that libyang in Factory is not affected at all. Could you please help us by stating this fact in *.changes file?
Comment 8 Swamp Workflow Management 2022-09-12 10:23:27 UTC
SUSE-SU-2022:3245-1: An update that fixes four vulnerabilities is now available.

Category: security (important)
Bug References: 1186374,1186375,1186376,1186378
CVE References: CVE-2021-28902,CVE-2021-28903,CVE-2021-28904,CVE-2021-28906
JIRA References: 
Sources used:
openSUSE Leap 15.4 (src):    libyang-1.0.184-150300.3.6.1
openSUSE Leap 15.3 (src):    libyang-1.0.184-150300.3.6.1
SUSE Linux Enterprise Module for Server Applications 15-SP4 (src):    libyang-1.0.184-150300.3.6.1
SUSE Linux Enterprise Module for Server Applications 15-SP3 (src):    libyang-1.0.184-150300.3.6.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 10 Alexander Bergmann 2024-05-23 09:44:58 UTC
Closing bug as resolved.