Bug 150871 - CAN-2005-0710 MySQL security attacks via user-defined functions in C (CAN-2005-0709)
CAN-2005-0710 MySQL security attacks via user-defined functions in C (CAN-200...
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: mysql (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Tom Lane
David Lawrence
: Security
Depends On:
  Show dependency treegraph
Reported: 2005-03-11 10:47 EST by Tom Lane
Modified: 2013-07-02 23:04 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-03-28 14:44:46 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tom Lane 2005-03-11 10:47:15 EST
Description of problem:
MySQL allows users with very low privileges to create user-defined
functions that reference code in loadable shared libraries.  Obviously
this creates a risk of users being able to cause the server to execute
arbitrary code.  There are some rather ad-hoc restrictions intended to
prevent misuse of the feature, but Stefano Di Paola found two
different ways to create problems anyway: you can call an arbitrary
function belonging to any standard system library, and you can
circumvent the check against giving an absolute path to a library.

Reported to vulnwatch.org by Stefano Di Paola on 11 Mar 2005

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.  See vulnwatch reports.

Additional info:
This is fixed in 4.1.10a, which we should upgrade to anyway as it
contains numerous other bug fixes.

My personal opinion is that adding more ad-hoc restrictions will never
make this feature secure, and that MySQL will ultimately have to do
something like what PostgreSQL does with their equivalent feature, ie
allow only database superusers to define functions written in C. 
We'll need to keep a close eye on this area.
Comment 1 Tom Lane 2005-03-11 10:51:39 EST
Here is a link to the mysql manual's discussion of security for
user-defined functions:
Comment 2 Josh Bressers 2005-03-28 14:44:47 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.