Adhemerval Zanella ed6a68bac7 debug: Improve '%n' fortify detection (BZ 30932)
The 7bb8045ec0 path made the '%n' fortify check ignore EMFILE errors
while trying to open /proc/self/maps, and this added a security
issue where EMFILE can be attacker-controlled thus making it
ineffective for some cases.

The EMFILE failure is reinstated but with a different error
message.  Also, to improve the false positive of the hardening for
the cases where no new files can be opened, the
_dl_readonly_area now uses  _dl_find_object to check if the
memory area is within a writable ELF segment.  The procfs method is
still used as fallback.

Checked on x86_64-linux-gnu and i686-linux-gnu.
Reviewed-by: Arjun Shankar <arjun@redhat.com>
2025-03-21 15:46:48 -03:00
..
2021-06-22 12:09:52 -03:00
2023-05-01 19:33:21 +02:00
2025-01-28 18:25:13 +01:00
2021-06-15 10:42:11 -03:00
2021-06-15 10:42:11 -03:00
2017-04-07 07:45:53 -04:00
2021-07-22 18:38:04 +05:30
2021-06-30 08:43:37 +02:00
2023-10-24 12:30:59 +02:00
2023-05-01 09:08:59 -04:00
2019-05-02 11:42:51 +02:00
2023-10-24 12:30:59 +02:00
2019-10-09 17:48:41 -03:00
2024-01-03 12:07:14 +00:00
2024-04-10 14:53:39 -03:00
2021-06-30 08:43:37 +02:00
2019-11-06 09:20:52 -03:00
2024-02-01 11:02:01 +00:00