mysql-5.7.34 segfault in net_field_length_size
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-5.7 (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Steps to reproduce this bug (see files attached):
```
$ cat /etc/os-release | grep VERSION=
VERSION="18.04.5 LTS (Bionic Beaver)"
$ mysql --version
mysql Ver 14.14 Distrib 5.7.34, for Linux (x86_64) using EditLine wrapper
$ python server_output.py | nc -vvvlp 3306 &
$ mysql --ssl-mode=DISABLED -h 127.0.0.1 -u root --password=root < stdin.txt
[...]
Segmentation fault (core dumped)
```
ASAN log of crash:
```
ASAN:DEADLYSIGNAL
=======
==141==ERROR: AddressSanitizer: SEGV on unknown address 0x2bf27fffa12e (pc 0x0000004eac0d bp 0x7fffbf34db50 sp 0x7fffbf34d7e8 T0)
==141==The signal is caused by a READ memory access.
#0 0x4eac0c in net_field_
#1 0x4a8b40 in net_field_
#2 0x4a8b40 in read_ok_ex /tmp/deb-
#3 0x4adfd2 in cli_read_
#4 0x4b2b77 in mysql_real_query /tmp/deb-
#5 0x40d11d in server_
#6 0x4075c8 in main /tmp/deb-
#7 0x7f42ceed0bf6 in __libc_start_main (/lib/x86_
#8 0x4093a9 in _start (/mnt/mysql-
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /tmp/deb-
==141==ABORTING
```
Thank you for taking the time to report this bug and helping to make Ubuntu better.
I did reproduce what you mentioned and I got this segfault when running the mysql command:
root@mysql- triage: ~# mysql --ssl-mode=DISABLED -h 127.0.0.1 -u root --password=root < stdin.txt ~ˌ�N��5Ͻ� ;�}mysql_ native_ passworde_ osLinux
_client_ namlibmysql_ pid2890_ client_ version5. 7.34 _platformx86_64
program_ namemysql! select @@version_comment limit 1mysql: Character set '' is not a compiled character set and is not specified in the '/usr/share/ mysql/charsets/ Index.xml' file mysql/charsets/ Index.xml' file mysql/charsets/ Index.xml' file
mysql: [Warning] Using a password on the command line interface can be insecure.
Connection from localhost 57006 received!
����!rootoR�
mysql: Character set '' is not a compiled character set and is not specified in the '/usr/share/
mysql: Character set '' is not a compiled character set and is not specified in the '/usr/share/
Segmentation fault (core dumped)
I did not go deep into debugging this but this does not seem related to a package issue. Have you tried to contact upstream about that? Explaining your goal, what was expected and what did you get. I am marking this bug as Incomplete for now until you provide more info explaining why do you think this is a bug in Ubuntu, when you do that please set the bug status back to New and we will revisit it.