Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Dec 2020 19:51:43 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 251915] TOCTOU race between tty_signal_sessleader() and killjobc()
Message-ID:  <bug-251915-227-YIFHrYF5fh@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-251915-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-251915-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D251915

--- Comment #7 from commit-hook@FreeBSD.org ---
A commit references this bug:

Author: kib
Date: Thu Dec 17 19:51:39 UTC 2020
New revision: 368735
URL: https://svnweb.freebsd.org/changeset/base/368735

Log:
  Fix a race in tty_signal_sessleader() with unlocked read of s_leader.

  Since we do not own the session lock, a parallel killjobc() might
  reset s_leader to NULL after we checked it.  Read s_leader only once
  and ensure that compiler is not allowed to reload.

  While there, make access to t_session somewhat more pretty by using
  local variable.

  PR:   251915
  Submitted by: Jakub Piecuch <j.piecuch96@gmail.com>
  MFC after:    1 week

Changes:
  head/sys/kern/tty.c

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-251915-227-YIFHrYF5fh>