linuxdeepin / developer-center

Deepin developer center, provide developer wiki and community forum.
449 stars 73 forks source link

[Deepin Integration]~[V23-Beta3] Auto integrate from topic: flatpak-1.14.10 by @UTsweetyfish to V23-Beta3 by deepin-ci-robot #10407

Closed deepin-bot[bot] closed 2 weeks ago

deepin-bot[bot] commented 4 weeks ago

Package information | 软件包信息

包名 版本
flatpak 1.14.10-1
bubblewrap 0.10.0-1

Package repository address | 软件包仓库地址

deb [trusted=yes] https://ci.deepin.com/repo/obs/deepin:/CI:/TestingIntegration:/test-integration-pr-1890/testing/ ./

Changelog | 更新信息

flatpak (1.14.10-1) unstable; urgency=high

bubblewrap (0.10.0-1) unstable; urgency=high

deepin-bot[bot] commented 4 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.Thunderbirdpersistent=.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/的内容}

Test suggestion | 测试建议

Influence | 影响范围

ADDITIONAL INFORMATION | 额外补充

deepin-bot[bot] commented 4 weeks ago

IntegrationProjector Notify the author @deepin: Integrated issue updated

deepin-bot[bot] commented 4 weeks ago

IntegrationProjector Bot Deepin Testing Integration Project Manager Info Link to https://github.com/deepin-community/Repository-Integration/pull/1890

xuqi27837288 commented 4 weeks ago

【验证环境】: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 【验证步骤】:问题单中描述的步骤 【验证结果】:集成测试通过,使用过程中暂未发现其他问题