]> git.ipfire.org Git - thirdparty/glibc.git/commit
elf: Earlier missing dynamic segment check in _dl_map_object_from_fd
authorFlorian Weimer <fweimer@redhat.com>
Fri, 5 Nov 2021 16:01:24 +0000 (17:01 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Sat, 9 Jul 2022 08:45:39 +0000 (10:45 +0200)
commit1916c5f0626a0127882aa3c60a91f47bafde8bbd
tree9971140e4d348ab427d41f1bfda70b64b5328a3c
parentd44e1a0740066416d3c331a3022ead5a7c4155ad
elf: Earlier missing dynamic segment check in _dl_map_object_from_fd

Separated debuginfo files have PT_DYNAMIC with p_filesz == 0.  We
need to check for that before the _dl_map_segments call because
that could attempt to write to mappings that extend beyond the end
of the file, resulting in SIGBUS.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit ea32ec354c65ddad11b82ca9d057010df13a9cea)
elf/dl-load.c