This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

malformed elf causes invalid shiftleft in readelf -S with ubsan


Hi,

When compiling elfutils with undefined behaviour sanitizer
(-fsanitize=undefined) a warning will be shown indicating an invalid
shiftleft operation on the attached elf file:

readelf.c:1133:28: runtime error: left shift of 1 by 31 places cannot
be represented in type 'int'

Tested with elfutils-0.161. This was found with zzuf.

cu,
-- 
Hanno Böck
http://hboeck.de/

mail/jabber: hanno@hboeck.de
GPG: BBB51E42

Attachment: readelf-S-invalid-left-shift.obj
Description: Binary data

Attachment: attachment.sig
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]