diff options
| author | tb <> | 2022-05-14 15:06:09 +0000 |
|---|---|---|
| committer | tb <> | 2022-05-14 15:06:09 +0000 |
| commit | 9f9c4fab3ed4b876aac3fa82d052dca0c1af9827 (patch) | |
| tree | 51ae669a30e264ce42bd672c93515dbcc6a58f60 /src | |
| parent | afc74298e42fc3d621e2da2e3f26a60f2886b977 (diff) | |
| download | openbsd-libressl-v3.5.3.tar.gz openbsd-libressl-v3.5.3.tar.bz2 openbsd-libressl-v3.5.3.zip | |
Fix d2i_ASN1_OBJECT()libressl-v3.5.3
Due to a confusion of two CBS, the API would incorrectly advance the
*der_in pointer, resulting in a DER parse failure.
Issue reported by Aram Sargsyan
ok jsing
This is patches/7.1/004_asn1.patch.sig
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/asn1/a_object.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/asn1/a_object.c b/src/lib/libcrypto/asn1/a_object.c index c6e4c77f92..8c70a7961e 100644 --- a/src/lib/libcrypto/asn1/a_object.c +++ b/src/lib/libcrypto/asn1/a_object.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: a_object.c,v 1.46 2022/04/10 12:42:33 inoguchi Exp $ */ | 1 | /* $OpenBSD: a_object.c,v 1.46.2.1 2022/05/14 15:06:09 tb Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -651,7 +651,7 @@ d2i_ASN1_OBJECT(ASN1_OBJECT **out_aobj, const unsigned char **pp, long length) | |||
| 651 | if (!c2i_ASN1_OBJECT_cbs(&aobj, &content)) | 651 | if (!c2i_ASN1_OBJECT_cbs(&aobj, &content)) |
| 652 | return NULL; | 652 | return NULL; |
| 653 | 653 | ||
| 654 | *pp = CBS_data(&content); | 654 | *pp = CBS_data(&cbs); |
| 655 | 655 | ||
| 656 | if (out_aobj != NULL) | 656 | if (out_aobj != NULL) |
| 657 | *out_aobj = aobj; | 657 | *out_aobj = aobj; |
