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-next>] [day] [month] [year] [list]
Message-Id: <20190722142238.16129-1-christian@brauner.io>
Date:   Mon, 22 Jul 2019 16:22:41 +0200
From:   Christian Brauner <christian@...uner.io>
To:     torvalds@...ux-foundation.org
Cc:     linux-kernel@...r.kernel.org, oleg@...hat.com, surenb@...gle.com,
        joel@...lfernandes.org
Subject: [GIT PULL] pidfd fixes

Hi Linus,

This contains a fix for pidfd polling. It ensures that the task's exit
state is visible to all waiters:

The following changes since commit 5f9e832c137075045d15cd6899ab0505cfb2ca4b:

  Linus 5.3-rc1 (2019-07-21 14:05:38 -0700)

are available in the Git repository at:

  git@...olite.kernel.org:pub/scm/linux/kernel/git/brauner/linux tags/for-linus-20190722

for you to fetch changes up to b191d6491be67cef2b3fa83015561caca1394ab9:

  pidfd: fix a poll race when setting exit_state (2019-07-22 16:02:03 +0200)

/* Summary */
The pidfd polling code suffered from a race condition. A waiter could be
notified via do_notify_pidfd() without the task's exit state being set and
thus not visible to the waiter. This would cause the waiter to be blocked
indefinitely. The following schematic illustrates how this could happen:

    CPU 0                            CPU 1
    ------------------------------------------------
    exit_notify
      do_notify_parent
        do_notify_pidfd
                                       pidfd_poll
                                          if (tsk->exit_state)
      tsk->exit_state = EXIT_DEAD

This is fixed by ensuring that the task's exit state is set before calling
into do_notify_pidfd(). 

Please consider pulling from the signed for-linus-20190722 tag.

Thanks!
Christian

----------------------------------------------------------------
for-linus-20190722

----------------------------------------------------------------
Suren Baghdasaryan (1):
      pidfd: fix a poll race when setting exit_state

 kernel/exit.c | 1 +
 1 file changed, 1 insertion(+)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ