summaryrefslogtreecommitdiff
path: root/security/heimdal-devel/files/patch-lib_kadm5_marshall.c
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2022-11-24 08:37:45 -0800
committerCy Schubert <cy@FreeBSD.org>2022-11-24 09:22:01 -0800
commit678bdaf21b9a05d99e0aceecd414782926e57ae4 (patch)
tree50ffe45944b323a04a7208c8b590b39a6ec290cb /security/heimdal-devel/files/patch-lib_kadm5_marshall.c
parentsecurity/heimdal*: The version string must always contain a terminating NUL (diff)
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
Diffstat (limited to 'security/heimdal-devel/files/patch-lib_kadm5_marshall.c')
-rw-r--r--security/heimdal-devel/files/patch-lib_kadm5_marshall.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/security/heimdal-devel/files/patch-lib_kadm5_marshall.c b/security/heimdal-devel/files/patch-lib_kadm5_marshall.c
new file mode 100644
index 000000000000..8cc79bafcc8c
--- /dev/null
+++ b/security/heimdal-devel/files/patch-lib_kadm5_marshall.c
@@ -0,0 +1,16 @@
+--- lib/kadm5/marshall.c.orig 2022-11-17 16:55:32.000000000 -0800
++++ lib/kadm5/marshall.c 2022-11-24 08:17:04.255672000 -0800
+@@ -465,8 +465,12 @@
+ goto out;
+ params->mask = mask;
+
+- if(params->mask & KADM5_CONFIG_REALM)
++ if (params->mask & KADM5_CONFIG_REALM) {
+ ret = krb5_ret_string(sp, &params->realm);
++ if (params->realm == NULL) {
++ ret = EINVAL;
++ }
++ }
+ out:
+ krb5_storage_free(sp);
+