Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Jun 2004 15:13:18 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        arch@FreeBSD.org
Subject:   Re: Confusion about process states and invariants
Message-ID:  <20040627131318.GK12007@darkness.comp.waw.pl>
In-Reply-To: <Pine.NEB.3.96L.1040626122843.46724N-100000@fledge.watson.org>
References:  <Pine.NEB.3.96L.1040626122843.46724N-100000@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--rymfx6HOR/0f6nvJ
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Jun 26, 2004 at 12:38:43PM -0400, Robert Watson wrote:
+> Over the last two weeks, I've seen several reports of panics relating to
+> code making incorrect assumptions about process state, generally relating
+> to the "p_ucred" pointer in new and dying processes.  In particular, a
+> number of pieces of code assume that if a process is reachable by the all
+> process list (or other process lists), p_ucred will be valid and non-NULL
+> if the process lock is held on the process.  This results in possible NU=
LL
+> pointer dereferences in the PRS_NEW state, and also during the tear-down
+> in kern_wait().  At first glance, the easy answer would appear to be
+> "check for p_ucred to be NULL", but I'm actually of the opinion that I'd
+> prefer we have the non-NULL p_ucred invariant actually hold true.  This
+> would permit security checks to be performed properly during those
+> windows.  I'm not very familiar with our process state and locking, but =
if
+> someone with a more qualified background in that area could comment on t=
he
+> current issue, that would be useful.

Couldn't we move crhold() for p_ucred before it is placed on allproc list?

--=20
Pawel Jakub Dawidek                       http://www.FreeBSD.org
pjd@FreeBSD.org                           http://garage.freebsd.pl
FreeBSD committer                         Am I Evil? Yes, I Am!

--rymfx6HOR/0f6nvJ
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFA3sfuForvXbEpPzQRAmoiAKCBJWFW9iEu5mjI9FR9jr5P8P6bTwCgtrNK
OIkOYVJ3NgjEPaXurLivwto=
=j9g9
-----END PGP SIGNATURE-----

--rymfx6HOR/0f6nvJ--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040627131318.GK12007>