Bug 1383748

Summary: GnuTLS parses only the first 32 extensions, ignoring the rest
Product: Red Hat Enterprise Linux 7 Reporter: Hubert Kario <hkario>
Component: gnutlsAssignee: Nikos Mavrogiannopoulos <nmavrogi>
Status: CLOSED ERRATA QA Contact: Hubert Kario <hkario>
Severity: low Docs Contact:
Priority: low    
Version: 7.3CC: mgrepl
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gnutls-3.3.26-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 08:48:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1377248    

Description Hubert Kario 2016-10-11 16:46:36 UTC
Description of problem:
If the client hello message includes more than 32 extensions, GnuTLS will completely ignore presence of those extensions.

Version-Release number of selected component (if applicable):
gnutls-3.4.15-1.fc24.x86_64

How reproducible:
Always

Steps to Reproduce:
  openssl req -x509 -newkey rsa:2048 -keyout localhost.key -out localhost.crt -subj /CN=localhost -nodes -batch
  gnutls-serv --http -p 4433 --x509keyfile localhost.key --x509certfile localhost.crt --disable-client-cert

In another console:
  git clone https://github.com/tomato42/tlsfuzzer.git
  pushd tlsfuzzer
  git clone https://github.com/tomato42/tlslite-ng.git .tlslite-ng
  ln -s .tlslite-ng/tlslite tlslite
  git clone https://github.com/warner/python-ecdsa.git .python-ecdsa
  ln -s .python-ecdsa/ecdsa ecdsa
  PYTHONPATH=. python scripts/test-large-number-of-extensions.py


Actual results:
...
63 extensions ...
Error encountered while processing node <tlsfuzzer.expect.ExpectServerHello object at 0x7f451d1c0150> (child: <tlsfuzzer.expect.ExpectCertificate object at 0x7f451d1c0190>) with last message being: <tlslite.messages.Message object at 0x7f451be366d0>
Error while processing
Traceback (most recent call last):
  File "scripts/test-large-number-of-extensions.py", line 168, in main
    runner.run()
  File "/tmp/tlsfuzzer/tlsfuzzer/runner.py", line 168, in run
    node.process(self.state, msg)
  File "/tmp/tlsfuzzer/tlsfuzzer/expect.py", line 174, in process
    assert ext is not None
AssertionError
...

Expected results:

Test end
successful: 21
failed: 0


Additional info:

Fixed upstream: https://gitlab.com/gnutls/gnutls/issues/136

Comment 4 errata-xmlrpc 2017-08-01 08:48:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:2292