Files
flatpak/common
Sebastian Wick 4a678f463b utils: Do not follow symlinks in local_open_file
We use local_open_file in the context of the system helper to open
files written by a user. This means that we want to prevent DOS and
exposing files which only the system helper has access to.

To prevent DOS and avoid side-effects, the file is opened with
O_NONBLOCK and O_NOCTTY.

To prevent leaking files, the file is supposed to not open symlinks.
This part, we failed at. We check if the opened file is a regular file,
but what we actually checked is, if the file a symlink might point at is
a regular file.

Fix this by also specifying O_NOFOLLOW in openat.

(cherry picked from commit FIXME)
2026-04-07 16:24:25 -04:00
..
2026-04-07 16:17:51 -04:00
2019-02-25 18:12:30 +00:00
2021-02-09 09:36:59 +01:00
2023-09-04 13:25:32 +01:00
2018-05-24 11:59:52 +00:00
2018-10-08 08:36:23 +00:00
2019-04-08 12:50:42 +00:00