]> git.ipfire.org Git - thirdparty/krb5.git/commit
Fix uninitialized pointer dereference in libkrad 1477/head
authorJulien Rische <jrische@redhat.com>
Wed, 21 Jan 2026 10:31:39 +0000 (11:31 +0100)
committerGreg Hudson <ghudson@mit.edu>
Sun, 25 Jan 2026 07:58:22 +0000 (02:58 -0500)
commitf74a1b3fcde44cfa0d487973fd47a943cda49dc8
tree70a25cde557133a36dc7bcfb5028d05d6822507a
parent5f4e17c8e2c31201628ab260f0991e8e47c8f1d2
Fix uninitialized pointer dereference in libkrad

Commit 871125fea8ce0370a972bf65f7d1de63f619b06c changed
krad_packet_decode_request() to use a local variable "req" to hold the
decoded packet until it is verified, instead of immediately storing
into the caller's *reqpkt.  The code to check for duplicate packets
erroneously continues to use *reqpkt, causing a read dereference of
whatever was in *reqpkt on entry to the function (typically null or an
uninitialized value).  Fix the code to use req instead of *reqpkt.

This bug does not affect the KDC (which only uses libkrad as a
client), but can crash external software using libkrad as a server if
it ever processes more than one packet at a time.

[ghudson@mit.edu: edited commit message]

ticket: 9193 (new)
tags: pullup
target_version: 1.22-next
src/lib/krad/packet.c