all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Giovanni Biscuolo <g@xelera.eu>
To: guix-devel@gnu.org
Subject: "Trojan Source" (CVE-2021-42574 and CVE-2021-42694): can 'guix lint' help someway?
Date: Mon, 01 Nov 2021 12:30:38 +0100	[thread overview]
Message-ID: <87fssgi04h.fsf@xelera.eu> (raw)

[-- Attachment #1: Type: text/plain, Size: 2214 bytes --]

Hello,

as probably many of you have discovered, today was announced two new
vulnerabilities that exploits the "bidirectional override" Unicode
codepoints feature, making it possible to hide malicious source code in
comments and literal strings /if/ the code review tool (e.g. editor)
does not show this.

The details are published here: https://www.trojansource.codes/

Also see related CVEs:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-42574
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-42694

I know that mitigations and patching of compilers and interpreters must
be done upstream and not much can be done by Guix, but I'm asking /if/
Guix could help code reviewers enhancing its lint function.

For example, the Rust security advisory for rustc [1] states:

--8<---------------cut here---------------start------------->8---

## Mitigations 

[...] If you can't upgrade your compiler version, or your codebase also
includes non-Rust source code files, we recommend periodically checking
that the following codepoints are not present in your repository and
your dependencies: U+202A, U+202B, U+202C, U+202D, U+202E, U+2066,
U+2067, U+2068, U+2069.

## Timeline of events 

* 2021-07-25: we received the report and started working on a fix. 
* 2021-09-14: the date for the embargo lift (2021-11-01) is communicated to us. 
* 2021-10-17: performed an analysis of all the source code ever published to 
crates.io to check for the presence of this attack. 
* 2021-11-01: embargo lifts, the vulnerability is disclosed and Rust 1.56.1 is 
released. 

--8<---------------cut here---------------end--------------->8---

Is there a way for "guix lint" to check for the listed (other?)
"dangerous" codepoints and warn code reviewers?

Is it possible for the Guix community to start a coordinated effort to
analyze all the source code (ever?!?) published in out git repo to check
for the presence of this attack?

AFAIU there is not much Guix can do for the "Homoglyph attacks"
(CVE-2021-42694).

WDYT?

Happi hacking! Gio'


[1] https://www.openwall.com/lists/oss-security/2021/11/01/1

-- 
Giovanni Biscuolo

Xelera IT Infrastructures

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]

             reply	other threads:[~2021-11-01 11:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-01 11:30 Giovanni Biscuolo [this message]
2021-11-01 13:38 ` "Trojan Source" (CVE-2021-42574 and CVE-2021-42694): can 'guix lint' help someway? Leo Famulari
2021-11-01 15:04   ` Bengt Richter
2021-11-09 17:05 ` Ludovic Courtès
2021-11-15 17:20   ` zimoun
2021-11-16 10:06   ` Giovanni Biscuolo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fssgi04h.fsf@xelera.eu \
    --to=g@xelera.eu \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.