aboutsummaryrefslogtreecommitdiff
path: root/security/heimdal-devel
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2022-11-24 16:37:45 +0000
committerCy Schubert <cy@FreeBSD.org>2022-11-24 17:22:01 +0000
commit678bdaf21b9a05d99e0aceecd414782926e57ae4 (patch)
tree50ffe45944b323a04a7208c8b590b39a6ec290cb /security/heimdal-devel
parentd831a2fe480fe02126bd5b9aba5569c5e69f1034 (diff)
downloadports-678bdaf21b9a05d99e0aceecd414782926e57ae4.tar.gz
ports-678bdaf21b9a05d99e0aceecd414782926e57ae4.zip
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')
-rw-r--r--security/heimdal-devel/Makefile2
-rw-r--r--security/heimdal-devel/files/patch-lib_kadm5_marshall.c16
2 files changed, 17 insertions, 1 deletions
diff --git a/security/heimdal-devel/Makefile b/security/heimdal-devel/Makefile
index 5d03e274c83c..bdd92c199ab5 100644
--- a/security/heimdal-devel/Makefile
+++ b/security/heimdal-devel/Makefile
@@ -1,6 +1,6 @@
PORTNAME= heimdal
PORTVERSION= ${HEIMDAL_COMMIT_DATE}
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= security
PKGNAMESUFFIX= -devel
HASH= 8f9c2d115
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);
+