Skip to content

GitLab

    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    • Menu
    Projects Groups Snippets
  • Get a free trial
  • Sign up
  • Login
  • Sign in / Register
  • GnuTLS GnuTLS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 242
    • Issues 242
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 18
    • Merge requests 18
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gnutls
  • GnuTLSGnuTLS
  • Issues
  • #882
Closed
Open
Created Dec 21, 2019 by Tim Rühsen@rockdaboot🛠Owner

lib/iov.c:119: null pointer passed as argument 2 to memcpy()

Running the commands in !1136 (merged) for the runner UB+ASAN-Werror.Fedora.x86_64.gcc you'll see the error/backtrace below.

If memcpy checks for NULL, nothing would happen. But if not, we would see a segmentation fault.

tim@ryzen:~/src/gnutls$ cat tests/slow/test-ciphers.sh.log 
iov.c:119:3: runtime error: null pointer passed as argument 2, which is declared to never be null
    #0 0x7f99d24b1f5b in _gnutls_iov_iter_next /home/tim/src/gnutls/lib/iov.c:119
    #1 0x7f99d2469482 in gnutls_aead_cipher_encryptv /home/tim/src/gnutls/lib/crypto-api.c:1043
    #2 0x7f99d249995b in test_cipher_aead_scatter /home/tim/src/gnutls/lib/crypto-selftests.c:1028
    #3 0x7f99d249995b in test_cipher_aead /home/tim/src/gnutls/lib/crypto-selftests.c:1292
    #4 0x7f99d24a04d8 in gnutls_cipher_self_test /home/tim/src/gnutls/lib/crypto-selftests.c:1889
    #5 0x555e1ea0e310 in main /home/tim/src/gnutls/tests/slow/cipher-test.c:45
    #6 0x7f99d15aabba in __libc_start_main ../csu/libc-start.c:308
    #7 0x555e1ea0e199 in _start (/home/tim/src/gnutls/tests/slow/cipher-test+0x1199)

default cipher tests failed
FAIL test-ciphers.sh (exit status: 1)
tim@ryzen:~/src/gnutls$ cat tests/slow/override-ciphers.log 
iov.c:119:3: runtime error: null pointer passed as argument 2, which is declared to never be null
    #0 0x7f574b5c3f5b in _gnutls_iov_iter_next /home/tim/src/gnutls/lib/iov.c:119
    #1 0x7f574b57b482 in gnutls_aead_cipher_encryptv /home/tim/src/gnutls/lib/crypto-api.c:1043
    #2 0x7f574b5ab95b in test_cipher_aead_scatter /home/tim/src/gnutls/lib/crypto-selftests.c:1028
    #3 0x7f574b5ab95b in test_cipher_aead /home/tim/src/gnutls/lib/crypto-selftests.c:1292
    #4 0x7f574b5b2501 in gnutls_cipher_self_test /home/tim/src/gnutls/lib/crypto-selftests.c:1892
    #5 0x5583cd9f8c45 in main /home/tim/src/gnutls/tests/slow/cipher-override.c:228
    #6 0x7f574a681bba in __libc_start_main ../csu/libc-start.c:308
    #7 0x5583cd9f82e9 in _start (/home/tim/src/gnutls/tests/slow/.libs/cipher-override+0x32e9)

overridden cipher tests failed
FAIL override-ciphers (exit status: 1)
Edited Dec 21, 2019 by Tim Rühsen
Assignee
Assign to
Time tracking