• T
    ALSA: seq: Make ioctls race-free · b3defb79
    Takashi Iwai 提交于
    The ALSA sequencer ioctls have no protection against racy calls while
    the concurrent operations may lead to interfere with each other.  As
    reported recently, for example, the concurrent calls of setting client
    pool with a combination of write calls may lead to either the
    unkillable dead-lock or UAF.
    
    As a slightly big hammer solution, this patch introduces the mutex to
    make each ioctl exclusive.  Although this may reduce performance via
    parallel ioctl calls, usually it's not demanded for sequencer usages,
    hence it should be negligible.
    Reported-by: NLuo Quan <a4651386@163.com>
    Reviewed-by: NKees Cook <keescook@chromium.org>
    Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: NTakashi Iwai <tiwai@suse.de>
    b3defb79
seq_clientmgr.h 3.0 KB