Files
openssl/apps
Eugene Syromiatnikov 18097ee961 apps/lib/apps.c: use fstat on an opened fd in app_mmap_file()
Coverity has rightfully complained that using stat() before opening file
leads to TOCTOU issues, refactor the code to open the file first and
then perform stat checks on the opened file descriptor.  It is still far
from foolproof, as the file is not locked, and stat() is used elsewhere,
but at least it seems to be a step in the right direction.

Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1690686
Fixes: 80b7e49c27 "Use mmap for pkeyutl -rawin and dgst one-shot input"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Wed Apr  1 12:46:08 2026
(Merged from https://github.com/openssl/openssl/pull/30624)
2026-04-01 08:46:01 -04:00
..
2024-04-25 11:07:20 +02:00
2026-03-10 14:37:52 +00:00
2025-09-02 13:05:45 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2025-12-09 00:28:19 -07:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2025-12-09 00:28:19 -07:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2025-12-09 00:28:19 -07:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-12 11:47:13 +01:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2026-03-10 14:37:52 +00:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2026-03-10 14:37:52 +00:00