List:Packagers« Previous MessageNext Message »
From:Lenz Grimmer Date:March 10 2003 7:28pm
Subject:Re: MySQL user can be changed to root (fwd)
View as plain text  
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

JFYI - patches are available upon request. I've started the 3.23 builds
today.

	LenZ
- -- 
For technical support contracts, visit https://order.mysql.com/?ref=mlgr
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /      Mr. Lenz Grimmer <lenz@stripped>
 / /|_/ / // /\ \/ /_/ / /__     MySQL AB, Production Engineer
/_/  /_/\_, /___/\___\_\___/     Hamburg, Germany
       <___/   www.mysql.com

- ---------- Forwarded message ----------
Date: Mon, 10 Mar 2003 20:08:38 +0100
From: Sergei Golubchik <serg@stripped>
To: Guido A.J. Stevens <gyst@stripped>
Cc: "bugsman@stripped" <bugsman@stripped>,
     bugtraq <bugtraq@stripped>, bugs@stripped,
     security@stripped
Subject: Re: MySQL user can be changed to root

Hi!

Both to bugtraq and mysql list:

This issue has been adressed in 3.23.56 (release build is started
today), and some steps were taken to alleviate the threat.

In particular, MySQL will no longer read config files that are
world-writeable (and SELECT ... OUTFILE always creates world-writeable
files). Also, unlike other options, for --user option the first one will
have the precedence. So if --user is set in /etc/my.cnf (as it is
recommended in the manual), datadir/my.cnf will not be able to override
it.

Fixing this issue in more robust way would mean introducing too big and
incompatible changes into stable version, thus breaking lots of
installations. It is to be done in 4.1.

Regards,
Sergei

On Mar 10, Guido A.J. Stevens wrote:
>
> I can confirm this privilege escalation in mysql-server   3.23.49-8.2
> (debian/stable on linux/i386). Any mysql user with file privileges can
> trick the mysql server into running as root on restart of the mysql
> subsystem.
>
> bugsman@stripped wrote:
>
> > mysql>SELECT * INTO OUTFILE '/path/to/mysql/datadir/my.cnf' FROM hack
>
> > Now, when the mysql server will be restarted, the user option in our
> > datadir my.cnf will override the one in /etc/my.cnf and mysql server will
> > run as root

- -- 
MySQL Development Team
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <serg@stripped>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
       <___/

- ---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail bugs-thread13934@stripped
To unsubscribe, e-mail <bugs-unsubscribe@stripped>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE+bOdRSVDhKrJykfIRAqHZAJ9m8jMv8SYbgBFKSVpZuva6RC2vHQCfdvDw
BNosKt2j/oCz18BbKdNXiXM=
=XSEX
-----END PGP SIGNATURE-----
Thread
Re: MySQL user can be changed to root (fwd)Lenz Grimmer10 Mar
  • mysql_install_db patch to support both mysqld-max and mysqldWarly12 Mar
    • Re: mysql_install_db patch to support both mysqld-max and mysqldLenz Grimmer13 Mar
      • Re: mysql_install_db patch to support both mysqld-max and mysqldWarly13 Mar
  • Re: [packagers] Re: MySQL user can be changed to root (fwd)Lenz Grimmer13 Mar
    • Re: [packagers] Re: MySQL user can be changed to root (fwd)Dmitry V. Levin13 Mar
      • Re: [packagers] Re: MySQL user can be changed to root (fwd)Lenz Grimmer13 Mar
        • Re: [packagers] Re: MySQL user can be changed to root (fwd)Dmitry V. Levin13 Mar
          • Re: [packagers] Re: MySQL user can be changed to root (fwd)Sergei Golubchik13 Mar
            • Re: [packagers] Re: MySQL user can be changed to root (fwd)Dmitry V. Levin13 Mar
              • Re: [packagers] Re: MySQL user can be changed to root (fwd)Sergei Golubchik13 Mar
                • Re: [packagers] Re: MySQL user can be changed to root (fwd)Dmitry V. Levin13 Mar
                  • Re: [packagers] Re: MySQL user can be changed to root (fwd)Sergei Golubchik13 Mar
                    • Re: [packagers] Re: MySQL user can be changed to root (fwd)Dmitry V. Levin13 Mar