Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1476253

Re: A potential race in drivers/staging/speakup/speakup.ko

From Pavel Andrianov <andrianov@ispras.ru>
Newsgroups linux.kernel
Subject Re: A potential race in drivers/staging/speakup/speakup.ko
Date 2016-09-05 12:00 +0200
Message-ID <sdYR6-209-61@gated-at.bofh.it> (permalink)
References <sdXV0-1pk-9@gated-at.bofh.it> <sdYHo-1W2-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


05.09.2016 12:43, Samuel Thibault пишет:
> Hello,
>
> Pavel Andrianov, on Mon 05 Sep 2016 11:51:50 +0300, wrote:
>> There is a potential race in drivers/staging/speakup/speakup.ko.
>> All operations with global pointers buff_in and buff_out are performed
>> without any locks. Thus, a simultaneous write (via synth_buffer_clear or
>> synth_buffer_add) to the pointers may lead to inconsistent data.
>>
>> Should a local lock be used here?
>
> AIUI, all callers of these functions have speakup_info.spinlock held.
>
> Samuel
>

Regard a call stack

-> synth_direct_store
   -> synth_printf
     -> synth_buffer_add

The functions have not held speakup_info.spinlock.

-- 
Pavel Andrianov
Linux Verification Center, ISPRAS
web: http://linuxtesting.org
e-mail: andrianov@ispras.ru

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

A potential race in drivers/staging/speakup/speakup.ko Pavel Andrianov <andrianov@ispras.ru> - 2016-09-05 11:00 +0200
  Re: A potential race in drivers/staging/speakup/speakup.ko Samuel Thibault <samuel.thibault@ens-lyon.org> - 2016-09-05 11:50 +0200
    Re: A potential race in drivers/staging/speakup/speakup.ko Pavel Andrianov <andrianov@ispras.ru> - 2016-09-05 12:00 +0200
      Re: A potential race in drivers/staging/speakup/speakup.ko Samuel Thibault <samuel.thibault@ens-lyon.org> - 2016-09-05 12:00 +0200
        Re: A potential race in drivers/staging/speakup/speakup.ko Pavel Andrianov <andrianov@ispras.ru> - 2016-09-05 12:40 +0200
          Re: A potential race in drivers/staging/speakup/speakup.ko Samuel Thibault <samuel.thibault@ens-lyon.org> - 2016-09-05 12:40 +0200

csiph-web