summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'mariadb-5.5.62' into 5.5-galeramariadb-galera-5.5.62Jan Lindström2018-10-291-2/+2
|\
| * MDEV-17248 Improve ASAN memory pool instrumentationEugene Kosov2018-09-211-2/+2
| | | | | | | | | | alloc_root(): unpoison only requested amount of bytes instead of a possible bigger aligned-sized buffer.
* | Merge tag 'mariadb-5.5.61' into 5.5-galeraJan Lindström2018-08-011-1/+1
|\ \ | |/
| * Merge remote-tracking branch 'mysql/5.5' into 5.5Oleksandr Byelkin2018-07-291-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | We do not accept: 1. We did not have this problem (fixed earlier and better) d982e717aba67227ec40761a21a4211db91aa0e2 Bug#27510150: MYSQLDUMP FAILS FOR SPECIFIC --WHERE CLAUSES 2. We do not have such options (an DBUG_ASSERT put just in case) bbc2e37fe4e0ca3a7cfa1437a763dc43829e98e2 Bug#27759871: BACKRONYM ISSUE IS STILL IN MYSQL 5.7 3. Serg fixed it in other way in this release: e48d775c6f066add457fa8cfb2ebc4d5ff0c7613 Bug#27980823: HEAP OVERFLOW VULNERABILITIES IN MYSQL CLIENT LIBRARY
| | * Bug#27759871: BACKRONYM ISSUE IS STILL IN MYSQL 5.7Arun Kuruvila2018-05-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description:- Client applications establishes connection to server, which does not support SSL, via TCP even when SSL is enforced via MYSQL_OPT_SSL_MODE or MYSQL_OPT_SSL_ENFORCE or MYSQL_OPT_SSL_VERIFY_SERVER_CERT. Analysis:- There exist no error handling for catching client applications which enforces SSL connection to connect to a server which does not support SSL. Fix:- Error handling is done to catch above mentioned scenarios.
* | | Merge tag 'mariadb-5.5.60' into 5.5-galeraJan Lindström2018-04-245-7/+25
|\ \ \ | |/ /
| * | Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2018-04-192-2/+2
| |\ \ | | |/
| | * Bug#25471090: MYSQL USE AFTER FREEArun Kuruvila2018-02-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description:- Mysql client crashes when trying to connect to a fake server which is sending incorrect packets. Analysis:- Mysql client crashes when it tries to read server version details. Fix:- A check is added in "red_one_row()".
| | * Bug#26585560 - MYSQL DAEMON SHOULD CREATE ITS PID FILE ASShishir Jaiswal2017-12-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ROOT DESCRIPTION =========== If the .pid file is created at a world-writable location, it can be compromised by replacing the server's pid with another running server's (or some other non-mysql process) PID causing abnormal behaviour. ANALYSIS ======== In such a case, user should be warned that .pid file is being created at a world-writable location. FIX === A new function is_file_or_dir_world_writable() is defined and it is called in create_pid_file() before .pid file creation. If the location is world-writable, a relevant warning is thrown. NOTE ==== 1. PID file is always created with permission bit 0664, so for outside world its read-only. 2. Ignoring the case when permission is denied to get the dir stats since the .pid file creation would fail anyway in such a case.
| * | honor alignment rules and xtradb tooEugene Kosov2018-03-201-0/+2
| | |
| * | bug: ha_heap was unilaterally increasing reclengthSergei Golubchik2018-02-111-0/+1
| | | | | | | | | | | | | | | | | | | | | proper fix replacing the hack from b80fa4000d6 don't confuse length of the data area (reclength) with the offset to the "deleted" mark.
| * | improve ASAN instrumentation: clangSergei Golubchik2018-01-221-0/+8
| | | | | | | | | | | | translate clang __has_feature to gcc macros
| * | improve ASAN instrumentation: TRASHSergei Golubchik2018-01-221-4/+4
| | | | | | | | | | | | mark freed memory as not accessible, not merely undefined
| * | Correct TRASH() macro usageSergei Golubchik2018-01-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TRASH was mapped to TRASH_FREE and was supposed to be used for memory that should not be accessed anymore, while TRASH_ALLOC() is to be used for uninitialized but to-be-used memory. But sometimes TRASH() was used in the latter sense. Remove TRASH() macro, always use explicit TRASH_ALLOC() or TRASH_FREE().
| * | Fix compilation without dlopenSergei Golubchik2018-01-221-2/+2
| | |
| * | Add dummy defintion for Dl_info in case we're missing dladdrVicențiu Ciorbaru2018-01-191-0/+4
| | |
| * | MDEV-14229: Stack trace is not resolved for shared objectsVicențiu Ciorbaru2018-01-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolving a stacktrace including functions in dynamic libraries requires us to look inside the libraries for the symbols. Addr2line needs to be started with the correct binary for each address on the stack. To do this, figure out which library it is using dladdr, then if the addr2line binary was started with a different binary, fork it again with the correct one. We only have one addr2line process running at any point during the stacktrace resolving step. The maximum number of forks for addr2line should generally be around 6. One for server stacktrace code, one for plugin code, one when going back into server code, one for pthread library, one for libc, one for the _start function in the server. More can come up if plugin calls server function which goes back to a plugin, etc.
* | | MDEV-8743: O_CLOEXEC/SOCK_CLOEXEC defines for non-unix compatibilityNirbhay Choubey2018-03-021-0/+6
| | | | | | | | | | | | From 0f4478105f5027ce589a0f08c6019d906d632029
* | | Merge tag 'mariadb-5.5.59' into 5.5-galeraJan Lindström2018-01-194-18/+23
|\ \ \ | |/ /
| * | Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2018-01-181-1/+1
| |\ \ | | |/
| | * Updated copyright year in user visible textmysql-5.5.59Balasubramanian Kandasamy2017-11-271-1/+1
| | |
| * | compiler warning: my_printf_error() supports printf format extensionsSergei Golubchik2018-01-181-3/+1
| | |
| * | BIT field woesSergei Golubchik2018-01-161-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | * get_rec_bits() was always reading two bytes, even if the bit field contained only of one byte * In various places the code used field->pack_length() bytes starting from field->ptr, while it should be field->pack_length_in_rec() * Field_bit::key_cmp and Field_bit::cmp_max passed field_length as an argument to memcmp(), but field_length is the number of bits!
| * | add support for ASAN instrumentationSergei Golubchik2018-01-161-3/+8
| | |
* | | Merge tag 'mariadb-5.5.57' into 5.5-galeraJan Lindström2017-07-203-4/+6
|\ \ \ | |/ /
| * | Merge remote-tracking branch 'mysql/5.5' into 5.5Sergei Golubchik2017-07-182-1/+2
| |\ \ | | |/
| | * BUG#25451091:CREATE TABLE DATA DIRECTORY / INDEX DIRECTORYNisha Gopalakrishnan2017-05-121-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SYMLINK CHECK RACE CONDITIONS ANALYSIS: ========= A potential defect exists in the handling of CREATE TABLE .. DATA DIRECTORY/ INDEX DIRECTORY which gives way to the user to gain access to another user table or a system table. FIX: ==== The lstat and fstat output of the target files are now stored which help in determining the identity of the target files thus preventing the unauthorized access to other files.
| | * BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING ↵Ramil Kalimullin2017-03-132-2/+5
| | | | | | | | | | | | | | | | | | SSL CONNECTION Changed MYSQL_OPT_SSL_MODE to be the same as in 5.6 (ABI compatibility).
| | * BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING ↵Ramil Kalimullin2017-03-105-9/+19
| | | | | | | | | | | | | | | | | | | | | SSL CONNECTION MYSQL_OPT_SSL_MODE option introduced. It is set in case of --ssl-mode=REQUIRED and permits only SSL connection.
| | * BUG#24807826: UINT3KORR SHOULD STOP READING FOUR INSTEAD OFKarthik Kamath2017-03-091-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | THREE BYTES ON X86 Analysis: ========= The macro uint3korr reads 4 bytes of data instead of 3 on on x86 machines. Multiple definitions were created for this macro for optimization in WIN32. The idea was to optimize reading of 3 byte ints by reading an ordinary int and masking away the unused byte. However this is an undefined behavior. It will be an issue unless users are aware of allocating an extra byte for using this macro. Fix: ==== Removing the definition which reads 4 bytes of data. The only definition of this macro would now read just 3 bytes of data thus prohibiting the usage of an extra byte. Note: ===== This is a backport of Patches #5 and #6 for Bug#17922198.
| * | MDEV-12144 Signal 6 crash corrupts ibd filesSergei Golubchik2017-07-151-3/+2
| | | | | | | | | | | | | | | Avoid using STDERR_FILENO. The server uses freopen(stderr), so stderr can be on any file descriptor.
| * | MDEV-13187 incorrect backslash parsing in clientsSergei Golubchik2017-06-271-0/+2
| | | | | | | | | | | | cover ANSI_QUOTES and NO_BACKSLASH_ESCAPES in mysqltest
* | | Merge tag 'mariadb-5.5.56' into 5.5-galeraSachin Setiya2017-05-032-2/+48
|\ \ \ | |/ /
| * | MDEV-12230 include/my_sys.h:600:43: error: unknown type name ↵Sergei Golubchik2017-04-202-2/+48
| | | | | | | | | | | | | | | | | | ‘PSI_file_key’" when -DWITHOUT_SERVER=1 cherry-pick 2c2bd8c155 (MDEV-12261 build failure without P_S) from 10.0
* | | Merge tag 'mariadb-5.5.55' into bb-5.5-sachin-mergeSachin Setiya2017-04-183-49/+12
|\ \ \ | |/ / | | | | | | Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
| * | Merge remote-tracking branch 'mysql/5.5' into 5.5mariadb-5.5.55Sergei Golubchik2017-04-111-3/+3
| |\ \
| | * | BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING ↵Ramil Kalimullin2017-03-142-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SSL CONNECTION Changed MYSQL_OPT_SSL_MODE to be the same as in 5.6 (ABI compatibility). (cherry picked from commit 47bb4eb5df1629b5d5e30aebfa9d7a6d74388a5d)
| | * | BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING ↵Ramil Kalimullin2017-03-105-9/+19
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | SSL CONNECTION MYSQL_OPT_SSL_MODE option introduced. It is set in case of --ssl-mode=REQUIRED and permits only SSL connection. (cherry picked from commit 3b2d28578c526f347f5cfe763681eff365731f99)
| | * Updated copyright year in user visible textBalasubramanian Kandasamy2017-01-061-2/+2
| | |
| | * BUG#24437124: POSSIBLE BUFFER OVERFLOW ON CREATE TABLEKarthik Kamath2016-11-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ANALYSIS: ========= 'CREATE TABLE' query with a large value for 'CONNECTION' string reports an incorrect error. The length of connection string is stored in .frm in two bytes (max value= 65535). When the string length exceeds the max value, the length is truncated to fit the two bytes limit. Further processing leads to reading only a part of the string as the length stored is incorrect. The remaining part of the string is treated as engine type and hence results in an error. FIX: ==== We are now restricting the connection string length to 1024. An appropriate error is reported if the length crosses this limit. NOTE: ===== The 'PASSWORD' table option is documented as unused and processed within a dead code. Hence it will not cause similar issue with large strings.
| | * Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLEJon Olav Hauglid2016-08-192-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD) is created. When repair finishes, this file is renamed to the original .MYD file. The problem was that during this rename, we copied the stats from the old file to the new file with chmod/chown. If a user managed to replace the temporary file before chmod/chown was executed, it was possible to get an arbitrary file with the privileges of the mysql user. This patch fixes the problem by not copying stats from the old file to the new file. This is not needed as the new file was created with the correct stats. This fix only changes server behavior - external utilities such as myisamchk still does chmod/chown. No test case provided since the problem involves synchronization with file system operations.
| | * Bug #23296299 : HANDLE_FATAL_SIGNAL (SIG=11) INKailasnath Nagarkar2016-07-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MY_TOSORT_UTF32 This patch is specific for mysql-5.5 ISSUE: When a charater that is larger than possible to handle is passed to function my_tosort_utf32(), it results in segmentation fault. In the scenario mentioned in the bug AES_ENCRYPT function is used which returns large value. This value is further passed to my_tosort_utf32 function. This causes to cross array bound for array uni_plane, resulting in segment violation. SOLUTION: This issue has got addressed in 5.6 onward releases through worklog 2673. The fix is similar backport of that. Check for maximum character before accessing the array uni_plane. In addition to function my_tosort_utf32, the same potential problem is also present in functions my_tolower_utf16, my_toupper_utf16, my_tosort_utf16, my_tolower_utf32, my_toupper_utf32, my_tosort_unicode, my_tolower_utf8mb4 and my_toupper_utf8mb4. Fixed these functions as well.
| * | bugfix: remove my_delete_with_symlink()Sergei Golubchik2017-02-272-42/+0
| | | | | | | | | | | | | | | | | | it was race condition prone. instead use either a pair of my_delete() calls with already resolved paths, or a safe high-level function my_handler_delete_with_symlink(), like MyISAM and Aria already do.
| * | race-condition safe implementation of mi_delete_table/maria_delete_tableSergei Golubchik2017-02-271-0/+3
| | |
| * | MDEV-11902 mi_open race conditionSergei Golubchik2017-02-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TOCTOU bug. The path is checked to be valid, symlinks are resolved. Then the resolved path is opened. Between the check and the open, there's a window when one can replace some path component with a symlink, bypassing validity checks. Fix: after we resolved all symlinks in the path, don't allow open() to resolve symlinks, there should be none. Compared to the old MyISAM/Aria code: * fastpath. Opening of not-symlinked files is just one open(), no fn_format() and lstat() anymore. * opening of symlinked tables doesn't do fn_format() and lstat() either. it also doesn't to realpath() (which was lstat-ing every path component), instead if opens every path component with O_PATH. * share->data_file_name stores realpath(path) not readlink(path). So, SHOW CREATE TABLE needs to do lstat/readlink() now (see ::info()), and certain error messages (cannot open file "XXX") show the real file path with all symlinks resolved.
| * | cleanup: mysys_test_invalid_symlinkSergei Golubchik2017-02-271-0/+2
| | | | | | | | | | | | | | | Remove maria_test_invalid_symlink() and myisam_test_invalid_symlink(), introduce mysys_test_invalid_symlink(). Other engines might need it too
| * | Fix for memory leak in applications, like QT,that callsMonty2017-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | my_thread_global_init() + my_thrad_global_end() repeatadily. This caused THR_KEY_mysys to be allocated multiple times. Deletion of THR_KEY_mysys was originally in my_thread_global_end() but was moved to my_end() as DBUG uses THR_KEY_mysys and DBUG is released after my_thread_global_end() is called. Releasing DBUG before my_thread_global_end() and move THR_KEY_mysys back into my_thread_global_end() could be a solution, but as safe_mutex and other things called by my_thread_global_end is using DBUG it may not be completely safe. To solve this, I used the simple solution to add a marker that THR_KEY_mysys is created and not re-create it in my_thread_global_init if it already exists.
* | | Merge tag 'mariadb-5.5.54' into 5.5-galeramariadb-galera-5.5.54Nirbhay Choubey2016-12-271-0/+4
|\ \ \ | |/ /
| * | move check_user/set_user from mysqld.cc to mysysSergei Golubchik2016-12-221-0/+4
| | |
* | | Merge remote-tracking branch 'origin/5.5' into 5.5-galeraNirbhay Choubey2016-10-141-2/+1
|\ \ \ | |/ /