Skip to content

fix(network): also drop reference for DHCP server address - #430

Open
deepin-ci-robot wants to merge 1 commit into
deepin-community:masterfrom
deepin-ci-robot:backport/fix-network-drop-dhcp-server-address-reference
Open

fix(network): also drop reference for DHCP server address#430
deepin-ci-robot wants to merge 1 commit into
deepin-community:masterfrom
deepin-ci-robot:backport/fix-network-drop-dhcp-server-address-reference

Conversation

@deepin-ci-robot

Copy link
Copy Markdown
Contributor

Problem Before the Change

In networkd, when a Network object has a DHCP server address configured, the Address object stored in network->dhcp_server_address is only removed from the per-section hashmap when it is freed. If other references keep the Address object alive (or if it is freed and later reused), the stale pointer in network->dhcp_server_address could dangle, as the reference held by network->dhcp_server_address was never dropped in address_free().

What This PR Changes

Backports upstream systemd commit 8ae3a4f5e282a1fb024e7bb5d6cf1b83037a2395 (PR #30631): address_free() now also clears address->network->dhcp_server_address when the freed Address object is the one referenced by the network's DHCP server address, ensuring the reference is dropped consistently.

Problem Solved After the Change

The network->dhcp_server_address pointer can no longer dangle after the corresponding Address object is freed, preventing potential use-after-free issues. Per upstream, this should not change any behavior in practice — it is a safety measure.

Changes

  • Add debian/patches/fix-network-drop-dhcp-server-address-reference.patch
  • Modify debian/patches/series
  • Modify debian/changelog

Upstream

systemd/systemd@8ae3a4f

Generated-By: glm-5.3-flash
Co-Authored-By: deepin-ci-robot packages@deepin.org

The Address object should never freed after it is referenced.
So, this should not change any behavior. Just for safety.

Changes:
  - Add debian/patches/fix-network-drop-dhcp-server-address-reference.patch
  - Modify debian/patches/series
  - Modify debian/changelog

Upstream: systemd/systemd@8ae3a4f

Generated-By: glm-5.3-flash
Co-Authored-By: deepin-ci-robot <packages@deepin.org>
@deepin-ci-robot
deepin-ci-robot requested a review from myml September 3, 2026 00:47
@deepin-ci-robot

Copy link
Copy Markdown
Contributor Author

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign qaqland for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

TAG Bot

TAG: 255.2-4deepin68
EXISTED: no
DISTRIBUTION: unstable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant