lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 20 Jan 2018 18:48:52 +0000
From:   Alan Cox <gnomes@...rguk.ukuu.org.uk>
To:     Gaurav Kohli <gkohli@...eaurora.org>
Cc:     jslaby@...e.com, gregkh@...uxfoundation.org, mikey@...ling.org,
        linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        stable@...nel.org
Subject: Re: [PATCH V1] tty: fix data race between tty_init_dev and flush of
 buf

On Wed, 17 Jan 2018 18:54:19 +0530
Gaurav Kohli <gkohli@...eaurora.org> wrote:

> There can be a race, if receive_buf call comes before
> tty initialization completes in n_tty_open and tty->disc_data
> may be NULL.
> 
> CPU0					CPU1
> ----					----
>  000|n_tty_receive_buf_common()   	n_tty_open()
> -001|n_tty_receive_buf2()		tty_ldisc_open.isra.3()
> -002|tty_ldisc_receive_buf(inline)	tty_ldisc_setup()
> 
> Using ldisc semaphore lock in tty_init_dev till disc_data
> initializes completely.
> 
> Signed-off-by: Gaurav Kohli <gkohli@...eaurora.org>

Reviewed-by: Alan Cox <alan@...ux.intel.com>

Alan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ