AV when trying to manage users list using EXECUTE STATEMENT on behalf of
non-sysdba user which has RDB$ADMIN role
-----------------------------------------------------------------------------------------------------------------
Key: CORE-4765
URL: http://tracker.firebirdsql.org/browse/CORE-4765
Project: Firebird Core
Issue Type: Bug
Reporter: Pavel Zotov
Consider the following script:
set list on;
show version;
select mon$user,mon$remote_protocol,mon$auth_method from mon$attachments
where mon$attachment_id=current_connection;
commit;
set echo on;
drop user boss;
drop user ozzy;
commit;
create user boss password '123' grant admin role;
commit;
select u.sec$user_name, u.sec$plugin, u.sec$admin from sec$users u where
u.sec$user_name='BOSS';
set term ^;
execute block as
begin
execute statement 'create user ozzy password ''456'''
as user 'BOSS' password '123' role 'RDB$ADMIN';
end
^
set term ;^
commit;
-- EXIT; ------------------------------- [ 1 ]
select u.sec$user_name, sec$plugin, u.sec$admin
from sec$users u
where u.sec$user_name = upper('ozzy');
set term ^;
execute block as
begin
execute statement 'drop user ozzy'
as user 'BOSS' password '123' role 'RDB$ADMIN';
end
^
set term ;^
commit;
drop user boss;
commit;
CASE-1.
#######
When this script is running untill to commented '-- EXIT; --------- [ 1 ]'
statement (i.e. when it is uncommented) FB will crash and firebird.log will
contain:
===
CSPROG Tue Apr 21 16:38:17 2015
Shutting down the server with 2 active connection(s) to 1 database(s),
0 active service(s)
CSPROG Tue Apr 21 16:38:17 2015
INET/inet_error: read errno = 10054
CSPROG Tue Apr 21 16:38:17 2015
REMOTE INTERFACE/gds__detach: Unsuccesful detach from database.
Uncommitted work may have been lost.
Error writing data to the connection.
===
CASE-2.
#######
When the statement '-- EXIT;' will be COMMENTED firebird.log will contain:
===
CSPROG Tue Apr 21 16:40:36 2015
Access violation.
The code attempted to access a virtual
address without privilege to do so.
This exception will cause the Firebird server
to terminate abnormally.
CSPROG Tue Apr 21 16:41:01 2015
Shutting down the server with 2 active connection(s) to 1 database(s),
0 active service(s)
CSPROG Tue Apr 21 16:41:02 2015
INET/inet_error: read errno = 10054
CSPROG Tue Apr 21 16:41:02 2015
REMOTE INTERFACE/gds__detach: Unsuccesful detach from database.
Uncommitted work may have been lost.
Error writing data to the connection.
===
(and I can`t understand why AV message appear FIRST in this case).
Attached files (logs, firebird.conf, windows error related files):
1) in the folder "1-logs-when-only-add-user" -- what occurs for mentioned
above case-1
2) in the folder "2-logs-when-add-and-drop-user " -- what occurs for mentioned
above case-2
WI-T3.0.0.31801, got on SuperServer and SuperClassic.
firebird.conf:
===
RemoteServicePort = 3333
DefaultDbCachePages = 8192
LockHashSlots = 22111
TempCacheLimit = 2147483647
MaxUnflushedWrites = -1
MaxUnflushedWriteTime = -1
TempDirectories = c:\temp
MaxUserTraceLogSize = 99999
FileSystemCacheThreshold = 65536K
AuthServer = Srp,Legacy_Auth
AuthClient = Srp,Legacy_Auth,Win_Sspi
WireCrypt = Disabled
UserManager = Srp
BugcheckAbort = 1
===
--
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
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel