Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mysql_aes256.c #7

Merged
merged 1 commit into from
Nov 17, 2016
Merged

Update mysql_aes256.c #7

merged 1 commit into from
Nov 17, 2016

Conversation

antksk
Copy link
Contributor

@antksk antksk commented Nov 16, 2016

보안 강화 작업으로 mysql 5.5.30에 aes256를 적용 하기위해,

Joungkyun님의 mysql_aes256를 사용하였는데,

아래와 같이, 암호화 문자열 영역에, 일반 문자열을 넣으면
select AES256_DECRYPT(UNHEX(**'encrypted_hash_string'**), '0123456789abcdef0123456789abcdef');

DB 서버가 정지되는 현상이 발견되어 문제 해결 후 pull request 처리 요청

[에러 로그]

** --> call aes256_decrypt_init (mysql_aes256.c:199)
 * --> call my_aes256_get_size (my_aes.c:256)
 * <-- exit my_aes256_get_size (my_aes.c:257)
** --> call aes256_decrypt (mysql_aes256.c:283)
  - 1st Argument:
    + type   : 0
    + data   : (null)
    + length : 32
  - data    : (null) (udf: mysql_aes256.c:299)
04:58:45 UTC - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

key_buffer_size=402653184
read_buffer_size=2097152
max_used_connections=1
max_threads=512
thread_count=1
connection_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 2496208 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x4e59f20
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7f6d0247ae68 thread_stack 0x40000
/usr/local/mysql/bin/mysqld(my_print_stacktrace+0x2e)[0x757a4e]
/usr/local/mysql/bin/mysqld(handle_fatal_signal+0x41a)[0x64e16a]
/lib64/libpthread.so.0[0x32a5e0f7e0]
/lib64/libc.so.6[0x32a573382f]
/usr/local/mysql/lib/plugin/lib_mysqludf_aes256.so(aes256_decrypt+0x10d)[0x7f6d0247d597]
/usr/local/mysql/bin/mysqld(_ZN11udf_handler7val_strEP6StringS1_+0x70)[0x698980]
/usr/local/mysql/bin/mysqld(_ZN17Item_func_udf_str7val_strEP6String+0x14)[0x698a64]
/usr/local/mysql/bin/mysqld(_ZN4Item4sendEP8ProtocolP6String+0x3e)[0x657c1e]
/usr/local/mysql/bin/mysqld(_ZN8Protocol19send_result_set_rowEP4ListI4ItemE+0xaf)[0x50bccf]
/usr/local/mysql/bin/mysqld(_ZN11select_send9send_dataER4ListI4ItemE+0x71)[0x542d01]
/usr/local/mysql/bin/mysqld(_ZN4JOIN4execEv+0xe48)[0x59ece8]
/usr/local/mysql/bin/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x162)[0x5a0132]
/usr/local/mysql/bin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x174)[0x5a0b74]
/usr/local/mysql/bin/mysqld[0x563e24]
/usr/local/mysql/bin/mysqld(_Z21mysql_execute_commandP3THD+0x2e11)[0x569ed1]
/usr/local/mysql/bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x189)[0x56b579]
/usr/local/mysql/bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x11e3)[0x56ceb3]
/usr/local/mysql/bin/mysqld(_Z24do_handle_one_connectionP3THD+0x176)[0x5f8056]
/usr/local/mysql/bin/mysqld(handle_one_connection+0x4a)[0x5f80ba]
/lib64/libpthread.so.0[0x32a5e07aa1]
/lib64/libc.so.6(clone+0x6d)[0x32a56e8aad]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f6cf000e9a0): is an invalid pointer
Connection ID (thread ID): 1
Status: NOT_KILLED

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
161116 13:58:45 mysqld_safe Number of processes running now: 0
161116 13:58:45 mysqld_safe mysqld restarted
161116 13:58:45 InnoDB: The InnoDB memory heap is disabled
161116 13:58:45 InnoDB: Mutexes and rw_locks use GCC atomic builtins
161116 13:58:45 InnoDB: Compressed tables use zlib 1.2.3
161116 13:58:45 InnoDB: Initializing buffer pool, size = 1.0G
161116 13:58:45 InnoDB: Completed initialization of buffer pool
161116 13:58:45 InnoDB: highest supported file format is Barracuda.
161116 13:58:45  InnoDB: Waiting for the background threads to start
161116 13:58:46 InnoDB: 5.5.30 started; log sequence number 3334779858854
161116 13:58:46 [Note] Semi-sync replication initialized for transactions.
161116 13:58:46 [Note] Semi-sync replication enabled on the master.
161116 13:58:46 [Note] Recovering after a crash using /pub/var/log/kppdb0111ddv-bin
161116 13:58:46 [Note] Starting crash recovery...
161116 13:58:46 [Note] Crash recovery finished.
161116 13:58:46 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
161116 13:58:46 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
161116 13:58:46 [Note] Server socket created on IP: '0.0.0.0'.
161116 13:58:46 [Warning] 'proxies_priv' entry '@ root@XXXXXXXXXXX' ignored in --skip-name-resolve mode.
161116 13:58:46 [Note] Event Scheduler: Loaded 0 events
161116 13:58:46 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.30-log'  socket: '/pub/var/run/mysql.sock'  port: 3306  Source distribution
@Joungkyun Joungkyun self-assigned this Nov 17, 2016
@Joungkyun Joungkyun added this to the 1.0.5 milestone Nov 17, 2016
@Joungkyun Joungkyun merged commit 51ab5f0 into Joungkyun:master Nov 17, 2016
@Joungkyun
Copy link
Owner

감사합니다 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants