First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 83792
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Security <security@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Jakub Moc (RETIRED) <jakub@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:
Flags: Requestee:
 
 
  ()

Filename Description Type Creator Created Size Actions
2.6.1_p2-no-wildcard-privs-for-you.patch-32018.out failed patch text/plain Jakub Moc (RETIRED) 2005-03-02 08:24 0000 3.67 KB Details
phpmyadmin.diff working patch patch Jakub Moc (RETIRED) 2005-03-02 08:30 0000 3.87 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 83792 depends on: Show dependency tree
Bug 83792 blocks: 83190

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-03-02 02:53 0000
When you grant privileges to databases with underscore character in their name
via  phpMyAdmin, you end up with user having wildcard privileges like in Bug
83163. 

Reproducible: Always
Steps to Reproduce:
1. Create test_db
2. Create user test
3. Click on "Privileges" - Select user test
4. On next screen select test_db in "Add privileges on the following database"
drop-down menu
5. On "Edit Privileges" screen check all fields except GRANT and click on "Go"

Actual Results:  
You have updated the privileges for 'test'@'localhost'.
SQL-query: 
GRANT ALL PRIVILEGES ON `test_db` . * TO 'test'@'localhost';

Now the user has wildcard privileges and can create databases as described in
Bug 83163 when he logs into MySQL.

Expected Results:  
GRANT ALL PRIVILEGES ON `test\_db` . * TO 'test'@'localhost';

This is inconsistent and insecure behaviour because phpMyAdmin grants wildcard
privileges while it is expected not to do so. You therefore cannot grant
privileges to databases with underscored names via phpMyAdmin GUI. The only
viable option it to use SQL statement on mysql database instead. This defeats
one of the main purposes of using GUI for MySQL administration. 

phpMyAdmin should escape underscore character in database name when granting
rights on database level but this behaviour was probably broken when fixing the
bug 6b mentioned at
http://sourceforge.net/tracker/index.php?func=detail&aid=1056706&group_id=23067&atid=377408
(which was dealing with error when granting permissions on table level)

------- Comment #1 From Thierry Carrez (RETIRED) 2005-03-02 03:15:44 0000 -------
Apparently fixed in upstream :
http://cvs.sourceforge.net/viewcvs.py/phpmyadmin/phpMyAdmin/server_privileges.php?r1=2.40&r2=2.42

Reporter: please try to apply patch and check it fixes the problem.
twp: we might need a new bump before releasing GLSA :)

------- Comment #2 From Jakub Moc (RETIRED) 2005-03-02 03:29:59 0000 -------
Affirmative, captain. ;-) 

GRANT ALL PRIVILEGES ON `test\_db` . * TO 'test'@'localhost';

Now I can finally have some sleep. Thank you very much!

------- Comment #3 From Tom Payne (RETIRED) 2005-03-02 04:52:49 0000 -------
Martin (mholzer)  --

Could you bump this please? I won't have time to look at this until Monday evening at the earliest. Could you take maintainership of phpmyadmin?

Cheers,

Tom

------- Comment #4 From Aaron Walker (RETIRED) 2005-03-02 06:48:40 0000 -------
2.6.1_p2-r1 is in cvs, stable x86.  CC'd archs please stable.

------- Comment #5 From Jakub Moc (RETIRED) 2005-03-02 08:24:48 0000 -------
Created an attachment (id=52466) [details]
failed patch

This patch does not work - see attachment

 * Applying 2.6.1_p2-no-wildcard-privs-for-you.patch ...

 * Failed Patch: 2.6.1_p2-no-wildcard-privs-for-you.patch!
 *
 * Include in your bugreport the contents of:
 *
 *  
/var/tmp/portage/phpmyadmin-2.6.1_p2-r1/temp/2.6.1_p2-no-wildcard-privs-for-you.patch-32018.out

------- Comment #6 From Jakub Moc (RETIRED) 2005-03-02 08:30:04 0000 -------
Created an attachment (id=52467) [details]
working patch

Note the redundant path phpmyadmin/phpMyAdmin/ was stripped. ;-)

------- Comment #7 From Jakub Moc (RETIRED) 2005-03-02 08:32:31 0000 -------
Also note that the post-install instructions are now wrong again (version
changed)

1. Update MySQL's grant tables and the pmadb database:
     mysql -u root -p <
/usr/share/webapps/phpmyadmin/2.6.1_p2/sqlscripts/mysql/2.6.1_p2_create.sql

------- Comment #8 From Thierry Carrez (RETIRED) 2005-03-02 09:27:57 0000 -------
Aaron: patch fails, see above

------- Comment #9 From Aaron Walker (RETIRED) 2005-03-02 09:58:10 0000 -------
Actually it has nothing to do with the patch.  As I originally thought it's due
to the $Id: $ change in the source file.  cvs see's this and automatically
updates the timestamp, thus causing the patch to fail.

I've had to patch the sources then change the $Id back then re-diff ;)

Fixed.  I've also updated the ebuild to automatically update the
postinst-en.txt file that gets installed so that PVR is set correctly.

------- Comment #10 From Aaron Walker (RETIRED) 2005-03-02 09:59:06 0000 -------
err s/patch/paths/

------- Comment #11 From Jakub Moc (RETIRED) 2005-03-02 10:56:15 0000 -------
OK, it works now. :-)

------- Comment #12 From Thierry Carrez (RETIRED) 2005-03-02 11:52:50 0000 -------
Arches, please mark latest stable

------- Comment #13 From Michael Hanselmann (hansmi) (RETIRED) 2005-03-02 13:44:34 0000 -------
Stable on ppc.

------- Comment #14 From Jan Brinkmann (RETIRED) 2005-03-02 14:05:56 0000 -------
stable on amd64

------- Comment #15 From Jason Wever (RETIRED) 2005-03-02 18:09:36 0000 -------
Stable on SPARC.

------- Comment #16 From Bryan Østergaard (RETIRED) 2005-03-03 07:05:24 0000 -------
Stable on alpha.

------- Comment #17 From Sune Kloppenborg Jeppesen 2005-03-03 14:27:01 0000 -------
GLSA 200503-07

------- Comment #18 From Alexander M. Turek 2005-03-05 17:35:15 0000 -------
This bug should also be fixed in phpMyAdmin-2.6.1-pl3.

------- Comment #19 From Luke Macken (RETIRED) 2005-03-16 12:53:58 0000 -------
*** Bug 85556 has been marked as a duplicate of this bug. ***

------- Comment #20 From René Nussbaumer 2005-06-26 06:13:51 0000 -------
ebuild no longer in portage.

First Last Prev Next    No search results available      Search page      Enter new bug