1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-19 00:13:33 +00:00
freebsd-ports/security/heimdal/files/patch-kadmin_server.c
Cy Schubert 678bdaf21b security/heimdal*: Fix NULL dereference when mangled realm message
Fix a NULL dereference in _kadm5_s_init_context() when the client
sends a mangled realm message.

PR:             267912
Reported by:    Robert Morris <rtm@lcs.mit.edu>
MFH:      	2022Q4
2022-11-24 09:22:01 -08:00

14 lines
520 B
C

--- kadmin/server.c.orig 2022-09-15 16:54:19.000000000 -0700
+++ kadmin/server.c 2022-11-24 08:26:55.919761000 -0800
@@ -787,7 +787,9 @@
ret = krb5_read_priv_message(contextp, ac, &fd, &params);
if(ret)
krb5_err(contextp, 1, ret, "krb5_read_priv_message");
- _kadm5_unmarshal_params(contextp, &params, &realm_params);
+ ret = _kadm5_unmarshal_params(contextp, &params, &realm_params);
+ if(ret)
+ krb5_err(contextp, 1, ret, "_kadm5_unmarshal_params");
}
initial = ticket->ticket.flags.initial;