weak temp admin password generation

Bug #791166 reported by David
258
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cherokee
Unknown
Unknown
cherokee (Ubuntu)
Triaged
Undecided
Unassigned

Bug Description

Binary package hint: cherokee

cherokee seeds srand with a combination of the the time and the pid of the admin process after which - rand() is called to generate a random password.
This is not safe. An evil local user can guess the generated password within ~200 attempts.

Vulnerable code:

static ret_t
generate_admin_password (cherokee_buffer_t *buf)
{
        cuint_t i;
        cuint_t n;

        srand(getpid()*time(NULL));

        for (i=0; i<PASSWORD_LEN; i++) {
                n = rand()%(sizeof(ALPHA_NUM)-1);
                cherokee_buffer_add_char (buf, ALPHA_NUM[n]);
        }

        return ret_ok;
}

David (d--)
description: updated
description: updated
description: updated
David (d--)
description: updated
David (d--)
visibility: private → public
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Thanks for taking the time to report this bug and helping to make Ubuntu better. Since the package referred to in this bug is in universe or multiverse, it is community maintained. If you are able, I suggest posting a debdiff for this issue. When a debdiff is available, members of the security team will review it and publish the package. See the following link for more information: https://wiki.ubuntu.com/SecurityTeam/UpdateProcedures

Changed in cherokee (Ubuntu):
status: New → Triaged
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.