mirror of
https://github.com/flatpak/flatpak.git
synced 2026-09-28 16:16:53 -04:00
Replace path-based flatpak_mkdir_p calls in flatpak_ensure_data_dir with glnx_chase_and_mkdirat(RESOLVE_NO_SYMLINKS) to prevent an app from replacing subdirectories of its data dir with symlinks between runs and having them followed during the next sandbox setup. In flatpak_run_setup_base_argv, replace path-based --bind args for the app cache/data/config/tmp directories with --bind-fd using fds obtained via glnx_chaseat(RESOLVE_NO_SYMLINKS), preventing both symlink following and TOCTOU races when setting up these bind mounts. Assisted-by: Claude:opus-4.6 Resolves: https://github.com/flatpak/flatpak/security/advisories/GHSA-8688-9x26-hhxj