Skip to content

sys/net/dhcpv6: reject truncated option headers [backport 2026.10] - #23034

Merged
crasbe merged 1 commit into
RIOT-OS:2026.10-branchfrom
mguetschow:backport/2026.10/dhcpv6-reject-truncated-option-headers
Oct 29, 2026
Merged

crasbe merged 1 commit into
RIOT-OS:2026.10-branchfrom
mguetschow:backport/2026.10/dhcpv6-reject-truncated-option-headers

Conversation

@mguetschow

@mguetschow mguetschow commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #23018

Contribution description

The DHCPv6 option walker reads a four byte option header without checking that four bytes remain. A message with one to three trailing bytes after its last complete option makes the parser read past the end of the message.

The real recv_buf is 256 bytes and is followed by best_adv, so the read lands in valid static memory on normal builds. It reads one or two bytes only, and the values are used for parsing, never sent back to the attacker. There is no write, no code execution, and no reliable crash.

Testing procedure

Issues/PRs references

Declaration of AI-Tools / LLMs usage:

AI-Tools / LLMs that were used are:

  • DeepSeek v4.1 Flash 1017 for assessing the report

Assisted-by: DeepSeek v4.1 Flash 1017
(cherry picked from commit d493a4c)
@mguetschow mguetschow added AI: Co-Authored PR/Issue relies on AI. Documentation / Code was partly generated by AI. Area: network Area: Networking Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Process: release backport Integration Process: The PR is a release backport of a change previously provided to master Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) labels Oct 29, 2026
@mguetschow
mguetschow requested a review from miri64 as a code owner October 29, 2026 13:56
@crasbe
crasbe enabled auto-merge October 29, 2026 13:57
@miri64 miri64 added this to the Release 2026.10 milestone Oct 29, 2026
@riot-ci

riot-ci commented Oct 29, 2026

Copy link
Copy Markdown

Murdock results

✔️ PASSED

931b52e sys/net/dhcpv6: reject truncated option headers

Success Failures Total Runtime
14011 0 14012 10m:19s

Artifacts

@crasbe
crasbe added this pull request to the merge queue Oct 29, 2026
Merged via the queue into RIOT-OS:2026.10-branch with commit 1581a69 Oct 29, 2026
36 checks passed
@mguetschow
mguetschow deleted the backport/2026.10/dhcpv6-reject-truncated-option-headers branch October 29, 2026 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI: Co-Authored PR/Issue relies on AI. Documentation / Code was partly generated by AI. Area: network Area: Networking Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Process: release backport Integration Process: The PR is a release backport of a change previously provided to master Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants