Bug 2005819 (CVE-2021-42574) - CVE-2021-42574 Developer environment: Unicode's bidirectional (BiDi) override characters can cause trojan source attacks
Summary: CVE-2021-42574 Developer environment: Unicode's bidirectional (BiDi) override...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2021-42574
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: 2009282 2009283 2009285 2008380 2008381 2008382 2008383 2008384 2008385 2008388 2008389 2008390 2008391 2008392 2008393 2009163 2009164 2009165 2009166 2009167 2009168 2009169 2009170 2009171 2009172 2009173 2009174 2009175 2009176 2009177 2009178 2009179 2009180 2009181 2009182 2009183 2009184 2009185 2009186 2009187 2009188 2009190 2009195 2009247 2009248 2009249 2009250 2009251 2009252 2009259 2009260 2009261 2009262 2009263 2009272 2009273 2009274 2009275 2009276 2009277 2009284 2009286 2009287 2011665 2016236 2016237 2016238 2016239 2016240 2016241 2016242 2016243 2016244 2016245 2017359 2017360 2017361 2017362 2017363 2017364 2017365 2017366 2017367 2017368 2017779 2017780 2017781 2017782 2017783 2017816 2017817 2017818 2017819 2017820 2018682 2018683 2018684 2018685 2018686 2018687 2018848 2018849 2018850 2018860 2019361 2023658 2023676
Blocks: 2002822
TreeView+ depends on / blocked
 
Reported: 2021-09-20 09:19 UTC by Huzaifa S. Sidhpurwala
Modified: 2023-09-26 18:31 UTC (History)
117 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the way Unicode standards are implemented in the context of development environments, which have specialized requirements for rendering text. An attacker could exploit this to deceive a human reviewer by creating a malicious patch containing well placed BiDi characters. The special handling and rendering of those characters can be then used in an attempt to hide unexpected and potentially dangerous behaviour from the reviewer.
Clone Of:
Environment:
Last Closed: 2021-11-01 08:07:51 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 103026 0 P3 ASSIGNED Implement warning for Unicode bidi override characters [CVE-2021-42574] 2021-11-01 15:23:59 UTC
GNU Compiler Collection 103027 0 P3 NEW Implement warning for homoglyphs in identifiers [CVE-2021-42694] 2021-11-01 15:23:59 UTC
Red Hat Product Errata RHBA-2021:4696 0 None None None 2021-11-17 03:11:07 UTC
Red Hat Product Errata RHBA-2021:4746 0 None None None 2021-11-18 18:41:24 UTC
Red Hat Product Errata RHBA-2021:4747 0 None None None 2021-11-18 19:06:20 UTC
Red Hat Product Errata RHBA-2021:4753 0 None None None 2021-11-22 08:38:03 UTC
Red Hat Product Errata RHBA-2021:4754 0 None None None 2021-11-22 11:53:15 UTC
Red Hat Product Errata RHBA-2021:4755 0 None None None 2021-11-22 12:29:01 UTC
Red Hat Product Errata RHBA-2021:4892 0 None None None 2021-12-01 09:01:58 UTC
Red Hat Product Errata RHBA-2021:4894 0 None None None 2021-12-01 11:12:14 UTC
Red Hat Product Errata RHBA-2021:4895 0 None None None 2021-12-01 11:56:36 UTC
Red Hat Product Errata RHBA-2021:4896 0 None None None 2021-12-01 11:59:05 UTC
Red Hat Product Errata RHBA-2021:4898 0 None None None 2021-12-01 13:08:17 UTC
Red Hat Product Errata RHBA-2021:4906 0 None None None 2021-12-01 21:21:49 UTC
Red Hat Product Errata RHBA-2021:4931 0 None None None 2021-12-06 02:04:07 UTC
Red Hat Product Errata RHBA-2021:4986 0 None None None 2021-12-07 15:05:45 UTC
Red Hat Product Errata RHBA-2021:4987 0 None None None 2021-12-07 15:34:19 UTC
Red Hat Product Errata RHBA-2021:5031 0 None None None 2021-12-08 17:23:36 UTC
Red Hat Product Errata RHBA-2021:5037 0 None None None 2021-12-08 21:29:10 UTC
Red Hat Product Errata RHBA-2021:5040 0 None None None 2021-12-09 09:19:39 UTC
Red Hat Product Errata RHBA-2021:5041 0 None None None 2021-12-09 12:04:03 UTC
Red Hat Product Errata RHBA-2021:5042 0 None None None 2021-12-09 12:04:23 UTC
Red Hat Product Errata RHBA-2021:5043 0 None None None 2021-12-09 12:04:50 UTC
Red Hat Product Errata RHBA-2021:5049 0 None None None 2021-12-09 13:04:00 UTC
Red Hat Product Errata RHBA-2021:5050 0 None None None 2021-12-09 13:04:45 UTC
Red Hat Product Errata RHBA-2021:5052 0 None None None 2021-12-09 13:59:05 UTC
Red Hat Product Errata RHBA-2021:5104 0 None None None 2021-12-14 09:36:16 UTC
Red Hat Product Errata RHBA-2022:0016 0 None None None 2022-01-04 16:32:40 UTC
Red Hat Product Errata RHSA-2021:4033 0 None None None 2021-11-01 08:11:36 UTC
Red Hat Product Errata RHSA-2021:4034 0 None None None 2021-11-01 08:03:09 UTC
Red Hat Product Errata RHSA-2021:4035 0 None None None 2021-11-01 07:56:36 UTC
Red Hat Product Errata RHSA-2021:4036 0 None None None 2021-11-01 07:44:22 UTC
Red Hat Product Errata RHSA-2021:4037 0 None None None 2021-11-01 07:42:01 UTC
Red Hat Product Errata RHSA-2021:4038 0 None None None 2021-11-01 07:42:26 UTC
Red Hat Product Errata RHSA-2021:4039 0 None None None 2021-11-01 07:54:36 UTC
Red Hat Product Errata RHSA-2021:4585 0 None None None 2021-11-10 09:02:51 UTC
Red Hat Product Errata RHSA-2021:4586 0 None None None 2021-11-10 09:18:30 UTC
Red Hat Product Errata RHSA-2021:4587 0 None None None 2021-11-10 09:52:41 UTC
Red Hat Product Errata RHSA-2021:4588 0 None None None 2021-11-10 08:59:20 UTC
Red Hat Product Errata RHSA-2021:4589 0 None None None 2021-11-10 09:10:44 UTC
Red Hat Product Errata RHSA-2021:4590 0 None None None 2021-11-10 11:01:42 UTC
Red Hat Product Errata RHSA-2021:4591 0 None None None 2021-11-10 09:46:18 UTC
Red Hat Product Errata RHSA-2021:4592 0 None None None 2021-11-10 09:45:06 UTC
Red Hat Product Errata RHSA-2021:4593 0 None None None 2021-11-10 09:44:34 UTC
Red Hat Product Errata RHSA-2021:4594 0 None None None 2021-11-10 09:44:05 UTC
Red Hat Product Errata RHSA-2021:4595 0 None None None 2021-11-10 09:52:56 UTC
Red Hat Product Errata RHSA-2021:4596 0 None None None 2021-11-10 10:38:03 UTC
Red Hat Product Errata RHSA-2021:4598 0 None None None 2021-11-10 10:21:27 UTC
Red Hat Product Errata RHSA-2021:4599 0 None None None 2021-11-10 09:12:43 UTC
Red Hat Product Errata RHSA-2021:4600 0 None None None 2021-11-10 09:35:36 UTC
Red Hat Product Errata RHSA-2021:4601 0 None None None 2021-11-10 09:45:17 UTC
Red Hat Product Errata RHSA-2021:4602 0 None None None 2021-11-10 09:55:09 UTC
Red Hat Product Errata RHSA-2021:4649 0 None None None 2021-11-15 10:26:00 UTC
Red Hat Product Errata RHSA-2021:4669 0 None None None 2021-11-15 11:47:46 UTC
Red Hat Product Errata RHSA-2021:4694 0 None None None 2021-11-16 11:32:39 UTC
Red Hat Product Errata RHSA-2021:4723 0 None None None 2021-11-17 16:17:53 UTC
Red Hat Product Errata RHSA-2021:4724 0 None None None 2021-11-17 16:55:39 UTC
Red Hat Product Errata RHSA-2021:4729 0 None None None 2021-11-18 10:01:47 UTC
Red Hat Product Errata RHSA-2021:4730 0 None None None 2021-11-18 10:06:25 UTC
Red Hat Product Errata RHSA-2021:4743 0 None None None 2021-11-18 17:44:12 UTC

Description Huzaifa S. Sidhpurwala 2021-09-20 09:19:11 UTC
A flaw was found in the way Unicode standards are implemented in the context of development environments, which have specialized requirements for rendering text. An attacker could exploit this to deceive a human reviewer by creating a malicious patch containing well-placed BiDi characters. The special handling and rendering of those characters can be then used in an attempt to hide unexpected and potentially dangerous behavior from the reviewer.

Unicode’s Directional Formatting Characters (‘BiDi’) are invisible characters that switch the display ordering of one or more characters. BiDi overrides cause characters to display in a different order from that in which they are written.

Comment 171 Huzaifa S. Sidhpurwala 2021-11-01 00:33:26 UTC
Created annobin tracking bugs for this issue:

Affects: fedora-all [bug 2018850]


Created binutils tracking bugs for this issue:

Affects: fedora-all [bug 2018848]


Created gcc tracking bugs for this issue:

Affects: fedora-all [bug 2018849]

Comment 173 errata-xmlrpc 2021-11-01 07:41:56 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.3 Advanced Update Support

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

Comment 174 errata-xmlrpc 2021-11-01 07:42:21 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.2 Advanced Update Support

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

Comment 175 errata-xmlrpc 2021-11-01 07:44:19 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.4 Advanced Update Support

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

Comment 176 errata-xmlrpc 2021-11-01 07:54:32 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS

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

Comment 177 errata-xmlrpc 2021-11-01 07:56:33 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.6 Advanced Update Support
  Red Hat Enterprise Linux 7.6 Update Services for SAP Solutions
  Red Hat Enterprise Linux 7.6 Telco Extended Update Support

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

Comment 178 errata-xmlrpc 2021-11-01 08:03:05 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.7 Advanced Update Support
  Red Hat Enterprise Linux 7.7 Update Services for SAP Solutions
  Red Hat Enterprise Linux 7.7 Telco Extended Update Support

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

Comment 179 Product Security DevOps Team 2021-11-01 08:07:51 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-42574

Comment 180 errata-xmlrpc 2021-11-01 08:11:33 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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

Comment 181 Dave Malcolm 2021-11-01 14:22:37 UTC
I've posted a script "utf8-dump.py" to upstream GCC:
  https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583024.html
to make it easier to grok encoding issues in source files, and, in particular, the difference between visual and logical order in bidirectional files.

I've committed this patch to upstream GCC (for GCC 12):
  https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583020.html
    https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=bd5e882cf6e0def3dd1bc106075d59a303fe0d1e
which improves the UX for diagnostics involving Unicode encoding issues (but this patch does *not* itself directly detect them).  Unfortunately it's nontrivial to backport to earlier GCC releases.

Comment 182 Dave Malcolm 2021-11-01 15:10:46 UTC
Upstream GCC bugs:
  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103026 ("Implement warning for Unicode bidi override characters [CVE-2021-42574]")
  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103027 ("Implement warning for homoglyphs in identifiers [CVE-2021-42694]")

Comment 184 errata-xmlrpc 2021-11-10 08:59:13 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.4 Extended Update Support

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

Comment 185 errata-xmlrpc 2021-11-10 09:02:46 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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

Comment 186 errata-xmlrpc 2021-11-10 09:10:37 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.4 Extended Update Support

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

Comment 187 errata-xmlrpc 2021-11-10 09:12:39 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.1 Extended Update Support

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

Comment 188 errata-xmlrpc 2021-11-10 09:18:26 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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

Comment 189 errata-xmlrpc 2021-11-10 09:35:32 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.2 Extended Update Support

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

Comment 190 errata-xmlrpc 2021-11-10 09:43:59 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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

Comment 191 errata-xmlrpc 2021-11-10 09:44:27 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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

Comment 192 errata-xmlrpc 2021-11-10 09:45:00 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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

Comment 193 errata-xmlrpc 2021-11-10 09:45:12 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.2 Extended Update Support

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

Comment 194 errata-xmlrpc 2021-11-10 09:46:14 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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

Comment 195 errata-xmlrpc 2021-11-10 09:52:36 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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

Comment 196 errata-xmlrpc 2021-11-10 09:52:52 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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

Comment 197 errata-xmlrpc 2021-11-10 09:55:05 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.1 Extended Update Support

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

Comment 198 errata-xmlrpc 2021-11-10 10:21:21 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.4 Extended Update Support

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

Comment 199 errata-xmlrpc 2021-11-10 10:37:58 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.4 Extended Update Support

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

Comment 200 errata-xmlrpc 2021-11-10 11:01:36 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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

Comment 201 errata-xmlrpc 2021-11-15 10:25:54 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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

Comment 202 errata-xmlrpc 2021-11-15 11:47:42 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS

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

Comment 205 errata-xmlrpc 2021-11-16 11:32:32 UTC
This issue has been addressed in the following products:

  Red Hat Developer Tools

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

Comment 206 errata-xmlrpc 2021-11-17 16:17:47 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS

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

Comment 207 errata-xmlrpc 2021-11-17 16:55:34 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS

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

Comment 208 errata-xmlrpc 2021-11-18 10:01:42 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS

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

Comment 209 errata-xmlrpc 2021-11-18 10:06:19 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS

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

Comment 210 errata-xmlrpc 2021-11-18 17:44:08 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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


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