Skip to content

Commit

Permalink
CONC-429: Don't allow to load unknown authentication plugins
Browse files Browse the repository at this point in the history
Check for incorrect symbols in the plugin name.
  • Loading branch information
sanja-byelkin committed Jul 25, 2019
1 parent 59780f9 commit ed3a91c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libmariadb/ma_client_plugin.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,13 @@ mysql_load_plugin_v(MYSQL *mysql, const char *name, int type,
mysql->options.extension->plugin_dir : (env_plugin_dir) ? env_plugin_dir :
MARIADB_PLUGINDIR, name, SO_EXT);

if (strpbrk(name, "()[]!@#$%^&/*;.,'?\\"))
{
errmsg= "invalid plugin name";
goto err;
}


/* Open new dll handle */
if (!(dlhandle= dlopen((const char *)dlpath, RTLD_NOW)))
{
Expand Down

0 comments on commit ed3a91c

Please sign in to comment.