|
| 1 | +From 19c67d35287ca30929e0f4353cdc1b89de1ae75e Mon Sep 17 00:00:00 2001 |
| 2 | +From: AllSpark <allspark@microsoft.com> |
| 3 | +Date: Mon, 12 Jan 2026 16:41:34 +0000 |
| 4 | +Subject: [PATCH] Fix for CVE-2025-13151: prevent stack-based buffer overflow |
| 5 | + in asn1_expand_octet_string; update NEWS |
| 6 | + |
| 7 | +Signed-off-by: Azure Linux Security Servicing Account <azurelinux-security@microsoft.com> |
| 8 | +Upstream-reference: AI Backport of https://gitlab.com/gnutls/libtasn1/-/commit/d276cc495a2a32b182c3c39851f1ba58f2d9f9b8.patch |
| 9 | +--- |
| 10 | + NEWS | 1 + |
| 11 | + lib/decoding.c | 2 +- |
| 12 | + 2 files changed, 2 insertions(+), 1 deletion(-) |
| 13 | + |
| 14 | +diff --git a/NEWS b/NEWS |
| 15 | +index cbd09eb..2100e6f 100644 |
| 16 | +--- a/NEWS |
| 17 | ++++ b/NEWS |
| 18 | +@@ -4,6 +4,7 @@ GNU Libtasn1 NEWS -*- outline -*- |
| 19 | + - Clarify libtasn1.map license. Closes: #38. |
| 20 | + - Fix ETYPE_OK out of bounds read. Closes: #32. |
| 21 | + - Update gnulib files and various maintenance fixes. |
| 22 | ++- Fix for vulnerbaility CVE-2025-13151 Stack-based buffer overflow |
| 23 | + |
| 24 | + * Noteworthy changes in release 4.18.0 (2021-11-09) [stable] |
| 25 | + - Improve GTK-DOC manual. Closes: #35. |
| 26 | +diff --git a/lib/decoding.c b/lib/decoding.c |
| 27 | +index b9245c4..bc45138 100644 |
| 28 | +--- a/lib/decoding.c |
| 29 | ++++ b/lib/decoding.c |
| 30 | +@@ -1976,7 +1976,7 @@ int |
| 31 | + asn1_expand_octet_string (asn1_node_const definitions, asn1_node * element, |
| 32 | + const char *octetName, const char *objectName) |
| 33 | + { |
| 34 | +- char name[2 * ASN1_MAX_NAME_SIZE + 1], value[ASN1_MAX_NAME_SIZE]; |
| 35 | ++ char name[2 * ASN1_MAX_NAME_SIZE + 2], value[ASN1_MAX_NAME_SIZE]; |
| 36 | + int retCode = ASN1_SUCCESS, result; |
| 37 | + int len, len2, len3; |
| 38 | + asn1_node_const p2; |
| 39 | +-- |
| 40 | +2.45.4 |
| 41 | + |
0 commit comments