[39564] in Kerberos

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

Re: Failing ASN.1 tests with PKINIT on HP-UX

daemon@ATHENA.MIT.EDU (Osipov, Michael \(IN IT IN\) via K)
Sun Sep 28 16:23:01 2025

Message-ID: <c3a5d1af-e9bd-4009-b833-fff9f2b2c5c8@innomotics.com>
Date: Sun, 28 Sep 2025 22:22:43 +0200
Content-Language: en-US
To: Greg Hudson <ghudson@mit.edu>, Kerberos@mit.edu
In-Reply-To: <91cae48a-4a0d-4571-a25f-793e06a0ef23@mit.edu>
MIME-Version: 1.0
From: "Osipov, Michael \(IN IT IN\) via Kerberos" <kerberos@mit.edu>
Reply-To: "Osipov, Michael \(IN IT IN\)" <michael.osipov@innomotics.com>
Content-Type: text/plain; charset="utf-8"; Format="flowed"
Errors-To: kerberos-bounces@mit.edu
Content-Transfer-Encoding: 8bit

On 2025-09-28 21:36, Greg Hudson wrote:
> On 9/28/25 07:36, Osipov, Michael (IN IT IN) wrote:
>> Here is the full stacktrace:
> [...]
>>> #28 0x60000000c8a87c20:0 in encode_krb5_auth_pack () at 
>>> asn1_k_encode.c:1513
>>> #29 0x4011340:0 in main () at krb5_encode_test.c:798
> 
> Okay, it's nothing so exotic as a misplaced function pointer; we're just 
> at a different point in main() from what we originally thought (line 
> 798, not lines 775-778).
> 
> Walking carefully through the stack trace, I can deduce that the failure 
> happens when trying to encode the algorithm identifier within the 
> paChecksum2 field of the PKAuthenticator. 
> ktest_make_sample_pk_authenticator() doesn't intentionally include a 
> paChecksum2 field, but it doesn't null it either.  So this is a 
> straightforward use of uninitialized memory, obscured on other platforms 
> because the pointer value happens to be 0 there.  (And asan/valgrind 
> don't catch it, presumably because the memory was written to earlier 
> within structures of different types.)

Nailed it. PR works for me!
________________________________________________
Kerberos mailing list           Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos


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