Quantcast
Channel: SCN: Message List - SAP Adaptive Server Enterprise (SAP ASE) for Custom Applications
Viewing all articles
Browse latest Browse all 3587

Re: Security Bug with sp_rename ?

$
0
0

After modifying the existing procedure for 15.7 to add the check for ownership I was able to get the same behavior as 15.5 version. This was done on one of my test systems and then compared with another test system running 15.5

 

if (@indorcolorpar is null or (@indorcolorpar not in ('index', 'partition')))
begin

                select @objid = o.id, @colid = c.colid

                from sysobjects o, syscolumns c

                where c.id = @tabobjid

                  and c.id = o.id

                  and c.name = @colname

                  and (   o.sysstat & 7 = 2/* user table */
                       or o.sysstat & 7 = 3)

/* view */

                 --- add check for ownership

                 and o.uid = user_id()

end

 

After this the behaviors were the same

15.5

-------

1> sp_rename "Test.Y", X

2> go

Msg 17782, Level 16, State 1:

Server 'PPrssd', Procedure 'sp_rename', Line 464:

You do not own a table, column or index of that name in the current database.

(return status = 1)

 

15.7

-------

1> exec sp_renamecol "MTest.X", Z

2> go

Msg 17782, Level 16, State 1:

Server 'QACluster', Procedure 'sp_renamecol', Line 824:

You do not own a table, column, index or partition of that name in the current

database.

(return status = 1)

 

 

Ownership check was removed from procedure at some version after 15.5


Viewing all articles
Browse latest Browse all 3587

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>