[PATCH 3/5] resolv: Remove incorrect parts of TSIG handling from ns_sprintrrf (CVE-2026-5435)

Florian Weimer fweimer@redhat.com
Thu Apr 30 10:52:07 GMT 2026


TSIG handling was incomplete before.  Given that this is an obsolete
interface, it does not seem worthwhile to complete the implementation.

This fixes bug 34033.
---
 resolv/ns_print.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/resolv/ns_print.c b/resolv/ns_print.c
index 5701e3d0c5..9c9e810781 100644
--- a/resolv/ns_print.c
+++ b/resolv/ns_print.c
@@ -513,17 +513,7 @@ ns_sprintrrf(const u_char *msg, size_t msglen,
 
 	case ns_t_tsig: {
 		/* BEW - need to complete this */
-		int n;
-
 		T(len = addname(msg, msglen, &rdata, origin, &buf, &buflen));
-		T(addstr(" ", 1, &buf, &buflen));
-		rdata += 8; /*%< time */
-		n = ns_get16(rdata); rdata += INT16SZ;
-		rdata += n; /*%< sig */
-		n = ns_get16(rdata); rdata += INT16SZ; /*%< original id */
-		sprintf(buf, "%d", ns_get16(rdata));
-		rdata += INT16SZ;
-		addlen(strlen(buf), &buf, &buflen);
 		break;
 	    }
 
-- 
2.53.0




More information about the Libc-alpha mailing list