[tor-bugs] #19647 [Core Tor/Tor]: HS Descriptors should only contain UTF-8 (was: HS Descriptors should only contain printable ASCII)

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Aug 29 03:55:14 UTC 2018


#19647: HS Descriptors should only contain UTF-8
---------------------------------------+----------------------------------
 Reporter:  teor                       |          Owner:  neel
     Type:  enhancement                |         Status:  assigned
 Priority:  Medium                     |      Milestone:  Tor: unspecified
Component:  Core Tor/Tor               |        Version:
 Severity:  Normal                     |     Resolution:
 Keywords:  tor-hs,  prop224, prop285  |  Actual Points:
Parent ID:  #24033                     |         Points:
 Reviewer:                             |        Sponsor:  SponsorR-can
---------------------------------------+----------------------------------
Changes (by teor):

 * keywords:  tor-hs,  prop224 => tor-hs,  prop224, prop285


Old description:

> In #18938, we discovered some relays publishing platform lines or
> extrainfo documents with non-ASCII characters.
>
> This seems to occur due to memory corruption.
>
> So let's make sure that a non-ASCII check is done on:
> * hidden services: unencrypted or encrypted descriptor
> * HSDirs: encrypted descriptor
> * clients: unencrypted or encrypted descriptor
>
> This might require a spec change - it's likely implicit in the spec
> already.
>
> For completeness, the set of printable ASCII characters is defined in
> dir-spec.txt as:
> {{{
>     NL = The ascii LF character (hex value 0x0a).
>     KeywordChar ::= 'A' ... 'Z' | 'a' ... 'z' | '0' ... '9' | '-'
>     ArgumentChar ::= any printing ASCII character except NL.
>     WS = (SP | TAB)+
> }}}
>
> Where I assume "printing ASCII" means "space to tilde", but we should
> also clarify that in the torspec.

New description:

 In #18938, we discovered some relays publishing platform lines or
 extrainfo documents with non-ASCII characters.

 This seems to occur due to memory corruption.

 So let's make sure that a ~~non-ASCII~~ UTF-8 check is done on:
 * hidden services: unencrypted or encrypted descriptor
 * HSDirs: encrypted descriptor
 * clients: unencrypted or encrypted descriptor

 See
 https://gitweb.torproject.org/torspec.git/tree/proposals/285-utf-8.txt#n45

 ~~This might require a spec change - it's likely implicit in the spec
 already.~~

 ~~For completeness, the set of printable ASCII characters is defined in
 dir-spec.txt ... Where I assume "printing ASCII" means "space to tilde",
 but we should also clarify that in the torspec.~~

--

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/19647#comment:17>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list