OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Arne Ansper (arneats.cyber.ee)
Date: Thu Nov 01 2001 - 14:10:42 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    winscard_msg.c contained a serious design flaw. it assumed that after the
    select indicates that socket is readable one can read the full structure
    from it. it's not so. read can return partial results, which means that
    some fields of the readed structure contain garbage and if you use them
    they may crash your program. we found this bug on heavily loaded machine
    where partial reads and writes on unix domain socket are quite common.

    i've added patch that implements read and write as small loop around
    select and read/write that completes when all data is readed or written or
    when timeout occures. i also switched to nonblocking sockets.

    i would like to remove the callback stuff from the connection setup
    routine too if there is no good excuse for it.

    arne


    ***************************************************************
    Unix Smart Card Developers - M.U.S.C.L.E.
    (Movement for the Use of Smart Cards in a Linux Environment)
    http://www.linuxnet.com/
    To unsubscribe send an email to majordomolinuxnet.com with
    unsubscribe sclinux
    ***************************************************************