Package: lmbench Version: 3.0-a9+debian.1-2 Severity: normal Tags: patch At last on AMD64, size_t is now ‘long unsigned int’. Using int type for mmap() can cause the integer overflow.
Please consider including the attached patch. -- System Information: Debian Release: buster/sid APT prefers bionic-updates APT policy: (500, 'bionic-updates'), (500, 'bionic-security'), (500, 'bionic'), (100, 'bionic-backports') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.15.0-23-generic (SMP w/4 CPU cores) Locale: LANG=zh_TW.UTF-8, LC_CTYPE=zh_TW.UTF-8 (charmap=UTF-8), LANGUAGE=zh_TW:en_US:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages lmbench depends on: ii gcc 4:7.3.0-3ubuntu2 ii libc6 2.27-3ubuntu1 ii libc6-dev [libc-dev] 2.27-3ubuntu1 ii perl 5.26.1-6ubuntu0.1 Versions of packages lmbench recommends: ii lmbench-doc 3.0-a9+debian.1-2 lmbench suggests no packages. -- no debconf information
From a409efbc261ca097b414da7986fc2ea6a35af6dd Mon Sep 17 00:00:00 2001 From: Keng-Yu Lin <ken...@hpe.com> Date: Thu, 28 Jun 2018 18:35:54 +0800 Subject: [PATCH] Use size_t for mmap() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At last on AMD64, size_t is now ‘long unsigned int’. Using int type can cause the integer overflow. Signed-off-by: Keng-Yu Lin <ken...@hpe.com> --- src/lat_pagefault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lat_pagefault.c b/src/lat_pagefault.c index 66f67cd..0e16ddd 100644 --- a/src/lat_pagefault.c +++ b/src/lat_pagefault.c @@ -18,7 +18,7 @@ char *id = "$Id$\n"; typedef struct _state { int fd; - int size; + size_t size; int npages; int clone; char* file; -- 2.11.0