On Wed, 23 Jun 2010 16:32:24 +0200, Örjan Persson <ora...@fobie.net>
wrote:
> severity 586419 important
> thanks
> 

uffff - possibly we have found the source of this problem

as mentioned before, we use PHP API for Tyrant:
http://mamasam.indefero.net/p/tyrant/

Inside this API there is method in Tyrant/RDBTable.php file:

    /**
    * Store a record
    * If a record with the same key exists in the database,
    * it is overwritten.
    *
    * @param    string|int  Specifies the primary key.
    * @param    array       Associative array containing key/values.
    * @return   bool        True if successful, false otherwise
    * @throws   Tyrant_Exception
    */
    public function put($key, $value)
    {
        $args = array($key);
        foreach ($value as $ckey => $cvalue) {
            $args[] = $ckey;
            $args[] = $cvalue;
        }
        echo "will do misc:'put' inside put\n";
        $rv = $this->misc('put', $args, 0);
        if ($rv === false) {
            throw new Tyrant_Exception("Put error");
        }
        return true;
    }


This call second method of same class - 'misc', but this method really
calls tyrant 'misc' command.

***

Basically this PHP function build PHP array, which consist of some data.

First array element is 'key', next elements are pairs of 'ckey', 'cvalue'.

All these 3 parts 'key', 'ckey', 'cvalue' should be simple types - e.g.
int, string. Not Array(), etc.

***

While our application call this function with empty 'key', so we call in
our code

Tyrant->put('',array('a'=>'somedata','b'=>'somedata');

This is then transferred by Common.php 'misc' function into some string
that is send to daemon.

If 'key' is empty, daemon dies.

***

Then we now neet to investigate this deeper, to see how is final string
coming to TT daemon constructed.

Anyway seems we issue a character set into daemon, which keep empty field
on position where 'key' is expected. 

And issue such a character set makes daemon die on assertion.

I'm not sure, but daemon most likely should be protected against such a
malformed requests.

***

Regards,
AdamLis;





--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to