发布日期: 2025-11-11
版本号: v5.7.0

本次 Podman 更新修复了安全漏洞 CVE-2025-52881,该漏洞涉及 runc 容器逃逸及拒绝服务问题。功能方面,远程客户端与 podman system service 现支持 TLS 和 mTLS 加密连接;podman run/create 新增 --creds--cert-dir 选项用于管理镜像拉取;podman kube play/down 支持多文件输入。Quadlet 新增 .artifact 文件类型并扩展了容器、Pod、构建和编排文件的配置项。此外,podman wait 新增 --return-on-first 选项,podman container restore 支持 --tcp-close。变更包括为 BoltDB 使用添加警告、引入新的 Windows 安装器、要求 Go 1.24 等。修复了 podman ps 过滤器匹配、远程客户端输出丢失、SBOM 选项忽略等多项问题。API 新增 Quadlet 列表端点并调整了镜像检查字段。最后更新了相关依赖库。

更新内容 (中文)

安全

  • 此版本修复了CVE-2025-52881,该漏洞涉及任意写入工具和procfs写入重定向,可能导致runc容器逃逸和拒绝服务。

功能

  • 远程Podman客户端和podman system service API服务器现支持通过TLS和mTLS加密连接,包括基于证书的客户端认证(#24583)。
  • podman system connection add命令现可创建与支持TLS和mTLS加密的TCP套接字的连接。
  • podman runpodman create命令新增--creds--cert-dir两个选项,用于管理登录镜像仓库以拉取镜像。
  • podman kube playpodman kube down命令现可接受多个文件作为输入,通过单个命令创建或移除多个Pod或部署(#26274)。
  • podman kube play命令新增--no-pod-prefix选项,可禁用容器名称添加Pod名称前缀。请注意,若Pod与容器同名可能导致创建失败(#26396)。
  • podman machine init命令新增--tls-verify选项,用于控制是否可从无受信TLS证书的镜像仓库拉取机器镜像,默认值为true(启用TLS验证)(#26517)。
  • 当针对podman machine虚拟机执行podman image loadpodman build命令时,若加载或构建路径已共享至虚拟机,Podman将从虚拟机文件系统加载而非通过REST API流式传输数据,从而提升性能(#26321)。
  • 使用k8s-file日志驱动时,可通过containers.conf中的log_path选项指定容器日志文件的默认位置。
  • 可通过containers.conf中的runtimes_flags选项设置OCI运行时的默认标志。
  • podman artifact remove命令现可接受多个参数,例如podman artifact rm artifact1 artifact2
  • podman wait命令新增--return-on-first选项,当任意容器满足条件时即返回(而非等待所有容器满足条件)(#26691)。
  • podman container restore命令新增--tcp-close选项,允许具有活动TCP连接的容器多次恢复。
  • Quadlet现支持新的文件类型.artifact,可通过Quadlet管理OCI制品(#25778)。
  • Quadlet .container文件现支持新键HttpProxy,用于禁用主机HTTP代理选项自动转发至容器(#26925)。
  • Quadlet .pod文件现支持新键StopTimeout,用于配置Pod的停止超时(#27120)。
  • Quadlet .build文件现支持BuildArgIgnoreFile两个新键,用于指定构建参数和忽略文件(#27065#27268)。
  • Quadlet .kube文件现支持在单个.kube文件中包含多个YAML文件。
  • Quadlet现支持卷和网络的模板化依赖(#25136)。
  • podman quadlet install命令新增--replace选项,将替换任何名称冲突的现有Quadlet(#26930)。
  • podman quadlet print命令新增别名podman quadlet cat#27296)。
  • 远程Podman客户端的podman artifact remove命令现支持--all选项。
  • podman artifact add命令新增--replace选项,将替换任何已存在的同名制品(#27082)。
  • podman artifact rm命令新增--ignore选项,可在尝试移除不存在的制品时抑制错误(#27084)。
  • podman artifact list命令的输出现包含制品创建时间(#27314)。
  • podman artifact list --format选项现支持VirtualSizeCreatedAt两个新格式键:前者返回制品的整数字节大小,后者返回RFC3339时间戳格式的制品创建时间(现有SizeCreated字段返回人类可读信息)(#27085)。
  • podman artifact inspect命令新增--format选项,可按用户指定格式返回制品的特定信息(#27112)。

变更

  • 为计划在Podman 6.0中移除BoltDB数据库做准备,现为仍使用BoltDB的安装添加警告。这些警告在Podman 5.6中已添加但默认不可见,现已可见。可通过环境变量SUPPRESS_BOLTDB_WARNING=true禁用警告。
  • 引入新的Windows安装程序,采用更简单的单MSI架构,支持用户级(无需管理员)和机器级安装。注意:使用新安装程序前,用户必须先卸载现有Podman安装,但所有容器、镜像、机器及其他数据将被保留。旧安装程序仍提供以确保向后兼容,但将在未来版本中移除(#22994#25968)。
  • Podman现在要求Go 1.24。
  • 创建容器时同时使用-p/--publish--network=ns:/path选项时,Podman将不再警告-p选项会被忽略(因现有命名空间正在使用)(此行为一直如此,但Podman现在会打印警告)(#26663)。
  • 在FreeBSD上运行时,podman stats命令现提供容器资源利用率的额外信息。
  • 已为podman createpodman run--sysctl选项,以及podman network create--interface-name选项启用Shell自动补全。
  • Podman创建的制品现默认包含创建时间戳,存储在org.opencontainers.image.created注解中(#27081)。
  • podman inspect命令现可检查制品。
  • podman artifact add命令现可覆盖已创建制品中的org.opencontainers.image.title注解。
  • Podman现可通过构建选项启用Sequoia-PGP支持。启用后,--sign-by-sq-fingerprint选项允许使用Sequoia-PGP密钥签名镜像。

错误修复

  • 修复了podman ps--filter ancestor=选项需要完全匹配(与Docker的子字符串匹配行为不同)的问题(#26623)。
  • 修复了podman events--filter label=选项不支持仅键匹配(而podman os --filter label=支持)的问题(#26702)。
  • 修复了Quadlet在Mount未指定source时可能崩溃的问题。
  • 修复了Quadlet在.build文件的[Build]部分使用systemd说明符时无法生成的问题(#26746)。
  • 修复了podman info命令在/proc/sys/fs/binfmt_misc未挂载时可能崩溃的问题。
  • 修复了远程Podman客户端因竞争条件可能丢失附加会话(podman runpodman execpodman attach)初始输出字节的问题(#26951)。
  • 修复了podman build命令忽略SBOM相关选项的问题(#23915)。
  • 修复了podman createpodman run--userns=ns:/path选项在runc 1.1.11及以上版本中失效的问题(#27148)。
  • 修复了Windows上podman machine在使用WSL提供程序时,即使镜像已拉取并存在于磁盘上,仍会重新拉取机器镜像的问题。

API

  • 新增用于列出Quadlet的API端点(GET /libpod/quadlets/json)。
  • 镜像的兼容检查端点不再包含ContainerConfig字段。如需访问镜像配置,请改用Config字段。此变更与Docker v1.45 API的更改一致。
  • 修复了容器的Stats和Commit端点(兼容与libpod)、镜像的Push、Commit、Push和Pull端点(兼容与libpod)以及Manifest的Push端点(libpod)未返回Content-Type头的问题。

杂项

  • 改进了向podman createpodman run传递不完整--device选项(例如--device /dev/fuse::)时返回的错误信息。
  • 更新Buildah至v1.42.0
  • 更新containers/image库至v5.38.0
  • 更新containers/storage库至v1.61.0
  • 更新containers/common库至v0.66.0
  • containers/image、containers/storage和containers/common库现源自containers/container-libs代码仓库。

更新内容 (原始)

Security

  • This release addresses CVE-2025-52881, where arbitrary write gadgets and procfs write redirects allowed runc container escape and denial of service.

Features

  • The remote Podman client and podman system service API server now support encrypting connections with TLS and mTLS, including client authentication by certificate (#24583).
  • The podman system connection add command can now create connections to TCP sockets with TLS and mTLS encryption.
  • The podman run and podman create commands now support two new options, --creds and --cert-dir, to manage logging into registries to pull images.
  • The podman kube play and podman kube down commands can now accept multiple files as input, creating or removing more than one pod or deployment with the same command (#26274).
  • The podman kube play command now supports a new option, --no-pod-prefix, to disable prefixing container names with pod names. Please note that this can cause pods to fail to create if the pod shares a name with a container (#26396).
  • The podman machine init command now supports a new option, --tls-verify, to control whether the machine image can be pulled from registries without a trusted TLS certificate, with the default being true (TLS verification on) (#26517).
  • When running the podman image load and podman build commands against a podman machine VM, if the path being loaded or built is shared into the VM, Podman will load it from the VM’s filesystem instead of streaming the data through the REST API, improving performance (#26321).
  • A default location for container log files when using the k8s-file log driver can now be specified with the log_path option in containers.conf.
  • Default flags for the OCI runtime can now be set with the runtimes_flags option in containers.conf.
  • The podman artifact remove command can now accept multiple arguments, for example, podman artifact rm artifact1 artifact2.
  • The podman wait command now supports a new option, --return-on-first, which causes podman wait to return after any container matches the condition, as opposed to waiting for all containers to match (#26691).
  • The podman container restore command now supports a new option, --tcp-close, allowing containers with active TCP connections to be restored multiple times.
  • Quadlet now features support for a new file type, .artifact, allowing OCI artifacts to be managed with Quadlet (#25778).
  • Quadlet .container files now support a new key, HttpProxy, to disable the automatic forwarding of HTTP proxy options from the host into the container (#26925).
  • Quadlet .pod files now support a new key, StopTimeout, to configure the stop timeout for the pod (#27120).
  • Quadlet .build files now support two new keys, BuildArg and IgnoreFile, to specify build arguments and an ignore file (#27065 and #27268).
  • Quadlet .kube files now support multiple YAML files in a single .kube file.
  • Quadlet now supports templated dependencies for volumes and networks (#25136).
  • The podman quadlet install command now supports a new option, --replace, which will replace any existing Quadlet with a conflicting name (#26930).
  • The podman quadlet print command now has a new alias, podman quadlet cat (#27296).
  • The remote Podman client’s podman artifact remove command now supports the --all option.
  • The podman artifact add command now supports a new option, --replace, which will replace any existing artifact with the given name (#27082).
  • The podman artifact rm command now supports a new option, --ignore, which will suppress errors when attempting to remove an artifact that does not exist (#27084).
  • The podman artifact list command now includes artifact creation time in its output (#27314).
  • The podman artifact list --format option now supports two new format keys, VirtualSize, returning the size of the artifact in integer bytes, and CreatedAt, returning the time the artifact was created as an RFC3339 timestamp (the existing Size and Created fields returned human-readable information) (#27085).
  • The podman artifact inspect command now supports a new option, --format, to return specific information about an artifact with user-specified formatting (#27112).

Changes

  • In preparation for a planned removal of the BoltDB database in Podman 6.0, a warning has been added for installations still using BoltDB. These warnings were added in Podman 5.6, but were not visible by default; they now are. They can be suppressed with the SUPPRESS_BOLTDB_WARNING=true environment variable.
  • A new Windows installer has been introduced with a simpler single MSI architecture that supports both user-scope (no admin required) and machine-scope installations. Note: To use the new installer, users must uninstall existing Podman installations before using the new installer, but all containers, images, machines, and other data will be preserved. The old installer is still provided to ensure backwards compatibility, though it will be removed in a future release (#22994 and #25968).
  • Podman now requires Go 1.24.
  • When the -p/--publish and --network=ns:/path options are used together when creating a container, Podman will not warn that the -p option will be ignored as an existing namespace is in use (this has always been the case, but Podman now prints a warning about it) (#26663).
  • The podman stats command now provides additional information about container resource utilization when run on FreeBSD.
  • Shell autocompletion has been enabled for the --sysctl option to podman create and podman run, and the --interface-name option to podman network create.
  • Artifacts created by Podman now include a creation timestamp by default, stored in the org.opencontainers.image.created annotation (#27081).
  • The podman inspect command can now inspect artifacts.
  • The podman artifact add command can now override the org.opencontainers.image.title annotation in created artifacts.
  • Podman can now optionally be built with Sequoia-PGP support. When so built, the --sign-by-sq-fingerprint option allows signing images using Seqoia-PGP keys.

Bugfixes

  • Fixed a bug where the --filter ancestor= option to podman ps required complete matches, unlike Docker (which matched substrings) (#26623).
  • Fixed a bug where the --filter label= option to podman events did not support key-only matches (as podman os --filter label= does) (#26702).
  • Fixed a bug where Quadlet could panic when a Mount was given without a source being specified.
  • Fixed a bug where Quadlet would fail to generate for a .build file when a systemd specifier was used in the [Build] section (#26746).
  • Fixed a bug where the podman info command could panic when /proc/sys/fs/binfmt_misc was not mounted.
  • Fixed a bug where the remote Podman client could lose some initial bytes of output from attach sessions (podman run, podman exec, podman attach) due to a race condition (#26951).
  • Fixed a bug where the podman build command was ignoring SBOM related options (#23915).
  • Fixed a bug where the --userns=ns:/path option to podman create and podman run was broken with runc 1.1.11 and higher (#27148).
  • Fixed a bug where podman machine on Windows would always re-pull machine images when using the WSL provider, even if an the image had already been pulled and was present on disk.

API

  • Added a new API endpoint to list quadlets (GET /libpod/quadlets/json).
  • The Compat Inspect endpoint for Images no longer includes the ContainerConfig field. To access image configuration, use the Config field instead. This matches changes made by Docker in the v1.45 API.
  • Fixed a bug where the Stats and Commit endpoints for Containers (compat & libpod), the Push, Commit, Push, and Pull endpoints for Images (compat & libpod), and the Push endpoint for Manifests (libpod) were not returning a Content-Type header.

Misc

  • Error messages returned when an incomplete --device option (for example --device /dev/fuse::) is passed to podman create or podman run have been improved.
  • Updated Buildah to v1.42.0
  • Updated the containers/image library to v5.38.0
  • Updated the containers/storage library to v1.61.0
  • Updated the containers/common library to v0.66.0
  • The containers/image, containers/storage, and containers/common libraries are now sourced from the containers/container-libs monorepo.

下载链接