Closed deepin-bot[bot] closed 2 weeks ago
Integration Test Info
在挂载持久性目录时不要跟随符号链接(--persist 选项)。这可以防止沙盒逃逸,恶意或被入侵的应用程序可以通过编辑符号链接指向应用程序不应被允许读取或写入的目录。(CVE-2024-42472, GHSA-7hgv-f2j8-xw87)
Chris Williams 发现了一个关于flatpak如何挂载持久目录的问题,这可能允许使用这些目录的应用程序访问主机文件。
一个使用持久目录的恶意或被破坏的Flatpak应用可以读取和写入通常无法访问的位置的文件,这是对完整性和保密性的攻击。
当在应用程序权限中使用persistent=subdir
(在命令行界面中表示为--persist=subdir
)时,这意味着一个原本无法访问真实用户主目录的应用程序将看到一个带有可写子目录subdir
的空主目录。在幕后,这个目录实际上是一个绑定挂载,数据存储在每个应用程序目录中,即~/.var/app/$APPID/subdir
。这允许那些不了解每个应用程序目录的现有应用程序仍然按预期工作,而无需访问一般的主目录。
然而,应用程序确实具有对应用程序目录~/.var/app/$APPID
的写访问权限,其中存储了这个目录。如果持久persistent
/ --persist
选项的源目录被替换为符号链接,那么下次应用程序启动时,绑定挂载将跟随符号链接并将它指向的任何内容挂载到沙箱中。
例如,org.mozilla.Thunderbird
有persistent=.thunderbird
,并且不应该能够访问~/.ssh
。
在这个例子中,%表示主机系统上的shell提示符,$表示应用沙箱内的shell提示符。
% flatpak run --command=sh org.mozilla.Thunderbird
$ mv ~/.var/app/org.mozilla.Thunderbird/.thunderbird{,.save}
$ ln -s ~/.ssh ~/.var/app/org.mozilla.Thunderbird/.thunderbird
$ exit
% flatpak run --command=sh org.mozilla.Thunderbird
$ ls ~/.thunderbird
{~/.ssh/的内容}
IntegrationProjector Notify the author @deepin: Integrated issue updated
IntegrationProjector Bot Deepin Testing Integration Project Manager Info Link to https://github.com/deepin-community/Repository-Integration/pull/1890
【验证环境】:v23 RC2镜像 镜像:https://packagesupdate.uniontech.com/repo/uos-professional/image-beige/CUSTOM/lichenggang/20240814 仓库:deb https://ci.deepin.com/repo/deepin/deepin-community/testing/ unstable main dde community commercial 内核:Linux test-PC 6.9.6-amd64-desktop-hwe 【验证步骤】:问题单中描述的步骤 【验证结果】:集成测试通过,使用过程中暂未发现其他问题
Package information | 软件包信息
Package repository address | 软件包仓库地址
Changelog | 更新信息
flatpak (1.14.10-1) unstable; urgency=high
bubblewrap (0.10.0-1) unstable; urgency=high