Commit Graph

216 Commits

Author SHA1 Message Date
Serge Lamikhov-Center
b56b93de1b Remove implementation functions from section interface 2020-06-09 23:46:41 -07:00
Pierre Bélissent
8ae505c775 Minor improvements in the project configuration 2020-06-06 22:26:12 +03:00
Pierre Bélissent
6e237576f0 Issue serge1/ELFIO#19: Test case to reproduce, and correction 2020-06-06 22:26:12 +03:00
Serge Lamikhov-Center
453929342f Don't access a note entry in case namesz is less than 1 2020-05-29 05:26:43 -07:00
Serge Lamikhov-Center
a935b5472e The counter type for 'symbol_tables' has been changed to Elf_Xword 2020-05-29 13:54:28 +03:00
Pierre Bélissent
9f0c760767 Create .travis.yml (enables Travis CI) 2020-05-29 03:25:17 -07:00
Serge Lamikhov-Center
155d986529 Preparation to release 3.5 2020-02-22 18:35:46 +02:00
Serge Lamikhov-Center
64626605ed Remove tab characters 2020-02-22 18:22:23 +02:00
Serge Lamikhov-Center
9922a40060 Documentation update for the new flavor of get_symbol() 2020-02-22 12:22:44 +02:00
Serge Lamikhov-Center
3e4a2fabfd Add tests for the new flavor of get_symbol() 2020-02-22 11:31:27 +02:00
Serge Lamikhov-Center
1a5ac38fae Add VSCODE settings 2020-02-22 11:29:45 +02:00
Serge Lamikhov-Center
46d081d5df Add autoxxx tools to the ELFIOTest directory 2020-02-15 23:24:20 +02:00
Serge Lamikhov-Center
aed963ce55 Add autoxxx tools to the ELFIOTest directory 2020-02-15 23:23:52 +02:00
Alfred Bratterud
d8e8a4cbb4 Added get_symbol by value and generic linear search 2020-02-15 23:10:01 +02:00
Serge Lamikhov-Center
580da2467b Updated PDF version of the documentation 2019-05-29 09:39:16 +03:00
Serge Lamikhov-Center
bfb94607d1 load() and save() functions that work with streams are documented 2019-05-29 09:31:52 +03:00
Serge Lamikhov-Center
429f193962 Preparation to Release 3.4 - the version has been changed 2019-05-28 18:55:47 +03:00
orbitcowboy
010ef79cd0 Fixed some warnings from Cppcheck. 2019-05-28 17:55:14 +03:00
Serge Lamikhov-Center
15cd4b1bf2 Remove tabs 2019-04-28 09:00:14 +03:00
Gleb Struchalin
15340ddf9c Avoid warning about initialization reorder (-Wreorder) on GCC 2019-04-28 08:57:04 +03:00
Serge Lamikhov-Center
cdafaa0abf Prevent potential dereferencing of NULL pointer 2019-04-19 15:05:50 +03:00
Serge Lamikhov-Center
858b7a3b70 Names and tabs refactoring 2019-04-19 14:52:20 +03:00
Serge Lamikhov-Center
013cc2f9db Move Visual C++ projects to VS 2019 2019-04-19 14:02:31 +03:00
Gleb Struchalin
a314b28193 Replaced tabs by spaces 2019-04-19 13:55:00 +03:00
Gleb Struchalin
925af0d3d5 Added overload to elfio::save which accepts std::ostream 2019-04-19 13:55:00 +03:00
Gleb Struchalin
e64acb2b2e Added parentheses in ELF64_R_INFO macro for 's' parameter 2019-04-19 13:55:00 +03:00
Vinicius Rangel
350008420f dynamic_section_accessor#add_entry params updated
Changed useless by-reference params to by-value
which forbids number literals (i.e. DT_*)

Added missing const keyword to std::string& parameter
2019-04-19 09:24:40 +03:00
Serge Lamikhov-Center
cb3bd43ca5 Avoid warning regarding incompatible integer types 2018-11-03 18:11:32 +02:00
Serge Lamikhov-Center
52872c4c86 Update the current version of the library and add GitHub link 2018-11-03 18:00:33 +02:00
Serge Lamikhov-Center
2699ef4a52 Remove ELFIOTest from release package 2018-11-03 00:07:41 -07:00
Serge Lamikhov-Center
79b241e87f Add automake generated test-driver 2018-11-02 23:26:56 -07:00
Serge Lamikhov-Center
d98e824ed6 Return back Makefile.in files. The intention is that configure/make pair will work without additional automake invocation 2018-11-02 23:12:26 -07:00
Serge Lamikhov-Center
56920af2bc Use newer version of autotools 2018-11-02 22:58:29 -07:00
Alex Voicu
9f1e1ae164 Fix alignment. 2018-11-02 23:16:14 +02:00
Alex Voicu
144946f753 Add support for AMDGPU specific ELF bits. 2018-11-02 23:16:14 +02:00
Serge Lamikhov-Center
9461ce1167 Fix "Call to virtual function during construction". Thanks to Pavel Kryukov 2018-11-02 23:05:26 +02:00
Serge Lamikhov-Center
a1096d22d8 Increment release version to 3.3 2018-11-02 22:42:18 +02:00
Pavel I. Kryukov
e4abc190d6 Cast -1 to Elf_Half explicitly to suppress Visual Studio warning 2018-08-25 22:41:06 +03:00
Pavel I. Kryukov
6a2e8c78b0 Avoid hiding local variable by another local variable in elfio::load_sections 2018-08-25 22:40:00 +03:00
Jingxuan He
4b9ff89770 modify get_ordered_segments 2018-05-05 19:32:49 +03:00
Tobias Klauser
37ebcd91b8 Fix two gcc -Wignored-qualifiers warnings
Fix the following two gcc warnings:

elfio/elfio_section.hpp:50:36: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
     const size_t get_stream_size() const
                                    ^
elfio/elfio_segment.hpp:99:23: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
     get_stream_size() const
2018-05-05 19:30:09 +03:00
Serge Lamikhov-Center
1fdbb64235 Change VS projects to use VS2017 and Boost 1.65.1 2017-10-05 10:25:30 +03:00
alvaro
5454dcb733 Add crashes files 2017-10-04 20:47:51 +03:00
alvaro
bc5f17b0fc Fix more NULL dereferences
Crash 7d695153fd8052529d480c2352d4ada33a44bada
2017-10-04 20:47:51 +03:00
alvaro
abab994411 Fix NULL deference for no ELF files
Fix crash 060833f08dc14d1712428742b3cad7af17b36bb7
2017-10-04 20:47:51 +03:00
alvaro
bd5f2128ae Check size for segment
Fix crash b82f05b0b25c8fdc98480e6d76b6d5f9164ae2bc

Running: crash-b82f05b0b25c8fdc98480e6d76b6d5f9164ae2bc
==2850==WARNING: AddressSanitizer failed to allocate 0x400000004000001 bytes
==2850==AddressSanitizer's allocator is terminating the process instead of returning 0
==2850==If you don't like this behavior set allocator_may_return_null=1
==2850==AddressSanitizer CHECK failed: /home/alvaro/tools/llvm/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc:22
1 "((0)) != (0)" (0x0, 0x0)
2017-10-04 20:47:51 +03:00
alvaro
1a3cb25a7c Fix oob read terminating data with 0
Fix crash e3c41070342cf84dea077356ddbb8ebf4326a601

==12073==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6110000003bb at pc 0x0000004c234c bp 0x7fcf6359ec30 sp 0x7fcf6359e3
e0
READ of size 11 at 0x6110000003bb thread T0
    #0 0x4c234b in __interceptor_strlen.part.30 /home/alvaro/tools/llvm/llvm/projects/compiler-rt/lib/asan/../sanitizer_common/sanitize
r_common_interceptors.inc:301
    #1 0x7165e6579d87 in std::char_traits<char>::length(char const*) /build/gcc-multilib/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3
/include/bits/char_traits.h:269
    #2 0x7165e6579d87 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std
::allocator<char> const&) /build/gcc-multilib/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:495
    #3 0x5c3333 in ELFIO::elfio::load_sections(std::istream&) /home/alvaro/fuzzers/elfio/ELFIO/examples/libfuzzer/../../elfio/elfio.hpp
:413:44
2017-10-04 20:47:51 +03:00
alvaro
39f8614f17 Added stream_size into section
This will allow to perform some security checks when reading size values
from ELF file

Fix crash e1ce7cecf01cf800397a4302854d9d76fa19763c
2017-10-04 20:47:51 +03:00
Vašek Potoček
972f89e022 Better support for read-only ELF access 2017-10-04 20:33:10 +03:00
Vašek Potoček
ced83b14be More 386 relocation types 2017-10-04 20:15:53 +03:00