Project

General

Profile

cdo 1.6.6 buffer overflow detected

Added by Matthias Demuzere over 9 years ago

Dear all,

I just tried to update my older cdo version to the latest cdo1.6.6 version, hereby using the following commands:
./configure --enable-netcdf4 --enable-zlib --with-netcdf=/usr/ --with-hdf5=/usr/
make
sudo make install

I was under the impression all went well, with the following output for
cdo -V:

Climate Data Operators version 1.6.6 (http://code.zmaw.de/projects/cdo)
Compiled: by rcs on rcs-Precision-T5600 (x86_64-unknown-linux-gnu) Dec 1 2014 04:07:44
Compiler: gcc -std=gnu99 -g -O2 -fopenmp
version: gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
Features: PTHREADS OpenMP NC4 OPeNDAP Z SSE2
Libraries:
Filetypes: srv ext ieg grb nc nc2 nc4 nc4c
CDI library version : 1.6.6 of Dec 1 2014 04:07:36
CGRIBEX library version : 1.7.0 of Sep 30 2014 13:27:33
netCDF library version : 4.1.3 of Sep 17 2013 11:49:01 $
HDF5 library version : 1.8.11
SERVICE library version : 1.3.2 of Dec 1 2014 04:07:20
EXTRA library version : 1.3.2 of Dec 1 2014 04:07:14
IEG library version : 1.3.3 of Dec 1 2014 04:07:18
FILE library version : 1.8.2 of Dec 1 2014 04:07:14

When I try to open a netcdf4 file, I get the following error:

File format : netCDF4 ZIP
-1 : Institut Source Ttype Levels Num Points Num Dtype : Parameter name
  • buffer overflow detected ***: cdo1.6.6 terminated ======= Backtrace: =========
    /lib/x86_64-linux-gnu/libc.so.6(_fortify_fail+0x5c)[0x7f6c4dcfe08c]
    /lib/x86_64-linux-gnu/libc.so.6(+0x111020)[0x7f6c4dcfd020]
    cdo1.6.6[0x4882bb]
    cdo1.6.6[0x407450]
    /lib/x86_64-linux-gnu/libc.so.6(
    _libc_start_main+0xf5)[0x7f6c4dc0dde5]
    cdo1.6.6[0x40826f] ======= Memory map: ========

Followed by a whole list of library links which end with

7fff6d3d1000-7fff6d424000 rw-p 00000000 00:00 0                          [stack]
7fff6d425000-7fff6d427000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
1 : unknown Aborted (core dumped)

Please find the full log in attach.

If I use this cdo version to open a non-netcdf4 file it seems to work fine.

The output of nc-config --all is as follows:

This netCDF 4.1.3 has been built with the following features: 
--cc        -> gcc
--cflags -> -I/usr/include -DgFortran
--libs -> -L/usr/lib -lnetcdf
--cxx       -> g++
--has-c++ -> yes
--fc        -> gfortran
--fflags -> -g -O2 -I/usr/include
--flibs -> -L/usr/lib -lnetcdff -lnetcdf
--has-f77 -> yes
--has-f90 -> yes
--has-dap   > yes
--has-nc2 -> yes
--has-nc4 -> yes
--has-hdf5 -> yes
--has-hdf4 -> no
--has-pnetcdf
> no
--has-szlib ->
--prefix    > /usr
--includedir
> /usr/include
--version -> netCDF 4.1.3

Does anyone has an idea what could be causing this?

Thanks!
Matthias


Replies (2)

RE: cdo 1.6.6 buffer overflow detected - Added by Uwe Schulzweida over 9 years ago

Dear Matthias,

Unfortunately we can't reproduce this problem. Could you please upload your netCDF4 file?

Cheers,
Uwe

RE: cdo 1.6.6 buffer overflow detected - Added by Matthias Demuzere over 9 years ago

Dear Uwe,

Please find in attach a small snapshot of a netcdf file that gives me the error above.
Thus far I have not been able to solve the problem, so would be nice if you could have a look at it!

Please note that I am able to open this file with an intel compiled cdo version 1.6.3.
But since this intel environment is not widely available to all users on our small system, I would like to have the 1.6.6 version compiled with gfortran, as done above!

Kind regards,
Matthias

    (1-2/2)