aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2026-09-22 07:18:13 +0200
committerWerner Koch <[email protected]>2026-09-23 10:15:28 +0200
commit6f5a9cfe603b0f48a355aef23f500e9000323094 (patch)
tree501bf634d00734b3870f0346cd4167557458741e
parentcommon: Fix composite DO parsing. (diff)
downloadgnupg-STABLE-BRANCH-2-2.tar.gz
gnupg-STABLE-BRANCH-2-2.zip
dirmngr: Add another validation in get_dns_cert_standard.STABLE-BRANCH-2-2
* dirmngr/dns-stuff.c (get_dns_cert_standard): Add a validation just like get_dns_cert_libdns does. -- See RFC 4398 for packet format. GnuPG-bug-id: 8464 Reported-by: eris Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r--dirmngr/dns-stuff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c
index 4a50d759f..21ee896b6 100644
--- a/dirmngr/dns-stuff.c
+++ b/dirmngr/dns-stuff.c
@@ -1694,7 +1694,7 @@ get_dns_cert_standard (const char *name, int want_certtype,
/* We did not found the requested RR. */
pt += dlen;
}
- else if (type == T_CERT)
+ else if (type == T_CERT && dlen > 5)
{
/* We got a CERT type. */
ctype = buf16_to_u16 (pt);