Some (wrong ?) parameters of ENCRYPT() leads FB to crash --------------------------------------------------------
Key: CORE-6185 URL: http://tracker.firebirdsql.org/browse/CORE-6185 Project: Firebird Core Issue Type: Bug Affects Versions: 4.0 Beta 1 Reporter: Pavel Zotov Following examples lead FB to crash: 1) select encrypt( 'fooriobar' using CHACHA20 key q'{1110FB89-AD32-4E}' iv q'{114E811E}' counter cast(null as bigint) ) from rdb$database; 2) script: ======= set list on; set blob all; set bail on; shell del C:\temp\c5970.fdb 2>nul; create database 'localhost:C:\temp\c5970.fdb'; show version; create or alter procedure sp_block_test(a_alg varchar(30)) as begin end; commit; recreate table test( crypto_alg varchar(30), source_text blob, crypto_key varchar(128), crypto_iv varchar(16) ); commit; insert into test( crypto_alg, source_text, crypto_key, crypto_iv) values( 'AES', lpad('', 65535, gen_uuid()), '0101010101010101', lpad('',16, uuid_to_char( gen_uuid() )) ); commit; set term ^; create or alter procedure sp_block_test(a_alg varchar(30)) as declare v_encrypted blob; declare v_encrypt_sttm blob; begin for select t.source_text ,t.crypto_alg ,t.crypto_key ,t.crypto_iv from test t where upper( t.crypto_alg ) = upper( :a_alg ) as cursor c do begin v_encrypt_sttm = 'select encrypt( q''{' || c.source_text || '}'' using ' || c.crypto_alg || ' mode ofb key q''{' || c.crypto_key || '}'' iv q''{' || c.crypto_iv || '}'' ) from rdb$database'; execute statement v_encrypt_sttm into v_encrypted; end end ^ set term ;^ commit; set echo on; execute procedure sp_block_test('aes'); ======= Dumps and stack trace have been sent to Alex et al. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel