[gnutls-devel] GnuTLS | build: use valgrind client request to detect undefined memory use (!1228)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Tue Mar 31 16:19:16 CEST 2020

Daiki Ueno created a merge request: https://gitlab.com/gnutls/gnutls/-/merge_requests/1228

Branches: tmp-valgrind-memcheck to master
Author:    Daiki Ueno

See !1227.

This tightens the check introduced in
ac2f71b892d13a7ab4cc39086eef179042c7e23c, by using the valgrind client
request to explicitly mark the "uninitialized but initialization is
needed before use" regions.  With this patch and the
fix (c01011c2d8533dbbbe754e49e256c109cb848d0d) reverted, you will see
the following error when running dtls_hello_random_value under
  $ valgrind ./dtls_hello_random_value
  testing: default
  ==520145== Conditional jump or move depends on uninitialised value(s)
  ==520145==    at 0x4025F5: hello_callback (dtls_hello_random_value.c:90)
  ==520145==    by 0x488BF97: _gnutls_call_hook_func (handshake.c:1215)
  ==520145==    by 0x488C1AA: _gnutls_send_handshake2 (handshake.c:1332)
  ==520145==    by 0x488FC7E: send_client_hello (handshake.c:2290)
  ==520145==    by 0x48902A1: handshake_client (handshake.c:2908)
  ==520145==    by 0x48902A1: gnutls_handshake (handshake.c:2740)
  ==520145==    by 0x402CB3: client (dtls_hello_random_value.c:153)
  ==520145==    by 0x402CB3: start (dtls_hello_random_value.c:317)
  ==520145==    by 0x402EFE: doit (dtls_hello_random_value.c:331)
  ==520145==    by 0x4023D4: main (utils.c:254)

## Checklist
 * [x] Commits have `Signed-off-by:` with name/author being identical to the commit author
 * [ ] Code modified for feature
 * [ ] Test suite updated with functionality tests
 * [ ] Test suite updated with negative tests
 * [ ] Documentation updated / NEWS entry present (for non-trivial changes)
 * [ ] CI timeout is 2h or higher (see Settings/CICD/General pipelines/Timeout)

## Reviewer's checklist:
 * [ ] Any issues marked for closing are addressed
 * [ ] There is a test suite reasonably covering new functionality or modifications
 * [ ] Function naming, parameters, return values, types, etc., are consistent and according to `CONTRIBUTION.md`
 * [ ] This feature/change has adequate documentation added
 * [ ] No obvious mistakes in the code

Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1228
You're receiving this email because of your account on gitlab.com.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20200331/17880a67/attachment.html>

More information about the Gnutls-devel mailing list