02 Feb 2023
Planet Grep
Xavier Mertens: This Blog Has 20 Years!
Twenty years ago… I decided to start a blog to share my thoughts! That's why I called it "/dev/random". How was the Internet twenty years ago? Well, they were good things and bad ones…
With the years, the blog content evolved, and I wrote a lot of technical stuff related to my job, experiences, tools, etc. Then, I had the opportunity to attend a lot of security conferences and started to write wrap-ups. With COVID, fewer conferences and no more reviews. For the last few months, I'm mainly writing diaries for the Internet Storm Center therefore, I publish less private stuff here, and just relay the content published on the ISC website. If you have read my stuff for a long time (or even if you are a newcomer), thank you very much!
A few stats about the site:
- 2056 articles
- 20593 pictures
- 5538 unique visitors to the RSS feed in the last 30 days
- 85000 hits/day on average (bots & attacks included ?)
I know that these numbers might seem low for many of you but I'm proud of them!
The post This Blog Has 20 Years! appeared first on /dev/random.
02 Feb 2023 8:19pm GMT
Koen Vervloesem: How to stop brltty from claiming your USB UART interface on Linux
Today I wanted to program an ESP32 development board, the ESP-Pico-Kit v4, but when I connected it to my computer's USB port, the serial connection didn't appear in Linux. Suspecting a hardware issue, I tried another ESP32 board, the ESP32-DevKitC v4, but this didn't appear either, so then I tried another one, a NodeMCU ESP8266 board, which had the same problem. Time to investigate...
The dmesg
output looked suspicious:
[14965.786079] usb 1-1: new full-speed USB device number 5 using xhci_hcd [14965.939902] usb 1-1: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00 [14965.939915] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [14965.939920] usb 1-1: Product: CP2102 USB to UART Bridge Controller [14965.939925] usb 1-1: Manufacturer: Silicon Labs [14965.939929] usb 1-1: SerialNumber: 0001 [14966.023629] usbcore: registered new interface driver usbserial_generic [14966.023646] usbserial: USB Serial support registered for generic [14966.026835] usbcore: registered new interface driver cp210x [14966.026849] usbserial: USB Serial support registered for cp210x [14966.026881] cp210x 1-1:1.0: cp210x converter detected [14966.031460] usb 1-1: cp210x converter now attached to ttyUSB0 [14966.090714] input: PC Speaker as /devices/platform/pcspkr/input/input18 [14966.613388] input: BRLTTY 6.4 Linux Screen Driver Keyboard as /devices/virtual/input/input19 [14966.752131] usb 1-1: usbfs: interface 0 claimed by cp210x while 'brltty' sets config #1 [14966.753382] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0 [14966.754671] cp210x 1-1:1.0: device disconnected
So the ESP32 board, with a Silicon Labs, CP2102 USB to UART controller chip, was recognized, and it was attached to the /dev/ttyUSB0
device, as it should normally do. But then suddenly the brltty
command intervened and disconnected the serial device.
I looked up what brltty is doing, and apparently this is a system daemon that provides access to the console for a blind person using a braille display. When looking into the contents of the package on my Ubuntu 22.04 system (with dpkg -L brltty
), I saw a udev rules file, so I grepped for the product ID of my USB device in the file:
$ grep ea60 /lib/udev/rules.d/85-brltty.rules ENV{PRODUCT}=="10c4/ea60/*", ATTRS{manufacturer}=="Silicon Labs", ENV{BRLTTY_BRAILLE_DRIVER}="sk", GOTO="brltty_usb_run"
Looking at the context, this file shows:
# Device: 10C4:EA60 # Generic Identifier # Vendor: Cygnal Integrated Products, Inc. # Product: CP210x UART Bridge / myAVR mySmartUSB light # BrailleMemo [Pocket] # Seika [Braille Display] ENV{PRODUCT}=="10c4/ea60/*", ATTRS{manufacturer}=="Silicon Labs", ENV{BRLTTY_BRAILLE_DRIVER}="sk", GOTO="brltty_usb_run"
So apparently there's a Braille display with the same CP210x USB to UART controller as a lot of microcontroller development boards have. And because this udev rule claims the interface for the brltty daemon, UART communication with all these development boards isn't possible anymore.
As I'm not using these Braille displays, the fix for me was easy: just find the systemd unit that loads these rules, mask and stop it.
$ systemctl list-units | grep brltty brltty-udev.service loaded active running Braille Device Support $ sudo systemctl mask brltty-udev.service Created symlink /etc/systemd/system/brltty-udev.service → /dev/null. $ sudo systemctl stop brltty-udev.service
After this, I was able to use the serial interface again on all my development boards.
02 Feb 2023 8:19pm GMT
Frederic Descamps: MySQL 8.0.32: thank you for the contributions
The latest MySQL release has been published on January 17th, 2023. MySQL 8.0.32 contains some new features and bug fixes. As usual, it also contains contributions from our great MySQL Community.
I would like to thank all contributors on behalf of the entire Oracle MySQL team !
MySQL 8.0.32 contains patches from Facebook/Meta, Alexander Reinert, Luke Weber, Vilnis Termanis, Naoki Someya, Maxim Masiutin, Casa Zhang from Tencent, Jared Lundell, Zhe Huang, Rahul Malik from Percona, Andrey Turbanov, Dimitry Kudryavtsev, Marcelo Altmann from Percona, Sander van de Graaf, Kamil Holubicki from Percona, Laurynas Biveinis, Seongman Yang, Yamasaki Tadashi, Octavio Valle, Zhao Rong, Henning Pöttker, Gabrielle Gervasi and Nico Pay.
Here is the list of the above contributions and related bugs, we can see that for this release, our connectors got several contributions, always a good sign of their increasing popularity.
We can also notice the return of a major contributor: Laurynas Biveinis!
Connectors
Connector / NET
- #74392 - Support to use (Memory-)Stream for bulk loading data - Alexander Reinert
- #108837 - Fix unloading issues - Gabriele Gervasi
Connector / Python
- #81572 - Allow MySQLCursorPrepared.execute() to accept %(key_name)s in operations and dic - Luke Weber
- #81573 - Add MySQLCursorPreparedDict option - Luke Weber
- #82366 - Waning behaviour improvements - Vilnis Termanis
- #89345 - Reduce callproc roundtrip time - Vilnis Termanis
- #90862 - C extension - Fix multiple reference leaks - Vilnis Termanis
- #96280 - prepared cursor failed to fetch/decode result of varbinary columns - Naoki Someya
- #103488 - Stubs (.pyi) for type definition for connection and cursor objects - Maxim Masiutin
- #108076 - If extra init_command options are given for the Django connector, load them - Sander van de Graaf
- #108733 - python connector will return a date object when time is 00:00:00 - Zhao Rong
Connector / J
- #104954 - MysqlDataSource fails to URL encode database name when constructing JDBC URL - Jared Lundell
- #106252 - Connector/J client hangs after prepare & execute process with old version server - Zhe Huang
- #106981 - Remove superfluous use of boxing - Andrey Turbanov
- #108414 - Malformed packet generation for
COM_STMT_EXECUTE
- Seongman Yang - #108419 - Recognize "ON DUPLICATE KEY UPDATE" in "INSERT SET" Statement - Yamasaki Tadashi
- #108814 - Fix name of relocation POM file - Henning Pöttker
Connector / C++
- #108652 - Moving a local object in a return statement prevents copy elision - Octavio Valle
Clients & API
- C API (client library) Fix sha256_password_auth_client_nonblocking - Facebook
- #105761 - mysqldump make a non-consistent backup with -single-transaction option - Marcelo Altmann
- #108861 - Fix typo in dba.upgradeMetadata() error message (Shell AdminAPI) - Nico Pay
Replication
- Fix race between binlog sender heartbeat timeout - Facebook
InnoDB and Clone
- #106616 (private) - 8.0 upgrade (from 5.6) crashes with Assertion failure - Rahul Malik
- #107854 (private) - Assertion failure: dict0mem.h - Marcelo Altmann
- #108111 - Garbled UTF characters in SHOW ENGINE INNODB STATUS - Kamil Holubicki
- #108317 - clone_os_copy_file_to_buf partial read handling completely broken - Laurynas Biveinis
Optimizer
- #104934 (private) - Statement crash - Casa Zhang
- #107633 - Fixing a type-o, should be "truncate" - Dimitry Kudryavtsev
If you have patches and you also want to be part of the MySQL Contributors, it's easy, you can send Pull Requests from MySQL's GitHub repositories or send your patches on Bugs MySQL (signing the Oracle Contributor Agreement is required).
Thank you again to all our contributors !
02 Feb 2023 8:19pm GMT