argotorg / argotorg/solidity

Disallow isolate Unicode characters in comments and strings

Open
#13,936 4 comments 0 reactions 0 assignees View on GitHub
breaking change :warning: bug :bug: low effort medium impact must have eventually
Dominant language
C++
Stars
25.7k
Forks
6.2k
Avg merge
2d 19h
Merged PRs (30d)
29

Description

Part of #10254.

### Description
As shown in [Security advisory for rustc (CVE-2021-42574)](https://blog.rust-lang.org/2021/11/01/cve-2021-42574.html), the isolate Unicode characters (LRI, RLI, FSI, PDI) can be used to take bit of text out of context and show it at the beginning or end of the line. We should disallow them to prevent this.

We have already disallowed unbalanced BiDi embedding/override characters in #10326. This is unfortunately not effective against the trick described here.

See [How to use Unicode controls for bidi text](https://www.w3.org/International/questions/qa-bidi-unicode-controls) for details on how these characters work.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the related issues #10254 and #10326, then read the linked Rust security advisory and W3C bidi guidance. Done means isolate Unicode characters LRI, RLI, FSI, and PDI are disallowed in comments and strings without relying on the earlier unbalanced-character check.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, solidity
Domain
compilers, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.