fix(security): VPLUS-2026-34718 - fix DBus permission configuration#652
fix(security): VPLUS-2026-34718 - fix DBus permission configuration#652deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
Conversation
Reviewer's GuideTightens DBus security for deepin-devicemanager by moving from a global allow policy to a default-deny, method-level whitelist and wiring CMake to automatically disable Polkit only for debug builds with explicit warnings. Sequence diagram for DBus method-level permission and Polkit enforcementsequenceDiagram
actor Client
participant SystemDBus
participant DeviceControlService
participant Polkit
rect rgb(230,230,230)
note over Client,SystemDBus: Read-only whitelisted method (e.g. getAuthorizedInfo)
Client->>SystemDBus: call getAuthorizedInfo
SystemDBus->>SystemDBus: check policy: default deny
SystemDBus->>SystemDBus: match whitelist for getAuthorizedInfo
SystemDBus->>DeviceControlService: forward getAuthorizedInfo
DeviceControlService-->>SystemDBus: return data
SystemDBus-->>Client: return data
end
rect rgb(230,230,230)
note over Client,SystemDBus: Dangerous method (e.g. installDriver) in Release build
Client->>SystemDBus: call installDriver
SystemDBus->>SystemDBus: check policy: default deny
SystemDBus-->>Client: reject if not explicitly allowed
end
rect rgb(230,230,230)
note over Client,DeviceControlService: Dangerous method with Polkit (conceptual flow)
Client->>SystemDBus: call installDriver (authorized caller)
SystemDBus->>DeviceControlService: forward installDriver
DeviceControlService->>Polkit: check authorization
Polkit-->>DeviceControlService: allow
DeviceControlService-->>SystemDBus: perform installDriver
SystemDBus-->>Client: success
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Given the new default-deny DBus policy with a hardcoded method allowlist, it would be helpful to add a brief comment in the config explaining that any new methods must be explicitly added here, to reduce the risk of future features accidentally remaining inaccessible or unintentionally opening up privileged operations.
- In the CMake logic, consider adding an explicit warning or guard when
DISABLE_POLKITis manually enabled in non-Debug builds (e.g.,Release) so that developers are clearly informed that they are building a production configuration with Polkit disabled.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Given the new default-deny DBus policy with a hardcoded method allowlist, it would be helpful to add a brief comment in the config explaining that any new methods must be explicitly added here, to reduce the risk of future features accidentally remaining inaccessible or unintentionally opening up privileged operations.
- In the CMake logic, consider adding an explicit warning or guard when `DISABLE_POLKIT` is manually enabled in non-Debug builds (e.g., `Release`) so that developers are clearly informed that they are building a production configuration with Polkit disabled.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
- Implement method-level permission separation for DBus service - Default deny policy for all methods - Whitelist read-only methods (getAuthorizedInfo, getRemoveInfo, etc.) - Dangerous methods (aptUpdate, installDriver, disableInDevice) require authentication - Add comprehensive security policy documentation Security impact: - Fixes privilege escalation vulnerability (CVSS 8.1) - Prevents unauthorized access to root-level operations - Clear maintenance guidelines for future DBus method additions CVSS: 8.1 (High) Affected: All systems with deepin-devicemanager installed Fix version: 6.0.62 PMS: TASK-389221
deepin pr auto review这份代码 diff 展示了对 D-Bus 服务配置文件 以下是对该配置文件的详细审查意见,包括语法逻辑、代码质量、代码性能和代码安全方面的评估与改进建议: 1. 语法逻辑
2. 代码质量
3. 代码性能
4. 代码安全 —— 核心关注点
总结这是一个高质量的安全修复。它从“默认允许”的不安全状态转变为“默认拒绝+白名单”的安全状态。 最终建议:
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lzwind, pengfeixx The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/merge |
Security impact:
CVSS: 8.1 (High)
Affected: All systems with deepin-devicemanager installed
Fix version: 6.0.62
Summary by Sourcery
Tighten DBus access control for deepin-devicemanager and enforce safer Polkit behavior across build types.
New Features:
Bug Fixes:
Enhancements: