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

CLONE -fbclient.dll changes the security descriptor of the calling process. [CORE1301] #1721

Closed
firebird-automations opened this issue Jun 3, 2007 · 21 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Thomas Stamm (thomas)

Duplicates CORE984

Attachments:
api2.zip

Votes: 1

The FBClient.dll Version 2.0.1.12855 is still changing the security descriptor of the calling process after opening a database.

For Example: If the process has granted the 'PROCESS_DUP_HANDLE' right, after opening an connection to the DB this right is no longer given.
This makes it impossible to have other processes to share handles to synchonization objects or other handles.

Maybe there is an SET_ACCESS instead of GRANT_ACCESS somewhere in the code.

Example (pseudo code):

hCP := OpenProcess( PROCESS_DUP_HANDLE, True, GetCurrentProcessId);
if hCP <> 0 then begin
//Working
FBClient.OpenDB;
hCP := OpenProcess( PROCESS_DUP_HANDLE, True, GetCurrentProcessId);
if hCP = 0 then begin
//It is not working any more
end;
end;

This BUG stops me from any further testing with FB2.0.

Commits: b638129 d63015a

@firebird-automations
Copy link
Collaborator Author

Modified by: Thomas Stamm (thomas)

priority: Major [ 3 ] => Blocker [ 1 ]

Version: 2.0.1 [ 10090 ]

description: Using the fbclient dll (open an connection to an database) seems to change the security descriptor of the calling process.
For Example: If the process has granted the 'PROCESS_DUP_HANDLE' right, after opening an connection to the DB this right is no longer given.
This makes it impossible to have other processes to share handles to synchonization objects or other handles.

Maybe there is an SET_ACCESS instead of GRANT_ACCESS somewhere in the code.

Regards
Thomas

=>

The FBClient.dll Version 2.0.1.12855 is still changing the security descriptor of the calling process after opening a database.

For Example: If the process has granted the 'PROCESS_DUP_HANDLE' right, after opening an connection to the DB this right is no longer given.
This makes it impossible to have other processes to share handles to synchonization objects or other handles.

Maybe there is an SET_ACCESS instead of GRANT_ACCESS somewhere in the code.

Example (pseudo code):

hCP := OpenProcess( PROCESS_DUP_HANDLE, True, GetCurrentProcessId);
if hCP <> 0 then begin
//Working
FBClient.OpenDB;
hCP := OpenProcess( PROCESS_DUP_HANDLE, True, GetCurrentProcessId);
if hCP = 0 then begin
//It is not working any more
end;
end;

This BUG stops me from any further testing with FB2.0.

environment: Windows XP => Windows XP, Windows 2003, ..

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Can't reproduce it even with 1.5.3.4900 fbclient.
Process was 'runned as' ordinal user on W2K Srv

Create a reproducible test case and don't forget to call GetLastError after failed system call

@firebird-automations
Copy link
Collaborator Author

Commented by: Thomas Stamm (thomas)

This testcase using modified api2.c example, shows the effect of this.

@firebird-automations
Copy link
Collaborator Author

Modified by: Thomas Stamm (thomas)

Attachment: api2.zip [ 10413 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

assignee: Dmitry Yemanov [ dimitr ] => Vlad Horsun [ hvlad ]

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.1 Beta 1 [ 10141 ]

Fix Version: 2.1 Alpha 1 [ 10150 ] =>

Fix Version: 2.0.1 [ 10090 ] =>

@firebird-automations
Copy link
Collaborator Author

Commented by: Thomas Stamm (thomas)

Hi Vlad,

Is it possible to integrate that fix into an FB 2.0.1. HOTFIX?
I have an emergence situation because my 1.5.4 Server's are crashing frequently (see CORE1297) and I need a solution. So I try to use FB2.0.1.

Regards
Thomas

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

I don't know what do you mean under "FB 2.0.1. HOTFIX" but i think we can port fix into upcoming FB 2.0.2 ;)

@firebird-automations
Copy link
Collaborator Author

Commented by: Thomas Stamm (thomas)

Is it possible to get the fixed fbclient.dll as 'private' update, so I can continue testing FB2.0.1 in my original environment.

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Sent at e-mail found at your profile

@firebird-automations
Copy link
Collaborator Author

Commented by: Thomas Stamm (thomas)

works create!
Many, Many thanks

Regards
Thomas

(Have to answer this way EMail doesn't work)

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Link: This issue duplicates CORE984 [ CORE984 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Reopened to be re-closed properly :-)

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Closed [ 6 ] => Reopened [ 4 ]

resolution: Fixed [ 1 ] =>

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Duplicates CORE984. The original ticket should be reopened instead.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Reopened [ 4 ] => Resolved [ 5 ]

resolution: Duplicate [ 3 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

Fix Version: 2.0.2 [ 10130 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @pcisar

Fix confirmed by reporter. Test was not created.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 12274 ] => Firebird [ 15530 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

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