[17209] in Kerberos_V5_Development

home help back first fref pref prev next nref lref last post

Re: libverto integration caused kadm5 unit tests to fail...

daemon@ATHENA.MIT.EDU (Greg Hudson)
Sat Sep 24 10:43:15 2011

From: Greg Hudson <ghudson@mit.edu>
To: Ezra Peisach <epeisach@mit.edu>
In-Reply-To: <4E7D1471.9080106@mit.edu>
Date: Sat, 24 Sep 2011 10:43:09 -0400
Message-ID: <1316875389.2101.40.camel@t410>
Mime-Version: 1.0
Cc: "krbdev@mit.edu" <krbdev@mit.edu>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: krbdev-bounces@mit.edu

On Fri, 2011-09-23 at 19:21 -0400, Ezra Peisach wrote:
> Fedora 15 system, i386.  Running the lib/kadm5/unit-tests fails init 117 
> and then all tests fail.

This one evaded me for a while mainly because it's 32-bit specific and
my dev machine is 64-bit.  I was seeing the failure on the Solaris
32-bit nightly build, but the nature of that build environment made it
difficult to track down the bug there.  So, thanks for the additional
information; I was able to reproduce the bug using my 32-bit laptop.

The underlying cause of the bug predates the verto integration.
net-server.c uses a union for type-specific fields of struct connection,
but uses conn->u.tcp fields as well as conn->u.rpc fields for RPC
connections.  As part of the verto integration, a new RPC field
conn->u.rpc.closed was added to track whether the net-server loop is
force-closing an RPC connection.  On 32-bit platforms, reading the peer
address into conn->u.tcp.addrbuf causes conn->u.rpc.closed to be
non-zero, confusing free_socket() into causing a null pointer deref.

I will fix this by getting rid of the union.


_______________________________________________
krbdev mailing list             krbdev@mit.edu
https://mailman.mit.edu/mailman/listinfo/krbdev

home help back first fref pref prev next nref lref last post