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

Possible memory trashing when raising some exceptions to signal failed security checks [CORE2858] #3243

Closed
firebird-issue-importer opened this issue Feb 11, 2010 · 7 comments

Comments

@firebird-issue-importer

Submitted by: Claudio Valderrama C. (robocop)

Assigned to: Claudio Valderrama C. (robocop)

Here's an extract from two isql sessions:

F:\fb2dev\fbbuild\firebird25\temp\Win32\Debug\firebird\bin>isql -user sysdba
-pass masterkey
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 'testsec.fdb';
SQL> create user cvc password 'cpp';
SQL> create table t(a int);
SQL> grant update(a) on t to user cvc;
SQL> ^Z

F:\fb2dev\fbbuild\firebird25\temp\Win32\Debug\firebird\bin>isql TESTSEC.FDB
-user cvc -pass cpp
Database: TESTSEC.FDB, User: cvc
SQL> alter table t alter column a to "A2";
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-MODIFY RDB$RELATION_FIELDS failed
-no permission for control access to
-no permission for <Missing arg #⁠1 - possibly status vector overflow> access
to <Missing arg #⁠2 - possibly status vector overflow> <Missing arg #⁠3 -
possibly status vector overflow>
SQL> ^Z

This is what happens in v3 and v2.5. Going backwards, v2.1 fails in a more elegant way:
SQL> alter table t alter column a to a2;
Statement failed, SQLCODE = -607
unsuccessful metadata update
-MODIFY RDB$RELATION_FIELDS failed
-no permission for control access to
-no permission for control access to @2? @3?

I didn't test v2.0 but I wouldn't be surprised if the message is screwed, too.

Commits: a2a6432 051e69c 753f914

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 11, 2010

Commented by: @dyemanov

I don't get how it could trash memory, at least in recent versions. See my explanation in fb-devel ;-)

I also tend to disagree that the cryptic "for @1? access to @2? @3?" is more informative to end users than what v2.5/v3.0 is showing.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 12, 2010

Modified by: Claudio Valderrama C. (robocop)

assignee: Claudio Valderrama C. [ robocop ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 12, 2010

Commented by: Claudio Valderrama C. (robocop)

Change the description if you want, but what I found when debugging wasn't very nice.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 25, 2010

Modified by: @dyemanov

Fix Version: 2.5 RC3 [ 10381 ]

Fix Version: 2.1.4 [ 10361 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 4, 2010

Modified by: @dyemanov

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

resolution: Fixed [ 1 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 4, 2011

Modified by: @pcisar

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

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 18, 2016

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