Bug 1938291 (CVE-2021-28153) - CVE-2021-28153 glib: g_file_replace() with G_FILE_CREATE_REPLACE_DESTINATION creates empty target for dangling symlink
Summary: CVE-2021-28153 glib: g_file_replace() with G_FILE_CREATE_REPLACE_DESTINATION ...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2021-28153
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1938292 1938293 1938294 1938295 1939116 1939117 1939118 1939119 1939120
Blocks: 1938296
TreeView+ depends on / blocked
 
Reported: 2021-03-12 17:21 UTC by Guilherme de Almeida Suckevicz
Modified: 2022-11-15 11:10 UTC (History)
29 users (show)

Fixed In Version: glib 2.67.6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 19:52:15 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:4385 0 None None None 2021-11-09 18:32:50 UTC
Red Hat Product Errata RHSA-2022:8418 0 None None None 2022-11-15 11:09:59 UTC

Description Guilherme de Almeida Suckevicz 2021-03-12 17:21:58 UTC
An issue was discovered in GNOME GLib before 2.66.8. When g_file_replace() is used with G_FILE_CREATE_REPLACE_DESTINATION to replace a path that is a dangling symlink, it incorrectly also creates the target of the symlink as an empty file, which could conceivably have security relevance if the symlink is attacker-controlled. (If the path is a symlink to a file that already exists, then the contents of that file correctly remain unchanged.)

References:
https://gitlab.gnome.org/GNOME/glib/-/issues/2325

Comment 1 Guilherme de Almeida Suckevicz 2021-03-12 17:22:34 UTC
Created glib tracking bugs for this issue:

Affects: epel-7 [bug 1938293]
Affects: fedora-all [bug 1938292]


Created glib2 tracking bugs for this issue:

Affects: fedora-all [bug 1938294]


Created mingw-glib2 tracking bugs for this issue:

Affects: fedora-all [bug 1938295]

Comment 4 juneau 2021-03-22 15:04:18 UTC
Marking all Hosted* as "notaffected" as this appears to be limited to GNOME which is not present.

Comment 6 errata-xmlrpc 2021-11-09 18:32:48 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:4385 https://access.redhat.com/errata/RHSA-2021:4385

Comment 7 Product Security DevOps Team 2021-11-09 19:52:12 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2021-28153

Comment 8 errata-xmlrpc 2022-11-15 11:09:57 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2022:8418 https://access.redhat.com/errata/RHSA-2022:8418


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