[gnutls-devel] GnuTLS | gnutls-cli --benchmark type overflow on 32 bit arch (#685)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Sat Jan 26 08:02:29 CET 2019


New Issue was created.

Issue 685: https://gitlab.com/gnutls/gnutls/issues/685
Author:    Andreas Metzler
Assignee:  

## Description of problem:

On 32bit gnutls-cli --benchmark-ciphers produces wrong results. Same machine
64bit installation:
```
Checking ciphers, payload size: 16384
                3DES-CBC 27.91 MB/sec
             AES-128-CBC 1.34 GB/sec
             SALSA20-256 0.62 GB/sec
                    NULL 35.20 GB/sec
```
and 32bit chroot:
```
Checking ciphers, payload size: 16384
                3DES-CBC 27.19 MB/sec
             AES-128-CBC 0.47 GB/sec
             SALSA20-256 0.39 GB/sec
                    NULL 0.40 GB/sec
```


## Version of gnutls used:
3.6.5, but it should be present in 3.6.6 also.

## Distributor of gnutls (e.g., Ubuntu, Fedora, RHEL)
Debian

## How reproducible:
Always.

Steps to Reproduce:
 * one Run gnutls-cli --benchmark-ciphers
 
This was found and diagnosed by Hiroyuki YAMAMORI as https://bugs.debian.org/920477:
> The following code is the cause.
>
>"gnutls-3.6.5/src/benchmark.h" line 45
```
struct benchmark_st {
        struct timespec start;
        unsigned long size;      <== 32bit in i386 arch.
        sighandler_t old_handler;
#if defined(_WIN32)
        HANDLE wtimer;
        HANDLE wthread;
        LARGE_INTEGER alarm_timeout;
#endif
```
>This size variable will overflow.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/issues/685
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/20190126/dba1020e/attachment.html>


More information about the Gnutls-devel mailing list