[openssl/openssl] 6fbc44: Fix memory leaks in x509v3 config handling

"'Adam Tabak' via openssl-commits" <[email protected]>
Newsgroups gmane.comp.encryption.openssl.cvs
Message-ID <openssl/openssl/push/refs/heads/master/[email protected]>
  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 6fbc443ad53299972c5eb71ea78f6422de23d3d1
      https://github.com/openssl/openssl/commit/6fbc443ad53299972c5eb71ea78f6422de23d3d1
  Author: Greensi7 <[email protected]>
  Date:   2026-08-09 (Sun, 09 Aug 2026)

  Changed paths:
    M crypto/x509/v3_battcons.c
    M crypto/x509/v3_bcons.c
    M crypto/x509/v3_pcons.c

  Log Message:
  -----------
  Fix memory leaks in x509v3 config handling

Duplicate integer value fields in the policyConstraints,
basicConstraints and basicAttConstraints extensions overwrite
previously allocated ASN1_INTEGER values without freeing them.

Found by : x509v3 fuzzer

Example 1: (crypto/x509/v3_pcons.c)
```
[default]
policyConstraints = requireExplicitPolicy:1,requireExplicitPolicy:2
```

Example 2: (crypto/x509/v3_bcons.c)
```
[default]
basicConstraints = pathlen:1,pathlen:2
```

Example 3: (crypto/x509/v3_battcons.c)
```
[default]
basicAttConstraints = pathlen:1,pathlen:2
```
Assisted-by: ChatGPT:gpt-5.6

Reviewed-by: Viktor Dukhovni <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
MergeDate: Sun Aug  9 04:06:32 2026
(Merged from https://github.com/openssl/openssl/pull/32181)


  Commit: 1b25e3fca5772fce2edd71a6adfc306dbe254c3e
      https://github.com/openssl/openssl/commit/1b25e3fca5772fce2edd71a6adfc306dbe254c3e
  Author: Greensi7 <[email protected]>
  Date:   2026-08-09 (Sun, 09 Aug 2026)

  Changed paths:
    M CHANGES.md
    M crypto/err/openssl.txt
    M crypto/x509/v3_battcons.c
    M crypto/x509/v3_bcons.c
    M crypto/x509/v3_pcons.c
    M crypto/x509/v3err.c
    M include/crypto/x509v3err.h
    M include/openssl/x509v3err.h

  Log Message:
  -----------
  Reject duplicate fields in X509v3 config

Reject repeated fields in policyConstraints, basicConstraints
and basicAttConstraints instead of silently accepting the last value.

Assisted-by: ChatGPT:gpt-5.6

Reviewed-by: Viktor Dukhovni <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
MergeDate: Sun Aug  9 04:06:37 2026
(Merged from https://github.com/openssl/openssl/pull/32181)


  Commit: dfb78caa5711d439e66bcaf3090f88d6aae47413
      https://github.com/openssl/openssl/commit/dfb78caa5711d439e66bcaf3090f88d6aae47413
  Author: Greensi7 <[email protected]>
  Date:   2026-08-09 (Sun, 09 Aug 2026)

  Changed paths:
    M test/v3ext.c

  Log Message:
  -----------
  Add x509v3 duplicate field config tests

Reviewed-by: Viktor Dukhovni <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
MergeDate: Sun Aug  9 04:06:42 2026
(Merged from https://github.com/openssl/openssl/pull/32181)


  Commit: 17e4b50a241d2f9f7a862784396ee97552f1011c
      https://github.com/openssl/openssl/commit/17e4b50a241d2f9f7a862784396ee97552f1011c
  Author: Greensi7 <[email protected]>
  Date:   2026-08-09 (Sun, 09 Aug 2026)

  Changed paths:
    M crypto/x509/v3_battcons.c
    M crypto/x509/v3_bcons.c
    M crypto/x509/v3_pcons.c

  Log Message:
  -----------
  Run clang-format - chore

Reviewed-by: Viktor Dukhovni <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
MergeDate: Sun Aug  9 04:06:46 2026
(Merged from https://github.com/openssl/openssl/pull/32181)


  Commit: 7fba23f197791b95f72d30ef6adee0f42c43bdaf
      https://github.com/openssl/openssl/commit/7fba23f197791b95f72d30ef6adee0f42c43bdaf
  Author: Greensi7 <[email protected]>
  Date:   2026-08-09 (Sun, 09 Aug 2026)

  Changed paths:
    M test/v3ext.c

  Log Message:
  -----------
  Add valid single field tests

Reviewed-by: Viktor Dukhovni <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
MergeDate: Sun Aug  9 04:06:52 2026
(Merged from https://github.com/openssl/openssl/pull/32181)


Compare: https://github.com/openssl/openssl/compare/eb5626c57269...7fba23f19779

To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups "openssl-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/a/openssl.org/d/msgid/openssl-commits/openssl/openssl/push/refs/heads/master/eb5626-7fba23%40github.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.