HomeAbout Us A-Z IndexSearch * Contact Us Register LoginPress Shop

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 0077 Details

Help Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges

This page provides all information on Problem Report 0077.


Report 0077 Actions


    Problem Report Number 0077
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.0077
    Raised 1993-06-23 08:00
    Updated 2003-03-13 08:00
    Published 1993-06-29 08:00
    Product Standard Internationalised System Calls and Libraries (XPG4)
    Certification Program The Open Brand certification program
    Test Suite VSX4 version 4.2.4
    Test Identification XPG4.os/ipc/msgctl 15
    Problem Summary TSD4.077 This has been reported and accepted as an error against VSX4.3.1; we believe this error is also present in VSX4.2.4. The ch2_t15() tests in XPG4.os/ipc/msgctl.c is incorrect and needs to be modified. ...
    Problem Text
    This has been reported and accepted as an error against VSX4.3.1; we believe
    this error is also present in VSX4.2.4.

    The ch2_t15() tests in XPG4.os/ipc/msgctl.c is incorrect and
    needs to be modified.

    The test creates two children; the first creates a message
    with the uid field (msg_perm.uid) set to the current uid. The
    second child resets it's uid, clears all privileges and then
    attempts to reset the permissions on the message using
    msgctl(g_msgqid,IPC_SETG,&msqid_ds). The tests fail with
    the incorrect errno (EINVAL instead of the expected EPERM).

    Upon investigation, it appears that the tests are failing
    in msgctl(). Before the permissions are checked (and EPERM
    would have been returned), the new uid and gid are validated
    (to be between 0 and MAXUID). If the new uid/gid are not
    within this range, EINVAL is returned.

    The ch2_t15() test (which does the msgctl() call) invokes
    msgctl() with the following args:

    if ((rval=msgctl(g_msgqid,IPC_SET,&msqid_ds)) != SYSERROR
    errno != EPERM) {

    The msqid_ds structure is NOT initialized. When msgctl()
    does it's validation on the new uid/gid, it finds
    msqid_ds.msg_perm.uid out of range and returns EINVAL.

    The tests need to be changed to add:

    msqid_ds.msg_perm.uid=0;
    msqid_ds.msg_perm.gid=0;

    to the beginning of ch2_t15() in XPG4.os/ipc/msgtl/msgctl.c .

    Test Output
    ************************************************************************
    /tset/XPG4.os/ipc/msgctl/T.msgctl 15 Failed

    Test Description:
    EPERM in 'errno' and return -1 on a call to msgctl(msqid, IPC_SET,
    buf) when the effective user ID does not match the user ID of the
    creator, or the user ID of the owner of the message queue and the
    process does not have appropriate privileges.

    Test Strategy:
    REQUEST/VERIFY appropriate privileges for the process using setprv().
    CREATE child process.
    CREATE message queue <msgqid> using msgget().
    SET message queue creator uid VSX_UID0, gid VSX_GUID0 using
    msgctl(IPC_SET).
    SET message queue owner uid VSX_UID1, gid VSX_GUID1 using
    msgctl(IPC_SET).
    SET access permissions on queue to rw-rw-rw- using msgctl(IPC_SET).
    CREATE child process.
    SET real and effective uid to VSX_UID2 using setuid().
    SET real and effective gid to VSX_GID2 using set- gid().
    REMOVE all privileges using unsetprv().
    VERIFY that unsetprv() returned 0.
    ATTEMPT to change message queue owner and access permission using
    msgctl(IPC_SET,&msqid_ds).
    VERIFY msgctl() returned -1 and set errno to EPERM.

    Test Information:
    msgctl(IPC_SET) with inappropriate privileges succeeded
    ERRNO VALUES: expected: 1 (EPERM), observed: 22 (EINVAL)
    ************************************************************************

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    This is agreed to be a test suite fault and a test suite deficiency waiver
    is recommended.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution Test Suite Deficiency (TSD)
    Review Conclusion
    This is an agreed Test Suite Deficiency.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority