diff options
author | Johan Hovold <johan@kernel.org> | 2021-09-22 13:30:59 +0200 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2021-09-23 10:44:46 +0200 |
commit | c32dfec6c1c36bbbcd5d33e949d99aeb215877ec (patch) | |
tree | 14971e36fed1195c07ea895061b15ad84f98f665 /init | |
parent | 1ca200a8c6f079950a04ea3c3380fe8cf78e95a2 (diff) | |
download | linux-c32dfec6c1c36bbbcd5d33e949d99aeb215877ec.tar.gz linux-c32dfec6c1c36bbbcd5d33e949d99aeb215877ec.tar.bz2 linux-c32dfec6c1c36bbbcd5d33e949d99aeb215877ec.zip |
USB: serial: cp210x: fix dropped characters with CP2102
Some CP2102 do not support event-insertion mode but return no error when
attempting to enable it.
This means that any event escape characters in the input stream will not
be escaped by the device and consequently regular data may be
interpreted as escape sequences and be removed from the stream by the
driver.
The reporter's device has batch number DCL00X etched into it and as
discovered by the SHA2017 Badge team, counterfeit devices with that
marking can be detected by sending malformed vendor requests. [1][2]
Tests confirm that the possibly counterfeit CP2102 returns a single byte
in response to a malformed two-byte part-number request, while an
original CP2102 returns two bytes. Assume that every CP2102 that behaves
this way also does not support event-insertion mode (e.g. cannot report
parity errors).
[1] https://mobile.twitter.com/sha2017badge/status/1167902087289532418
[2] https://hackaday.com/2017/08/14/hands-on-with-the-shacamp-2017-badge/#comment-3903376
Reported-by: Malte Di Donato <malte@neo-soft.org>
Tested-by: Malte Di Donato <malte@neo-soft.org>
Fixes: a7207e9835a4 ("USB: serial: cp210x: add support for line-status events")
Cc: stable@vger.kernel.org # 5.9
Link: https://lore.kernel.org/r/20210922113100.20888-1-johan@kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions